summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-27 09:31:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-27 09:31:11 +0000
commit84255e0485b1d7b6eef6d82f330f4f671b3f23fc (patch)
tree560352f8441f6e97af74f3960fb3b33813fbfc01 /numeric.c
parenta20bd463a809aff8707acdeb90e8569b144e01d3 (diff)
* 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/trunk@24684 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 dedd8e2ee5..7f74cde562 100644
--- a/numeric.c
+++ b/numeric.c
@@ -203,13 +203,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 */
}