From: ts Date: 2002-04-14T23:27:14+09:00 Subject: Re: statements & expressions( was RE: not vs !, and vs && ) >>>>> "W" == Wladimir Mutel writes: W> Why it does not assign p to be Z in line 3 ? 1.6.7 give an error when you try to assign the return value of a void expression. 1.7.2 give an error only for return, break, next, redo, retry and a warning for othercase pigeon% ruby -ve 'a = class A; self end; p a' ruby 1.7.2 (2002-04-12) [i686-linux] -e:1: warning: void value expression -e:1: warning: void value expression A pigeon% pigeon% ruby -ve 'a = def a; 12 end; p a' ruby 1.7.2 (2002-04-12) [i686-linux] -e:1: warning: void value expression -e:1: warning: void value expression nil pigeon% pigeon% ruby -ve 'while true; a = break; end' ruby 1.7.2 (2002-04-12) [i686-linux] -e:1: void value expression while true; a = break; end ^ -e:1: void value expression while true; a = break; end ^ pigeon% Guy Decoux