rubyrefresher
rubyrefresher copied to clipboard
Misleading expression in Methods, Blocks, and Procs
Hi
I think this is misleading
say_these_things(thing2="ha")
it implies that you are explicitly specifying the thing2 variable and leaving thing1 as it's default but in fact, you are simply passing a value for thing1 which is the return value for the expression thing2="ha".. which is "ha"..
2.1.0 :069 > say_these_things(thing2="ha") ha blah => nil
I'm not even sure if it is possible to explicitly specify a named variable when calling a method.. if it is not possible, perhaps might be better to leave this bit out entirely
Michael
Yes, that's totally incorrect. Will fix.