From ddda108ecce743ed9e1128d21518d015304dc67c Mon Sep 17 00:00:00 2001 From: yugui Date: Fri, 27 Nov 2009 02:55:16 +0000 Subject: merges r25067 from trunk into ruby_1_9_1 and added a test for it. -- * lib/mathn.rb (Bignum#**): Fixed bignum**fixnum that was broken when requiring lib/mathn [ruby-core:25740] -- * test/test_mathn.rb (TestMathn): new test case. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@25949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_complex.rb | 3 ++- test/ruby/test_rational.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb index b4be08ed9..33cafbde5 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 8cacab9a0..37efc7b49 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