mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
numeric.c (rb_int_digits): Fix exception message
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e4257036ec
commit
95e9ccbb6c
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Fri Nov 4 13:03:00 2016 Kenta Murata <mrkn@mrkn.jp>
|
||||
|
||||
* numeric.c (rb_int_digits): Fix exception message
|
||||
|
||||
Fri Nov 4 10:51:16 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/pathname/pathname.c (path_hash): fix unnormalized Fixnum
|
||||
|
|
|
@ -4680,7 +4680,9 @@ rb_int_digits(int argc, VALUE *argv, VALUE num)
|
|||
return rb_int_digits_bigbase(num, base_value);
|
||||
|
||||
base = FIX2LONG(base_value);
|
||||
if (base < 2)
|
||||
if (base < 0)
|
||||
rb_raise(rb_eArgError, "negative radix");
|
||||
else if (base < 2)
|
||||
rb_raise(rb_eArgError, "invalid radix %ld", base);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue