diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-11 22:28:33 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-11 22:28:33 +0000 |
commit | 4101a5690e3e8cc4940052ab28c0466e200b256d (patch) | |
tree | 76f5353f33cbca8a37d236d82645b6cc58d23f3e /insns.def | |
parent | c1f1b931716a9b0e5d8ebd1a2ccbefd42d171b9c (diff) | |
download | ruby-4101a5690e3e8cc4940052ab28c0466e200b256d.tar.gz |
insns.def (opt_regexpmatch2): respect redefined match op
* insns.def (opt_regexpmatch2): respect redefined match op
Thanks to Sam Rawlins for the fix.
* test/ruby/test_string.rb: test based on Tsuyoshi Sawada's report
[Bug #9581]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2154,7 +2154,7 @@ opt_regexpmatch2 (VALUE obj2, VALUE obj1) (VALUE val) { - if (RB_TYPE_P(obj2, T_STRING) && + if (CLASS_OF(obj2) == rb_cString && BASIC_OP_UNREDEFINED_P(BOP_MATCH, STRING_REDEFINED_OP_FLAG)) { val = rb_reg_match(obj1, obj2); } |