ruby-changes:14122
From: yugui <ko1@a...>
Date: Thu, 26 Nov 2009 21:23:15 +0900 (JST)
Subject: [ruby-changes:14122] Ruby:r25936 (trunk): * test/ruby/test_complex.rb (@unify): fix the detection if math
yugui 2009-11-26 21:18:40 +0900 (Thu, 26 Nov 2009) New Revision: 25936 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25936 Log: * 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. Modified files: trunk/ChangeLog trunk/test/ruby/test_complex.rb trunk/test/ruby/test_rational.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 25935) +++ ChangeLog (revision 25936) @@ -1,3 +1,11 @@ +Thu Nov 26 21:14:30 2009 Yuki Sonoda (Yugui) <yugui@y...> + + * 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) <yugui@y...> * test/test_mathn.rb (TestMathn): new test case. Index: test/ruby/test_complex.rb =================================================================== --- test/ruby/test_complex.rb (revision 25935) +++ test/ruby/test_complex.rb (revision 25936) @@ -9,7 +9,8 @@ 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 Index: test/ruby/test_rational.rb =================================================================== --- test/ruby/test_rational.rb (revision 25935) +++ test/ruby/test_rational.rb (revision 25936) @@ -9,7 +9,8 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/