From f2f2cd5bc69847be2c7edcc5c61d5bbb380955fd Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 6 Oct 2008 03:22:56 +0000 Subject: * string.c (rb_str_comparable): string comparison should be transitive. [ruby-dev:36484] * test/ruby/test_m17n_comb.rb (TestM17NComb#test_str_eq): test updated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index d1fe9db70e..8593633632 100644 --- a/string.c +++ b/string.c @@ -1938,7 +1938,6 @@ rb_str_comparable(VALUE str1, VALUE str2) { int idx1, idx2; int rc1, rc2; - int a8; if (RSTRING_LEN(str1) == 0) return Qtrue; if (RSTRING_LEN(str2) == 0) return Qtrue; @@ -1956,8 +1955,6 @@ rb_str_comparable(VALUE str1, VALUE str2) if (rb_enc_asciicompat(rb_enc_from_index(idx1))) return Qtrue; } - a8 = rb_ascii8bit_encindex(); - if (idx1 == a8 || idx2 == a8) return Qtrue; return Qfalse; } -- cgit v1.2.3