mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* compile.c (NODE_MATCH3): pass CALL_INFO to opt_regexpmatch2
* insns.def (opt_regexpmatch2): use CALL_SIMPLE_METHOD to call =~ if the receiver is not a T_STRING [Bug #8847] [ruby-core:56916] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e1fd7fa03e
commit
d0d63cff8a
3 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
Sat Aug 31 15:03:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
|
||||
|
||||
* compile.c (NODE_MATCH3): pass CALL_INFO to opt_regexpmatch2
|
||||
|
||||
* insns.def (opt_regexpmatch2): use CALL_SIMPLE_METHOD to call =~ if
|
||||
the receiver is not a T_STRING [Bug #8847] [ruby-core:56916]
|
||||
|
||||
Sat Aug 31 14:07:11 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* lib/securerandom.rb (random_bytes): Use Process.clock_gettime.
|
||||
|
|
|
@ -4760,7 +4760,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
else {
|
||||
ADD_SEQ(ret, recv);
|
||||
ADD_SEQ(ret, val);
|
||||
ADD_INSN(ret, line, opt_regexpmatch2);
|
||||
ADD_INSN1(ret, line, opt_regexpmatch2, new_callinfo(iseq, idEqTilde, 1, 0, 0));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -2090,7 +2090,7 @@ opt_regexpmatch1
|
|||
*/
|
||||
DEFINE_INSN
|
||||
opt_regexpmatch2
|
||||
()
|
||||
(CALL_INFO ci)
|
||||
(VALUE obj2, VALUE obj1)
|
||||
(VALUE val)
|
||||
{
|
||||
|
@ -2098,7 +2098,9 @@ opt_regexpmatch2
|
|||
val = rb_reg_match(obj1, obj2);
|
||||
}
|
||||
else {
|
||||
val = rb_funcall(obj2, idEqTilde, 1, obj1);
|
||||
PUSH(obj2);
|
||||
PUSH(obj1);
|
||||
CALL_SIMPLE_METHOD(obj2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue