rubyrefresher icon indicating copy to clipboard operation
rubyrefresher copied to clipboard

Misleading expression in Methods, Blocks, and Procs

Open JavascriptMick opened this issue 11 years ago • 1 comments

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

JavascriptMick avatar Jul 14 '14 22:07 JavascriptMick

Yes, that's totally incorrect. Will fix.

0xfe avatar Aug 05 '14 15:08 0xfe