mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* numeric.c (num_step_scan_args): table argument of rb_get_kwargs() is
array of IDs, not Symbols. [ruby-dev:48353] [Bug #9811] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c6bc3789b7
commit
71336a03fa
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Jul 1 23:30:51 2014 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
|
||||
|
||||
* numeric.c (num_step_scan_args): table argument of rb_get_kwargs() is
|
||||
array of IDs, not Symbols. [ruby-dev:48353] [Bug #9811]
|
||||
|
||||
Tue Jul 1 16:18:22 2014 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* ext/digest/lib/digest/hmac.rb, test/digest/test_digest_hmac.rb:
|
||||
|
|
10
numeric.c
10
numeric.c
|
@ -122,7 +122,7 @@ VALUE rb_cFixnum;
|
|||
VALUE rb_eZeroDivError;
|
||||
VALUE rb_eFloatDomainError;
|
||||
|
||||
static VALUE sym_to, sym_by;
|
||||
static ID id_to, id_by;
|
||||
|
||||
void
|
||||
rb_num_zerodiv(void)
|
||||
|
@ -1997,8 +1997,8 @@ num_step_scan_args(int argc, const VALUE *argv, VALUE *to, VALUE *step)
|
|||
if (!NIL_P(hash)) {
|
||||
ID keys[2];
|
||||
VALUE values[2];
|
||||
keys[0] = sym_to;
|
||||
keys[1] = sym_by;
|
||||
keys[0] = id_to;
|
||||
keys[1] = id_by;
|
||||
rb_get_kwargs(hash, keys, 0, 2, values);
|
||||
if (values[0] != Qundef) {
|
||||
if (argc > 0) rb_raise(rb_eArgError, "to is given twice");
|
||||
|
@ -4235,8 +4235,8 @@ Init_Numeric(void)
|
|||
rb_define_method(rb_cFloat, "next_float", flo_next_float, 0);
|
||||
rb_define_method(rb_cFloat, "prev_float", flo_prev_float, 0);
|
||||
|
||||
sym_to = ID2SYM(rb_intern("to"));
|
||||
sym_by = ID2SYM(rb_intern("by"));
|
||||
id_to = rb_intern("to");
|
||||
id_by = rb_intern("by");
|
||||
}
|
||||
|
||||
#undef rb_float_value
|
||||
|
|
Loading…
Reference in a new issue