Skip to content

Commit 0b4f2d4

Browse files
committed
Fix test_compression: actually set negative values before asserting
The negative-value loop was missing the assignment, so it asserted against the stale value (9) left by the previous loop. Also remove a Ruby 1.8 workaround comment.
1 parent 3e95cfa commit 0b4f2d4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/test_document.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ def test_compression
4343
end
4444

4545
10.upto(20) do |i|
46-
# assert_equal(9, @doc.compression = i)
47-
assert_equal(i, @doc.compression = i) # This works around a bug in Ruby 1.8
46+
assert_equal(i, @doc.compression = i)
4847
assert_equal(9, @doc.compression)
4948
end
5049

5150
-1.downto(-10) do |i|
51+
@doc.compression = i
5252
assert_equal(0, @doc.compression)
5353
end
5454
end

0 commit comments

Comments
 (0)