From: "aptinio (Aaron Tinio)" Date: 2012-10-17T16:14:22+09:00 Subject: [ruby-core:48045] [ruby-trunk - Bug #7176][Open] Rational can't be coerced into BigDecimal (TypeError) Issue #7176 has been reported by aptinio (Aaron Tinio). ---------------------------------------- Bug #7176: Rational can't be coerced into BigDecimal (TypeError) https://bugs.ruby-lang.org/issues/7176 Author: aptinio (Aaron Tinio) Status: Open Priority: Normal Assignee: Category: lib Target version: 1.9.3 ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] Rational + BigDecimal makes a BigDecimal as follows: $ ruby -rbigdecimal -e "puts Rational(1) + BigDecimal.new('1')" 0.2E1 But BigDecimal + Rationl raises a TypeError as follows: $ ruby -rbigdecimal -e "puts BigDecimal.new('1') + Rational(1)" -e:1:in `+': Rational can't be coerced into BigDecimal (TypeError) from -e:1:in `
' -- http://bugs.ruby-lang.org/