From: Bob Gustafson Date: 2001-10-10T09:47:01+09:00 Subject: [ruby-talk:22359] Re: Odd SyntaxError - using 1.7.1 I'm pretty sure that the SyntaxError is due to a change in parse.y from 1.6.5 to 1.7.1 Taking a diff and grepping for YIELD shows a few lines different, but parse.y is pretty complex. I'll let Matz work that one out. Testing with the current stable version gives good results [root@hoho0 gemfinder-1.9.6]# ruby -v ruby 1.6.5 (2001-10-05) [i686-linux-gnu] [root@hoho0 gemfinder-1.9.6]# gemfinder runtests.rb Gemfinder is running here.. Looks good. Will try on some 'real' files now. Neat - thanks much. BobG >> jweirich@one.net wrote today: >>>>>> "Bob" == Bob Gustafson writes: > > Bob> I am trying to use gemfinder-1.9.6 with the current cvs > Bob> version of Ruby > > Bob> [user1@hoho0 user1]$ ruby -v > Bob> ruby 1.7.1 (2001-10-05) [i686-linux-gnu] > Bob> [user1@hoho0 user1]$ > >I've not tried the 1.7.1 series yet. > > Bob> The fragment below shows a SyntaxError, but the code looks > Bob> pretty good (in fact, right out of the 'book' (Programming > Bob> Ruby)) > > Bob> /usr/local/lib/ruby/site_ruby/gem/methodfinder.rb:11:in `require': > Bob> /usr/local/lib/ruby/site_ruby/gem/inject.rb:18: parse error >(SyntaxError) > >The error seems to be in the 'inject' method. I believe 1.7.x >provides a version of 'inject' or 'reduce', I'm not sure what the >final name was. Perhaps there is a conflict. > > Bob> Note - In order to get this far, I had to edit the name of a > Bob> 'require' file - just took the underscore out of the middle > Bob> of the filename because the file being required does not have > Bob> an underscore. > >Thanks. Someone else also pointed this out. It seems my environment >had *both* versions of the when_missing file. I'll fix this on the >next update. > >If you find out what the 1.7.x problem is, I'll include any fixes for >that as well. > >-- >-- Jim Weirich jweirich@one.net http://w3.one.net/~jweirich >--------------------------------------------------------------------- >"Beware of bugs in the above code; I have only proved it correct, >not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)