From: "grz01@..." Date: 2008-02-05T06:04:56+09:00 Subject: ruby syntax question Hi, While debugging some ruby-code, I found a mis-typed construct like the following, which looks like a syntax error to me, but when you run it in irb it evaluates to nil and does NOT raise an error: x = def puts xyz end (where xyz is undefined) Anyone can explain what the above code means to ruby? In contrast, this code DOES raise a syntax error: x = def puts "xyz" end My versions is: irb 0.9.5(05/04/13) ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] TIA, --------------------------- grz01