From: Stefan Schmiedl Date: 2001-12-31T21:38:30+09:00 Subject: [ruby-talk:29845] Re: && vs. and Stefan Schmiedl (2001-12-31 21:06): > Le Wang (2001-12-31 18:21): > > > > > > true and puts 'test' > > true && puts 'test' seems like you have to put parentheses around the second 'test', as true && puts('test') #-> test nil as expected. So this is a priority thing. but now I am puzzled about the following: irb(main):021:0> puts(1 || puts(2)) 1 nil #-> fine with me irb(main):022:0> puts(1 or puts(2)) SyntaxError: compile error (irb):22: parse error puts(1 or puts(2)) ^ (irb):22: parse error from (irb):22 what's the problem with using "or" within parentheses? irb(main):029:0> puts(1 or 2) SyntaxError: compile error (irb):29: parse error puts(1 or 2) ^ from (irb):29 s. -- Stefan Schmiedl EDV-Beratung, Programmierung, Schulung Loreleystr. 5, 94315 Straubing, Germany Tel. (0 94 21) 74 01 06 Public Key: http://xss.de/stefan.public shhhh ... I can't hear my code!