psych icon indicating copy to clipboard operation
psych copied to clipboard

Use of MRI-specific Exception hidden ivars does not work on JRuby or Rubinius

Open headius opened this issue 10 years ago • 1 comments

You know the ones... "mesg" and "bt" or "backtrace". I assume you have to go at them directly because they're not settable in MRI, but neither JRuby nor Rubinius have those hidden vars. We need to add appropriate ways to reconstitute an Exception on JRuby and Rubinius.

There's also no tests for the behavior, so we have no promises to keep! Hooray!

headius avatar Jan 16 '15 16:01 headius

In case you don't "know the ones":

https://github.com/tenderlove/psych/blob/5616a13f42a1a587670dfa9ed3d03648b7f41548/lib/psych/visitors/yaml_tree.rb#L204-L205 https://github.com/tenderlove/psych/blob/cb75738e594f9d7f7d4899e0f932fcb55a9ad1e1/ext/psych/psych_yaml_tree.c#L5-L13 https://github.com/tenderlove/psych/blob/7e7ccf6fa4ee084c673d5a52888e2e18a41bfb5b/ext/psych/psych_to_ruby.c#L9-L16

jemc avatar Jan 16 '15 17:01 jemc