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 `<main>'
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/.