summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-30 14:01:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-30 14:01:37 +0000
commita6c637f013b7a4031df13a56fdb00560369d2aa8 (patch)
tree8dc6aff6d0c49a895f4ccbcb4cb03e0e4705896c /vm_method.c
parentafa4770aa63d6d08d4e3873861698feae142e3ed (diff)
vm_method.c: idRespond_to_missing
* vm_method.c (respond_to_missing): use idRespond_to_missing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/vm_method.c b/vm_method.c
index 6a394811b6..f219d7cb43 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -13,7 +13,7 @@
static void rb_vm_check_redefinition_opt_method(const rb_method_entry_t *me, VALUE klass);
-static ID object_id, respond_to_missing;
+static ID object_id;
static ID removed, singleton_removed, undefined, singleton_undefined;
static ID added, singleton_added, attached;
@@ -1506,7 +1506,7 @@ basic_obj_respond_to(VALUE obj, ID id, int pub)
case 0:
args[0] = ID2SYM(id);
args[1] = pub ? Qfalse : Qtrue;
- return RTEST(rb_funcall2(obj, respond_to_missing, 2, args));
+ return RTEST(rb_funcall2(obj, idRespond_to_missing, 2, args));
default:
return TRUE;
}
@@ -1556,11 +1556,11 @@ obj_respond_to(int argc, VALUE *argv, VALUE obj)
rb_scan_args(argc, argv, "11", &mid, &priv);
if (!(id = rb_check_id(&mid))) {
- if (!rb_method_basic_definition_p(CLASS_OF(obj), respond_to_missing)) {
+ if (!rb_method_basic_definition_p(CLASS_OF(obj), idRespond_to_missing)) {
VALUE args[2];
args[0] = ID2SYM(rb_to_id(mid));
args[1] = priv;
- return rb_funcall2(obj, respond_to_missing, 2, args);
+ return rb_funcall2(obj, idRespond_to_missing, 2, args);
}
return Qfalse;
}
@@ -1621,7 +1621,6 @@ Init_eval_method(void)
undefined = rb_intern("method_undefined");
singleton_undefined = rb_intern("singleton_method_undefined");
attached = rb_intern("__attached__");
- respond_to_missing = rb_intern("respond_to_missing?");
{
#define REPLICATE_METHOD(klass, id, noex) \
@@ -1630,6 +1629,6 @@ Init_eval_method(void)
(rb_method_flag_t)(noex | NOEX_BASIC | NOEX_NOREDEF))
REPLICATE_METHOD(rb_eException, idMethodMissing, NOEX_PRIVATE);
REPLICATE_METHOD(rb_eException, idRespond_to, NOEX_PUBLIC);
- REPLICATE_METHOD(rb_eException, respond_to_missing, NOEX_PUBLIC);
+ REPLICATE_METHOD(rb_eException, idRespond_to_missing, NOEX_PUBLIC);
}
}