Project

General

Profile

Bug #12815

Integer#digits's error message different when base is Fixnum or Bignum

Added by znz (Kazuhiro NISHIYAMA) almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.4.0dev (2016-10-06 trunk 56364) [x86_64-linux]
[ruby-core:77502]

Description

Is this intended?

% ruby -ve '60.upto(65){|n| 1.digits(-(1<<n)) rescue p $! }'
ruby 2.4.0dev (2016-10-06 trunk 56364) [x86_64-linux]
#<ArgumentError: invalid radix -1152921504606846976>
#<ArgumentError: invalid radix -2305843009213693952>
#<ArgumentError: invalid radix -4611686018427387904>
#<ArgumentError: negative radix>
#<ArgumentError: negative radix>
#<ArgumentError: negative radix>

History

Updated by mrkn (Kenta Murata) almost 3 years ago

  • Status changed from Assigned to Closed

I've fixed this on r56554

Also available in: Atom PDF