From 50d2900e0cdebb8c0601a94c29245feb9f41cee6 Mon Sep 17 00:00:00 2001 From: yugui Date: Thu, 26 Nov 2009 12:18:40 +0000 Subject: * 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. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_rational.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/ruby/test_rational.rb') diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb index 274a6eb33..705f712bd 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 -- cgit