summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-28 16:11:27 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-28 16:11:27 +0000
commit3c0e4e61d68e20c239d1a8a25ca6e931ca1d802e (patch)
tree5cb9b3663f1f8bffc52296d2b777ea1501b75a3a /numeric.c
parent3750847f550d5d483e85cbe4e300dfd219a2095e (diff)
merges r24684 from trunk into ruby_1_9_1.
-- * vm_method.c (rb_remove_method_id): exported. * numeric.c (num_sadded): fix for non-ascii method name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/numeric.c b/numeric.c
index 95d16bd548..a69c2101f6 100644
--- a/numeric.c
+++ b/numeric.c
@@ -202,13 +202,13 @@ rb_num_coerce_relop(VALUE x, VALUE y, ID func)
static VALUE
num_sadded(VALUE x, VALUE name)
{
- const char *nstr = rb_id2name(rb_to_id(name));
+ ID mid = rb_to_id(name);
/* ruby_frame = ruby_frame->prev; */ /* pop frame for "singleton_method_added" */
/* Numerics should be values; singleton_methods should not be added to them */
- rb_remove_method(rb_singleton_class(x), nstr);
+ rb_remove_method_id(rb_singleton_class(x), mid);
rb_raise(rb_eTypeError,
"can't define singleton method \"%s\" for %s",
- nstr,
+ rb_id2name(mid),
rb_obj_classname(x));
return Qnil; /* not reached */
}