From 6a3bb427e6db6c17bd192414006c725d1f2aa11d 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: http://svn.ruby-lang.org/repos/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 d1fe9db70..859363363 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