From: muraken@... Date: 2015-12-25T06:31:59+00:00 Subject: [ruby-core:72476] [Ruby trunk - Bug #10286] [Assigned] BigDecimal - inconsistency with other numeric classes Issue #10286 has been updated by Kenta Murata. Status changed from Open to Assigned Assignee set to Kenta Murata ---------------------------------------- Bug #10286: BigDecimal - inconsistency with other numeric classes https://bugs.ruby-lang.org/issues/10286#change-55763 * Author: Konstantin H * Status: Assigned * Priority: Normal * Assignee: Kenta Murata * ruby -v: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- Unlike other numerical classes, BigDecimal does not raise ArgumentError when I try to parse invalid value. ~~~ require 'bigdecimal' BigDecimal('invalid value') # => # Float('invalid value') # ArgumentError: invalid value for Float(): "invalid value" Integer('invalid value') # ArgumentError: invalid value for Integer(): "invalid value" Complex('invalid value') # ArgumentError: invalid value for convert(): "invalid value" Rational('invalid value') # ArgumentError: invalid value for convert(): "invalid value" ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: