[#73707] [Ruby trunk Misc#12004] Code of Conduct — hanmac@...
Issue #12004 has been updated by Hans Mackowiak.
3 messages
2016/02/05
[#73730] [Ruby trunk Feature#12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
3 messages
2016/02/07
[#73746] [Ruby trunk Feature#12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
3 messages
2016/02/09
[#73919] [Ruby trunk Feature#11262] Make more objects behave like "Functions" — Ruby-Lang@...
Issue #11262 has been updated by J旦rg W Mittag.
3 messages
2016/02/22
[#74019] [Ruby trunk Bug#12103][Rejected] ruby process hangs while executing regular expression. — duerst@...
Issue #12103 has been updated by Martin D端rst.
3 messages
2016/02/27
[ruby-core:73752] [Ruby trunk Bug#11736] Float(arg) not consistent with documentation
From:
dpulliam_ruby@...
Date:
2016-02-09 17:52:50 UTC
List:
ruby-core #73752
Issue #11736 has been updated by dylan pulliam.
File 0001-Improve-documentation-on-Float-Arg.patch added
ruby -v set to ruby 2.1.5p273
I have prepared a patch for this. Let me know what you think.
----------------------------------------
Bug #11736: Float(arg) not consistent with documentation
https://bugs.ruby-lang.org/issues/11736#change-56938
* Author: Brian Wheeler
* Status: Open
* Priority: Normal
* Assignee: Zachary Scott
* ruby -v: ruby 2.1.5p273
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Float(arg) → float
Returns arg converted to a float. Numeric types are converted directly, the rest are converted using arg.to_f. Converting nil generates a TypeError.
Strings are NOT converted using arg.to_f
~~~
'123_INVALID'.to_f
# => 123.0
~~~
~~~
Float('123_INVALID')
# => ArgumentError
~~~
This could be fixed by changing object.c like so:
~~~
- return DBL2NUM(rb_str_to_dbl(val, TRUE));
+ return DBL2NUM(rb_str_to_dbl(val, FALSE));
~~~
But it appears that this is desired behavior as there are many specs to ensure this strict validity checking. Please update the documentation to reflect this.
Thanks,
Brian
---Files--------------------------------
0001-Improve-documentation-on-Float-Arg.patch (1.25 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>