[Ironruby-core] Invalid SyntaxErrorException bug

Terence Lewis lewistm at gmail.com
Sat Sep 15 19:02:50 EDT 2007


After some hunting through the IronRuby code (I wrote a little test app
which causes rbx to throw a SyntaxErrorException), I figured out that the
parser has a problem parsing a certain sequence of tokens which appears to
be valid ruby code (given that it runs fine in my MRI). I've attached a
.patch file as per John's "submitting a patch" video - which contains a test
showing the problem, which appears in statements of the form:

    a = b == something or return nil

which fails with "syntax error, unexpected kRETURN". Unfortunately, I don't
have the faintest clue about where to go in the code to fix this error, so
I'll leave that part to someone more capable for now. I discovered the bug
while trying to
require 'net/http'
in a test program after copying net/http from my MRI to somewhere rbx could
find it. Presently, this file cannot be successfully parsed - it fails
around line 1152 in def [](key) on a statement similar to the one I wrote

Unfortunately, my country's monopolistic telecommunications provider
apparently runs a transparent proxy which makes it impossible for me to log
into rubyforge and load this as a bug myself (see
details), so I'll resort to posting bugs here until this issue is
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20070916/76f9fa74/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: assign_or_return_bug_test.patch
Type: application/octet-stream
Size: 793 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20070916/76f9fa74/attachment.obj 

More information about the Ironruby-core mailing list