Sorry, I had a glimmer of hope but this script eclipsed it :(
confused.rb
-----------
#!/usr/bin/ruby
s="test"
puts s
s="surprising" if (1+1!=2)
puts s
s=("surprising" if (1+1!=2))
puts s
------------
Outputs:
test
test
nil
so, to add to a newbie's confusion, a pair of parenthesis does the
expected.
-Kedar
--
Posted via http://www.ruby-forum.com/.