Marshal load bigdecimal NaN fails. #4463

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

Comments

Projects
None yet
2 participants
@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.

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