diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-16 06:10:31 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-16 06:10:31 +0000 |
commit | 2fb4c36c44ab390b48a96985e6b0010e4e866992 (patch) | |
tree | 2aec2db601907a4890d5591ed382cdd3da5db2e2 | |
parent | 1ae69a20645d7be556fd0ecd001b0bb5f3959330 (diff) | |
download | ruby-2fb4c36c44ab390b48a96985e6b0010e4e866992.tar.gz |
accepts `ec` as first parameter.
* vm_insnhelper.c (vm_check_match): accepts `ec` as first parameter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | insns.def | 2 | ||||
-rw-r--r-- | vm_insnhelper.c | 10 |
2 files changed, 6 insertions, 6 deletions
@@ -759,7 +759,7 @@ checkmatch (VALUE target, VALUE pattern) (VALUE result) { - result = vm_check_match(target, pattern, flag); + result = vm_check_match(ec, target, pattern, flag); } /** diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 1a7000c964..82b3829a52 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1464,7 +1464,7 @@ rb_eql_opt(VALUE obj1, VALUE obj2) static VALUE vm_call0(rb_execution_context_t *ec, VALUE, ID, int, const VALUE*, const rb_callable_method_entry_t *); static VALUE -check_match(VALUE pattern, VALUE target, enum vm_check_match_type type) +check_match(rb_execution_context_t *ec, VALUE pattern, VALUE target, enum vm_check_match_type type) { switch (type) { case VM_CHECKMATCH_TYPE_WHEN: @@ -1478,7 +1478,7 @@ check_match(VALUE pattern, VALUE target, enum vm_check_match_type type) const rb_callable_method_entry_t *me = rb_callable_method_entry_with_refinements(CLASS_OF(pattern), idEqq, NULL); if (me) { - return vm_call0(GET_EC(), pattern, idEqq, 1, &target, me); + return vm_call0(ec, pattern, idEqq, 1, &target, me); } else { /* fallback to funcall (e.g. method_missing) */ @@ -2979,7 +2979,7 @@ vm_splat_array(VALUE flag, VALUE ary) } static VALUE -vm_check_match(VALUE target, VALUE pattern, rb_num_t flag) +vm_check_match(rb_execution_context_t *ec, VALUE target, VALUE pattern, rb_num_t flag) { enum vm_check_match_type type = ((int)flag) & VM_CHECKMATCH_TYPE_MASK; @@ -2989,7 +2989,7 @@ vm_check_match(VALUE target, VALUE pattern, rb_num_t flag) for (i = 0; i < n; i++) { VALUE v = RARRAY_AREF(pattern, i); - VALUE c = check_match(v, target, type); + VALUE c = check_match(ec, v, target, type); if (RTEST(c)) { return c; @@ -2998,7 +2998,7 @@ vm_check_match(VALUE target, VALUE pattern, rb_num_t flag) return Qfalse; } else { - return check_match(pattern, target, type); + return check_match(ec, pattern, target, type); } } |