From: Kedar Mhaswade Date: 2009-01-10T07:29:32+09:00 Subject: value of an expression? Sorry if this is asked before and I could not find its answer. Take a look at the following: ------------------------------------------ 1 #!/usr/bin/ruby 2 s="test" 3 puts s 4 s="surprising" if (1+1 != 2) 5 puts s ------------------------------------------ which produces the output: test test but I expected it to output: test nil since I thought the expression in line number 5 ("surprising" if (1+1 != 2)) should evaluate to nil and hence s should be assigned nil. So, my question is: - Why? - What should I read to understand this better? Thank you! -Kedar -- Posted via http://www.ruby-forum.com/.