From 71336a03fa72d7fb61159bc2add4001c1955c285 Mon Sep 17 00:00:00 2001 From: nagachika Date: Tue, 1 Jul 2014 14:36:03 +0000 Subject: * 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 --- numeric.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'numeric.c') 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 -- cgit v1.2.3