8000 devrandom/ruby@af49fb2 · GitHub
[go: up one dir, main page]

Skip to content

Commit af49fb2

Browse files
committed
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@25936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 53244de commit af49fb2

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Thu Nov 26 21:14:30 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
2+
3+
* test/ruby/test_complex.rb (@unify): fix the detection if math
4+
loaded. This makes test_complex.rb work fine with the previous
5+
commit.
6+
7+
* test/ruby/test_rational.rb (@unify): ditto.
8+
19
Thu Nov 26 21:13:36 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
210

311
* test/test_mathn.rb (TestMathn): new test case.

test/ruby/test_complex.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ def setup
99
if @rational
1010
@keiju = Rational.instance_variable_get('@RCS_ID')
1111
end
12-
@unify = $".grep(/mathn/).size != 0
12+
seps = [File::SEPARATOR, File::ALT_SEPARATOR].compact.map{|x| Regexp.escape(x)}.join("|")
13+
@unify = $".grep(/(?:^|#{seps})mathn(?:\.(?:rb|so))?/).size != 0
1314
end
1415

1516
def test_compsub

test/ruby/test_rational.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ def setup
99
if @complex
1010
@keiju = Complex.instance_variable_get('@RCS_ID')
1111
end
12-
@unify = $".grep(/mathn/).size != 0
12+
seps = [File::SEPARATOR, File::ALT_SEPARATOR].compact.map{|x| Regexp.escape(x)}.join("|")
13+
@unify = $".grep(/(?:^|#{seps})mathn(?:\.(?:rb|so))?/).size != 0
1314
end
1415

1516
def test_ratsub

0 commit comments

Comments
 (0)
0