diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-06 05:32:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-06 05:32:37 +0000 |
commit | 6845578c926de256ee158652a4563f185fa6fec9 (patch) | |
tree | 2974c65502810a03e0e6a6e0486031358d49a85e /insns.def | |
parent | bd00bb3ef75b469a83a8eac6995bb6800a22c15a (diff) |
* insns.def (opt_eq): get rid of gcc bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -1697,18 +1697,18 @@ opt_eq VALUE str1 = recv; VALUE str2 = obj; - if (str1 == str2) { - val = Qtrue; - } - else if (!ENCODING_GET(str1) && !ENCODING_GET(str2) && - RSTRING_LEN(str1) == RSTRING_LEN(str2) && - rb_memcmp(RSTRING_PTR(str1), RSTRING_PTR(str2), - RSTRING_LEN(str1)) == 0) { - val = Qtrue; - } - else { + 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); } else { goto INSN_LABEL(normal_dispatch); |