I noticed the following example somewhere
def mymethod(opts)
p opts
end
mymethod(:aaa => "something")
I'm wondering what this :aaa stands for. If I omit the
colon before the dummy aaa, it doesn't works.
Thanks for any hint/light.
--
michel marcon (aka cmic)
sysadmin
Is because 'aaa' is undefined, while :aaa is a symbol
Get a free PDF version of The Book of Ruby to learn more about Ruby
syntax:
http://www.sapphiresteel.com/The-Book-Of-Ruby
--
Luis Lavena