From 71336a03fa72d7fb61159bc2add4001c1955c285 Mon Sep 17 00:00:00 2001 From: nagachika Date: Tue, 1 Jul 2014 14:36:03 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ numeric.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b201b7cb25..2ebb4e5bd6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jul 1 23:30:51 2014 CHIKANAGA Tomoyuki + + * 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 * ext/digest/lib/digest/hmac.rb, test/digest/test_digest_hmac.rb: diff --git a/numeric.c b/numeric.c index f61b1349a6..3689165dd8 100644 --- a/numeric.c +++ b/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