History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-452
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Charles Oliver Nutter
Reporter: Charles Oliver Nutter
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JRuby

Method.to_proc appears to handle return exceptions incorrect

Created: 18/Jan/07 03:09 PM   Updated: 06/May/07 09:49 PM
Component/s: None
Affects Version/s: None
Fix Version/s: JRuby 1.0.0RC1

Time Tracking:
Not Specified


 Description  « Hide
In the to_proc impl in RubyMethod, a return exception is caught...then its primary data is cast to IRubyObject and returned. However the primary data should be the method it's returning from, not the returning value. This does not appear to be getting hit, so I'm not sure if it's dead code or what.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Thomas E Enebo - 20/Feb/07 04:19 PM
I think this issue is still valid, but I thought I would update the terminology in this since I changed jumpexception to stop using primary and secondary as method names. Most return jumps return getValue() (was secondary for returns before) , but this particular case returns getTarget() (was primary for returns before) which looks strange. Plus, if Charlie cannot hit it then perhaps it really is dead code. My only idea is to override Method's bmcall and insert a return in it.

Charles Oliver Nutter - 05/May/07 05:58 PM
I'm just going to change this to getValue, since every return in the whole system puts data into getValue and every target would fail to cast to IRubyObject. This may still be dead code, but at least if it isn't it won't classcast.

Charles Oliver Nutter - 06/May/07 09:49 PM
Closing for 1.0RC1