From: Robert Linder Date: 2001-10-10T15:20:28+09:00 Subject: [ruby-talk:22376] Question on 'if' expression The following was done on Windows 2000, Ruby 1.6.4 using irb.bat I tried a 'if' statement format( see below) that I used in 'C', assign a varible inside a 'if' statement. The format does work, but I need to know if this is part of the legal 'if' syntax. rb(main):004:0> x=2.1 2.1 irb(main):005:0> if (( xx=x.to_i) != 3 ) then irb(main):006:1* puts "not =" irb(main):007:1> end not = nil irb(main):008:0> xx 2