summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_complex.rb
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-26 12:18:40 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-26 12:18:40 +0000
commit50d2900e0cdebb8c0601a94c29245feb9f41cee6 (patch)
tree25f9321357dd16bc933b8e582d42efdf640f6fce /test/ruby/test_complex.rb
parent9f143dc39857e68f8f1f07393e0202a118e1dee6 (diff)
downloadruby-50d2900e0cdebb8c0601a94c29245feb9f41cee6.tar.gz
ruby-50d2900e0cdebb8c0601a94c29245feb9f41cee6.tar.xz
ruby-50d2900e0cdebb8c0601a94c29245feb9f41cee6.zip
* 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
Diffstat (limited to 'test/ruby/test_complex.rb')
-rw-r--r--test/ruby/test_complex.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb
index 6885294f8..6706b5b39 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