summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-16 06:10:31 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-16 06:10:31 (GMT)
commit2fb4c36c44ab390b48a96985e6b0010e4e866992 (patch)
tree2aec2db601907a4890d5591ed382cdd3da5db2e2 /vm_insnhelper.c
parent1ae69a20645d7be556fd0ecd001b0bb5f3959330 (diff)
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
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 1a7000c..82b3829 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);
}
}