Backport #3362
closedrb_big2dbl incorrectly returns Infinity for a negative Bignum out of range of a double
Description
=begin
Revision 12261 changed rb_big2dbl in a way that caused a negative Bignum out of range of a double to be returned as Infinity rather than -Infinity. This was a regression that appears to be fixed in 1.9 but is still present in 1.8.7p249.
Could a fix for this be backported to 1.8.7 or are no further 1.8.7 versions being released? Also, the bug is still in http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8 so would presumably appear an a 1.8.8 release.
Thanks,
Brian
=end
Updated by shyouhei (Shyouhei Urabe) almost 14 years ago
- Status changed from Open to Assigned
- Assignee set to shyouhei (Shyouhei Urabe)
=begin
Yes there'll be another 1.8.7 release. I'll backport it later.
=end
Updated by shyouhei (Shyouhei Urabe) almost 14 years ago
- Target version set to Ruby 1.8.8
- ruby -v set to ruby 1.8.8dev (2010-06-08 revision 27061) [x86_64-linux]
=begin
zsh % ~/target/ruby_1_8/bin/ruby -ve'p (-1 << 65536).to_f'
ruby 1.8.8dev (2010-06-08 revision 27061) [x86_64-linux]
-e:1: warning: (...) interpreted as grouped expression
-e:1: warning: Bignum out of Float range
Infinity
=end
Updated by shyouhei (Shyouhei Urabe) almost 14 years ago
- Assignee changed from shyouhei (Shyouhei Urabe) to mrkn (Kenta Murata)
=begin
=end
Updated by mrkn (Kenta Murata) almost 14 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r28324.
Brian, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Updated by naruse (Yui NARUSE) over 12 years ago
- Tracker changed from Bug to Backport
- Project changed from Ruby 1.8 to Backport187
- Status changed from Closed to Assigned
- Assignee changed from mrkn (Kenta Murata) to shyouhei (Shyouhei Urabe)
- Target version deleted (
Ruby 1.8.8)
Updated by shyouhei (Shyouhei Urabe) almost 12 years ago
- Status changed from Assigned to Closed
This issue was solved with changeset r35941.
Brian, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 28324:
* bignum.c (rb_big2dbl), test/ruby/test_bignum.rb (test_to_f):
A negative Bignum out of Float range should be converted to -Infinity.
[ruby-core:30492] [Bug #3362]