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

Marshal load bigdecimal NaN fails. #4463

Closed
Manikandan-K opened this issue Jan 28, 2017 · 0 comments
Closed

Marshal load bigdecimal NaN fails. #4463

Manikandan-K opened this issue Jan 28, 2017 · 0 comments

Comments

@Manikandan-K
Copy link

Manikandan-K commented Jan 28, 2017

Marshal.load(Marshal.dump(BigDecimal::NaN))

It works fine in MRI. But in JRuby it throws NumberFormatException.

Java::JavaLang::NumberFormatException: from java.math.BigDecimal.<init>(BigDecimal.java:494) from java.math.BigDecimal.<init>(BigDecimal.java:383) from java.math.BigDecimal.<init>(BigDecimal.java:806) from org.jruby.ext.bigdecimal.RubyBigDecimal._load(RubyBigDecimal.java:248) from org.jruby.ext.bigdecimal.RubyBigDecimal$INVOKER$s$1$0$_load.call(RubyBigDecimal$INVOKER$s$1$0$_load.gen) from org.jruby.RubyClass.smartLoadOldUser(RubyClass.java:1934) from org.jruby.runtime.marshal.UnmarshalStream.userUnmarshal(UnmarshalStream.java:434) from org.jruby.runtime.marshal.UnmarshalStream.unmarshalObjectDirectly(UnmarshalStream.java:260) from org.jruby.runtime.marshal.UnmarshalStream.unmarshalObject(UnmarshalStream.java:135) from org.jruby.runtime.marshal.UnmarshalStream.unmarshalObject(UnmarshalStream.java:124) from org.jruby.runtime.marshal.UnmarshalStream.unmarshalObject(UnmarshalStream.java:97) from org.jruby.RubyMarshal.load(RubyMarshal.java:145) ....

Tested with 9.1.7 and 9.0.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants