Simply constructing an exception messes with $!
-----------------------------------------------
Key: JRUBY-3996
URL: http://jira.codehaus.org/browse/JRUBY-3996
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.3.1
Reporter: Charles Oliver Nutter
Here's a peculiar one:
{noformat}
~/projects/jruby ➔ bin/jruby -rjruby -e
'JRuby.runtime.newTypeError("blah"); p $!'
#<TypeError: blah>
{noformat}
This obviously can wreak havoc if you have a current $! bubbling up the stack
and happen to construct an exception that doesn't get used. $! should not get
set until the exception is actually raised.
I ran into this when I had an exception being constructed but not raised; it
showed up in failing specs that were sensitive to $! not being correct.
--
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