[1.9] variable assignment with rescue doesn't work as expected
--------------------------------------------------------------
Key: JRUBY-5307
URL: http://jira.codehaus.org/browse/JRUBY-5307
Project: JRuby
Issue Type: Bug
Components: Parser
Affects Versions: JRuby 1.5.6
Reporter: David Calavera
Assignee: Thomas E Enebo
This code raises an Error on --1.9 but it should return nil:
{code}
class Foo
def initialize(bar)
end
end
class Bar < Foo
end
@bar ||= Bar.new rescue nil
{code}
It works fine on 1.8 and I was wondering in this code into the 1.9 parser is
used for anything:
https://github.com/jruby/jruby/blob/master/src/org/jruby/parser/Ruby19Parser.y#L745-764
The DefaultRubyParser doesn't have it and it works fine.
This bug causes a buch on tests failing on ActionPack.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email