diff --git a/ChangeLog b/ChangeLog index cb0ff8e1eb..68ba3a8416 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Nov 26 21:14:30 2009 Yuki Sonoda (Yugui) + + * test/ruby/test_complex.rb (@unify): fix the detection if math + loaded. This makes test_complex.rb work fine with the previous + commit. + + * test/ruby/test_rational.rb (@unify): ditto. + Thu Nov 26 21:13:36 2009 Yuki Sonoda (Yugui) * test/test_mathn.rb (TestMathn): new test case. diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb index 6885294f84..6706b5b39f 100644 --- a/test/ruby/test_complex.rb +++ b/test/ruby/test_complex.rb @@ -9,7 +9,8 @@ class Complex_Test < Test::Unit::TestCase if @rational @keiju = Rational.instance_variable_get('@RCS_ID') end - @unify = $".grep(/mathn/).size != 0 + seps = [File::SEPARATOR, File::ALT_SEPARATOR].compact.map{|x| Regexp.escape(x)}.join("|") + @unify = $".grep(/(?:^|#{seps})mathn(?:\.(?:rb|so))?/).size != 0 end def test_compsub diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb index 274a6eb33f..705f712bd3 100644 --- a/test/ruby/test_rational.rb +++ b/test/ruby/test_rational.rb @@ -9,7 +9,8 @@ class Rational_Test < Test::Unit::TestCase if @complex @keiju = Complex.instance_variable_get('@RCS_ID') end - @unify = $".grep(/mathn/).size != 0 + seps = [File::SEPARATOR, File::ALT_SEPARATOR].compact.map{|x| Regexp.escape(x)}.join("|") + @unify = $".grep(/(?:^|#{seps})mathn(?:\.(?:rb|so))?/).size != 0 end def test_ratsub