Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throw stringifies the name #506

Closed
zenspider opened this Issue Jan 22, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@zenspider
Copy link

commented Jan 22, 2013

% ruby --1.8 -e 'begin throw :e; rescue Exception => e; p [e.class, e.message, (e.name rescue nil)]; end'
[NameError, "uncaught throw `e'", "e"]

vs MRI 1.8.7:

ruby -e 'begin throw :e; rescue Exception => e; p [e.class, e.message, (e.name rescue nil)]; end'
[NameError, "uncaught throw `e'", :e]

I'm getting this on a failing minitest test.

@enebo

This comment has been minimized.

Copy link
Member

commented Jan 22, 2013

Just adding a note here about 1.9 mode since we have an additional descrepency:

jruby -e 'begin throw :e; rescue Exception => e; p [e.class, e.message, (e.name rescue nil)]; end'
[ArgumentError, "uncaught throw `e'", nil]

Whereas mri19+:

mri19 -e 'begin throw :e; rescue Exception => e; p [e.class, e.message, (e.name rescue nil)]; end'
[ArgumentError, "uncaught throw :e", nil]

enebo added a commit that referenced this issue Jan 22, 2013

@enebo

This comment has been minimized.

Copy link
Member

commented Jan 22, 2013

We should match in both originally reported problem and also in the added mismatch in 1.9 mode I mentioned.

@enebo enebo closed this Jan 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.