From: Jamis Buck Date: 2004-01-18T08:37:49+09:00 Subject: Re: long expression syntax messju mohr wrote: >On Sun, Jan 18, 2004 at 08:10:01AM +0900, Rick Hu wrote: > > >>why do I get a syntax error for >> >> puts 1 if ( 1 == 2 >> or 1 == 1 ) >> >>but there is no syntax error for >> >> puts 1 if ( 1 == 2 or >> 1 == 1 ) >> >> > >i don't get one with the ruby-1.8.1 that's distributed in debian's >sid. > > I do, with Ruby 1.8.1. But the reason (as far as I've been able to ascertain) is that Ruby's grammar does not allow newlines before operators. -- Jamis Buck jgb3@email.byu.edu ruby -h | ruby -e 'a=[];readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a << r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'