From: Shyouhei Urabe Date: 2009-03-19T14:46:15+09:00 Subject: [ruby-core:22942] [Bug #1303] A name considered a local variable on RHS of an assignment that defines it Issue #1303 has been updated by Shyouhei Urabe. Assigned to set to Yukihiro Matsumoto I don't think it being a bug, but a language design. You can always resolve a method by prefixing "self." to the method name, but you can never add a qualifier to a local variable, so in cases of naming conflict between local variables vs. methods, it is safer for ruby to take local variables, generally speaking. Multiple assignment can go quite complex and LHS variables are not always nil when appearing on RHS. irb(main):001:0> f, g, h = (f = 1), (f += 1), f.inspect => [1, 2, "2"] ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1303 ---------------------------------------- http://redmine.ruby-lang.org