diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-13 18:01:59 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-13 18:01:59 +0000 |
commit | b73e900f50e74504c48f05811dbfb2aabdf40cdc (patch) | |
tree | eb307802dff370bdef006b8faf49b64be2820d80 /compile.c | |
parent | 25f5dd6799bbacc9f61d60b87b70ea6e6d815c20 (diff) | |
download | ruby-b73e900f50e74504c48f05811dbfb2aabdf40cdc.tar.gz |
* vm.c (vm_define_method): refactoring.
* get CREF in this function.
* cbase is no longer needed (CREF_CLASS(cref) is enough).
* compile.c: RubyVM::FrozenCore.define_method only accept 2 args.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -5258,10 +5258,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) debugp_param("defn/iseq", (VALUE)method_iseq); ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); - ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE)); ADD_INSN1(ret, line, putobject, ID2SYM(node->nd_mid)); ADD_INSN1(ret, line, putiseq, method_iseq); - ADD_SEND (ret, line, id_core_define_method, INT2FIX(3)); + ADD_SEND (ret, line, id_core_define_method, INT2FIX(2)); if (poped) { ADD_INSN(ret, line, pop); |