[#84280] [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD — nobu@...
Issue #14181 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/12/15
[#84398] [Ruby trunk Bug#14220] WEBrick changes - failures on MSWIN, MinGW — Greg.mpls@...
Issue #14220 has been reported by MSP-Greg (Greg L).
3 messages
2017/12/22
[#84472] Re: [ruby-dev:50394] [Ruby trunk Bug#14240] warn four special variables: $; $, $/ $\ — Eric Wong <normalperson@...>
Shouldn't English posts be on ruby-core instead of ruby-dev?
3 messages
2017/12/26
[ruby-core:84236] [Ruby trunk Bug#13880] `BigDecimal(string)` should raise on invalid values in `string`
From:
muraken@...
Date:
2017-12-13 15:24:49 UTC
List:
ruby-core #84236
Issue #13880 has been updated by mrkn (Kenta Murata).
https://github.com/ruby/bigdecimal/issues/79
----------------------------------------
Bug #13880: `BigDecimal(string)` should raise on invalid values in `string`
https://bugs.ruby-lang.org/issues/13880#change-68364
* Author: ojab (ojab ojab)
* Status: Assigned
* Priority: Normal
* Assignee: mrkn (Kenta Murata)
* Target version:
* ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Right now `BigDecimal()` behaviour differs from `Integer()` and `Float()`:
```
2.4.1 :001 > require 'bigdecimal'
=> true
2.4.1 :002 > BigDecimal('1,')
=> 0.1e1
2.4.1 :003 > Integer('1,')
ArgumentError: invalid value for Integer(): "1,"
from (irb):3:in `Integer'
from (irb):3
from /home/ojab/.rvm/rubies/ruby-2.4.1/bin/irb:11:in `<main>'
2.4.1 :004 > Float('1,')
ArgumentError: invalid value for Float(): "1,"
from (irb):4:in `Float'
from (irb):4
from /home/ojab/.rvm/rubies/ruby-2.4.1/bin/irb:11:in `<main>'
```
and right now AFAIU there is no way to convert, for example, String to BigDecimal with validation.
I think that `BigDecimal()` should likewise raise for consistency, 'bigdecimal/util' & `.to_d` can be used for conversion without checks analogous to `.to_f`/`.to_i`/etc.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>