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
Labels
Milestone

Comments

@Manikandan-K
Copy link

@Manikandan-K 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.

frankwong15 added a commit to frankwong15/jruby that referenced this issue Feb 25, 2017
@kares kares closed this in #4509 Feb 25, 2017
kares added a commit that referenced this issue Feb 25, 2017
@kares kares added this to the JRuby 9.1.8.0 milestone Feb 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.