From: ahoward Date: 2003-04-09T04:35:57+09:00 Subject: Re: 1.8 parse error? On Wed, 9 Apr 2003, Yukihiro Matsumoto wrote: > Hi, > > In message "1.8 parse error?" > on 03/04/09, ahoward writes: > > |i'm getting : > | > |~/eg/ruby/btpgsql/btpgsql-0.2.0 > ruby test/btpgsql.rb > |test/btpgsql.rb:1191: ERROR: parser: parse error at or near "#!/" (PGError) > | > | from test/btpgsql.rb:1186:in `each' > | from test/btpgsql.rb:1186 > > Since it's PGError, not SyntaxError, the error must be in your SQL > statement. it's not the SQL, but your suggestion pointed me towards the error : /tmp > cat bug.rb path = (File.dirname (__FILE__) << File::SEPARATOR << 'btschema.sql') /tmp > ruby -v ruby 1.8.0 (2003-03-03) [i686-linux] /tmp > ruby bug.rb bug.rb /tmp > /usr/local/bin/ruby -v ruby 1.6.8 (2002-12-24) [i686-linux] /tmp > /usr/local/bin/ruby bug.rb ./btschema.sql so (File.dirname (__FILE__) << File::SEPARATOR << 'btschema.sql') is not the same under 1.6 and 1.8. i can fix this by changing it to (File.dirname(__FILE__) << File::SEPARATOR << 'btschema.sql') (note lack of space!) has the precedence of '<<' changed or something? i don't understand why this should confuse the parser? why the insistence the parens immeadiately follow method names? i like the C style of method (args); much more than method(args); especially when doing something like method0 (method1 (method2 (arg))) which is less straining than method0(method1(method2(arg))) IMHO. -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================