Skip to content

Commit e3e3da0

Browse files
committed
clean up 1.8 and 1.9 compatibility
1 parent b7231b4 commit e3e3da0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

test/linalg-test.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,16 @@ def assert_nothing_raised
4646
begin
4747
yield
4848
rescue => e
49-
assert_block("raised in assert_nothing_raised: #{e.inspect}") {
49+
assert_block("Exception raised:\n #{e.inspect}") {
5050
false
5151
}
52+
return
5253
end
54+
assert(true)
55+
end
56+
57+
def assert_not_nil(*args, &block)
58+
refute_nil(*args, &block)
5359
end
5460
end
5561
end

test/tc_nullspace.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_typical
3737
end
3838
a.replace_column(c0, a.column(c1))
3939
ns2 = a.nullspace(EPSILON)
40-
refute_nil(ns2)
40+
assert_not_nil(ns2)
4141
assert_equal(ns2.hsize, 1)
4242
assert_equal(a.hsize, a.rank + a.nullity)
4343
end

0 commit comments

Comments
 (0)