summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-02 11:34:19 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-02 11:34:19 +0000
commit19ddfc2483bb82cfb241a58d4b25956f7b79d1ad (patch)
treec5eecb286e12abe5d5201d4fe2c6bee9efdf5a31 /insns.def
parent319088e9c7ae9836efd242592ea80c9794a45002 (diff)
* eval.c (rb_mod_using): new method Module#using. [experimental]
* eval.c (rb_mod_refine): new method Module#refine. [experimental] * eval.c (f_using): new method Kernel#using. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def16
1 files changed, 8 insertions, 8 deletions
diff --git a/insns.def b/insns.def
index a36a56e112..24e358d16f 100644
--- a/insns.def
+++ b/insns.def
@@ -183,8 +183,8 @@ getclassvariable
()
(VALUE val)
{
- NODE *cref = vm_get_cref(GET_ISEQ(), GET_EP());
- val = rb_cvar_get(vm_get_cvar_base(cref), id);
+ NODE *cref = rb_vm_get_cref(GET_ISEQ(), GET_EP());
+ val = rb_cvar_get(vm_get_cvar_base(cref, GET_CFP()), id);
}
/**
@@ -198,8 +198,8 @@ setclassvariable
(VALUE val)
()
{
- NODE *cref = vm_get_cref(GET_ISEQ(), GET_EP());
- rb_cvar_set(vm_get_cvar_base(cref), id, val);
+ NODE *cref = rb_vm_get_cref(GET_ISEQ(), GET_EP());
+ rb_cvar_set(vm_get_cvar_base(cref, GET_CFP()), id, val);
}
/**
@@ -777,8 +777,8 @@ defined
break;
case DEFINED_CVAR:
{
- NODE *cref = vm_get_cref(GET_ISEQ(), GET_EP());
- klass = vm_get_cvar_base(cref);
+ NODE *cref = rb_vm_get_cref(GET_ISEQ(), GET_EP());
+ klass = vm_get_cvar_base(cref, GET_CFP());
if (rb_cvar_defined(klass, SYM2ID(obj))) {
expr_type = "class variable";
}
@@ -970,6 +970,7 @@ defineclass
klass, 0, VM_ENVVAL_BLOCK_PTR(GET_BLOCK_PTR()),
class_iseq->iseq_encoded, GET_SP(),
class_iseq->local_size, 0);
+ rb_vm_using_modules(class_iseq->cref_stack, klass);
RESTORE_REGS();
INC_VM_STATE_VERSION();
@@ -1044,12 +1045,11 @@ invokesuper
while (ip && !ip->klass) {
ip = ip->parent_iseq;
}
- again:
me = rb_method_entry(klass, id, &klass);
if (me && me->def->type == VM_METHOD_TYPE_ISEQ &&
me->def->body.iseq == ip) {
klass = RCLASS_SUPER(klass);
- goto again;
+ me = rb_method_entry_get_with_omod(Qnil, klass, id, &klass);
}
CALL_METHOD(num, blockptr, flag, id, me, recv, klass);