Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
handling of exceptions that define a #initialize method inconsistent w.r.t. MRI #168
Given the following script:
MRI's Kernel#raise will dup the exception instance's and modify its message and backtrace:
(Actually, MRI is a bit inconsistent, since it will not explicitely call #dup or #clone but will call #initialize_copy anyway. But that's common with MRI)
On rubinius, "raise" seems to create a new exception of the same class than +instance+ (NOT duping it), and gives the message to the #initialize method of the instance:
This obviously breaks any exception scheme that uses exception instances with additional information embedded in them.
Forget this commit .. I thought I was passing the mspec, but the RBC file was not updated even though I ran "rake kernel".
Should not rbx detect if the rbc file is up-to-date ????
Commit above superseded by