You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
5: from ~/.rubies/truffleruby-1.0.0-rc14/bin/irb:31:in `<main>'
4: from (irb):2
3: from ~/.rubies/truffleruby-1.0.0-rc14/lib/truffle/bigdecimal.rb:293:in `BigDecimal'
2: from ~/.rubies/truffleruby-1.0.0-rc14/lib/truffle/bigdecimal.rb:293:in `new'
1: from ~/.rubies/truffleruby-1.0.0-rc14/lib/truffle/bigdecimal.rb:293:in `initialize'
RuntimeError (com.oracle.truffle.object.basic.DynamicObjectBasic cannot be cast to java.math.BigDecimal (ClassCastException))
from org.truffleruby.stdlib.bigdecimal.CreateBigDecimalNode.create(CreateBigDecimalNode.java:209)
from org.truffleruby.stdlib.bigdecimal.CreateBigDecimalNodeFactory$CreateBigDecimalNodeGen.executeAndSpecialize(CreateBigDecimalNodeFactory.java:506)
from org.truffleruby.stdlib.bigdecimal.CreateBigDecimalNodeFactory$CreateBigDecimalNodeGen.executeInitialize(CreateBigDecimalNodeFactory.java:198)
from org.truffleruby.stdlib.bigdecimal.BigDecimalCoreMethodNode.initializeBigDecimal(BigDecimalCoreMethodNode.java:57)
from org.truffleruby.stdlib.bigdecimal.BigDecimalNodes$InitializeNode.initialize(BigDecimalNodes.java:63)
from org.truffleruby.stdlib.bigdecimal.BigDecimalNodesFactory$InitializeNodeFactory$InitializeNodeGen.executeAndSpecialize(BigDecimalNodesFactory.java:158)
from org.truffleruby.stdlib.bigdecimal.BigDecimalNodesFactory$InitializeNodeFactory$InitializeNodeGen.execute(BigDecimalNodesFactory.java:140)
from org.truffleruby.language.control.SequenceNode.execute(SequenceNode.java:34)
from org.truffleruby.language.methods.ExceptionTranslatingNode.execute(ExceptionTranslatingNode.java:51)
from org.truffleruby.language.RubyRootNode.execute(RubyRootNode.java:54)
Translated to internal error
MRI 2.5.5
TypeError: no implicit conversion of Time into String
from (irb):3:in `BigDecimal'
from (irb):3
from /usr/bin/irb:11:in `<main>'
I guess, TruffleRuby would follow the error message of MRI as well and not the above one which is confusing.
The text was updated successfully, but these errors were encountered:
deepj
changed the title
BigDecimal would throw RuntimeError instead of TypeError when precision argument is set
BigDecimal would throw RuntimeError instead of TypeError when round mode is set
Mar 21, 2019
deepj
changed the title
BigDecimal would throw RuntimeError instead of TypeError when round mode is set
BigDecimal wouldn't throw RuntimeError instead of TypeError when round mode is set
Mar 21, 2019
deepj
changed the title
BigDecimal wouldn't throw RuntimeError instead of TypeError when round mode is set
BigDecimal wouldn't throw RuntimeError when round mode is set
Mar 21, 2019
Thanks for the report. As you've no doubt noticed, we don't pass a fair number of the BigDecimal specs. I'll add the functionality required here, but we really need to take a more in-depth pass on this library.
TruffleRuby doesn't support the round mode yet (See #1509). But there is another problem with that.
It's used in
Hanami::Utils
in https://github.com/hanami/utils/blob/master/lib/hanami/utils/kernel.rb#L420Due this, several
Hanami::Utils
specs failTo reproduce:
Error:
MRI 2.5.5
I guess, TruffleRuby would follow the error message of MRI as well and not the above one which is confusing.
The text was updated successfully, but these errors were encountered: