From: "Mean L." Date: 2012-10-31T03:04:25+09:00 Subject: bug?: local variable created in if modifier not available in modified expression irb(main):001:0> local1 if local1 = "created" (irb):1: warning: found = in conditional, should be == NameError: undefined local variable or method `local1' for main:Object from (irb):1 from /home/me/.rbenv/versions/1.9.3-p194/bin/irb:12:in `
' irb(main):002:0> (local1 if local1 = "created") is supposed to be equivalent to (if local1 = "created" then local1 end) but the later works as expected and the former does not. -- Posted via http://www.ruby-forum.com/.