summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_range.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb
index 0600f694f7..ca0e155f3d 100644
--- a/test/ruby/test_range.rb
+++ b/test/ruby/test_range.rb
@@ -417,6 +417,9 @@ class TestRange < Test::Unit::TestCase
v = (-inf..0).bsearch {|x| x > -Float::MAX }
assert_operator(-Float::MAX, :<, v)
assert_equal(nil, v.infinite?)
+
+ assert_in_delta(1.0, (0.0..inf).bsearch {|x| Math.log(x) >= 0 })
+ assert_in_delta(7.0, (0.0..10).bsearch {|x| 7.0 - x })
end
def test_bsearch_for_bignum