diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-07 06:49:38 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-07 06:49:38 +0000 |
commit | 3c78d621e60a2cae073b5e6ef7b7ac8b6d884a7e (patch) | |
tree | 3218ec990125d7b25ee2127c0530d9016ead1bac /insns.def | |
parent | 026568c9156b1ba2a153b4a6d594ea590343c1bb (diff) |
* insns.def (opt_eq): fix to use rb_str_equal().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -1694,21 +1694,7 @@ opt_eq else if (HEAP_CLASS_OF(recv) == rb_cString && HEAP_CLASS_OF(obj) == rb_cString && BASIC_OP_UNREDEFINED_P(BOP_EQ)) { - - VALUE str1 = recv; - VALUE str2 = obj; - val = Qtrue; - do { - if (str1 == str2) break; - if (!ENCODING_GET(str1) && !ENCODING_GET(str2)) { - if (RSTRING_LEN(str1) == RSTRING_LEN(str2)) { - int cmp = memcmp(RSTRING_PTR(str1), RSTRING_PTR(str2), - RSTRING_LEN(str1)); - if (!cmp) break; - } - } - val = rb_str_equal(str1, str2); - } while (0); + val = rb_str_equal(recv, obj); } else { goto INSN_LABEL(normal_dispatch); |