mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Remove unnecessary condition
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ecf4e8fbd7
commit
eeee4f404b
1 changed files with 3 additions and 7 deletions
10
compile.c
10
compile.c
|
@ -5284,9 +5284,7 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
|
||||||
* end
|
* end
|
||||||
* pattern.post_args_num.each do |i|
|
* pattern.post_args_num.each do |i|
|
||||||
* j = pattern.pre_args_num + i
|
* j = pattern.pre_args_num + i
|
||||||
* if pattern.use_rest_num?
|
* j += rest_num
|
||||||
* j += rest_num
|
|
||||||
* end
|
|
||||||
* unless pattern.post_args[i].match?(d[j])
|
* unless pattern.post_args[i].match?(d[j])
|
||||||
* goto match_failed
|
* goto match_failed
|
||||||
* end
|
* end
|
||||||
|
@ -5384,10 +5382,8 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
|
||||||
ADD_INSN(ret, line, dup);
|
ADD_INSN(ret, line, dup);
|
||||||
|
|
||||||
ADD_INSN1(ret, line, putobject, INT2FIX(pre_args_num + i));
|
ADD_INSN1(ret, line, putobject, INT2FIX(pre_args_num + i));
|
||||||
if (use_rest_num) {
|
ADD_INSN1(ret, line, topn, INT2FIX(3));
|
||||||
ADD_INSN1(ret, line, topn, INT2FIX(3));
|
ADD_SEND(ret, line, idPLUS, INT2FIX(1));
|
||||||
ADD_SEND(ret, line, idPLUS, INT2FIX(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
ADD_SEND(ret, line, idAREF, INT2FIX(1));
|
ADD_SEND(ret, line, idAREF, INT2FIX(1));
|
||||||
iseq_compile_pattern_each(iseq, ret, args->nd_head, in_alt_pattern);
|
iseq_compile_pattern_each(iseq, ret, args->nd_head, in_alt_pattern);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue