diff options
author | Sergey Nartimov <just.lest@gmail.com> | 2011-12-29 10:50:15 +0300 |
---|---|---|
committer | Sergey Nartimov <just.lest@gmail.com> | 2011-12-29 13:26:52 +0300 |
commit | 952e9d9005b775827b17227e040499d0324bb928 (patch) | |
tree | 41d1b45445e18cbaa17ea554038e568920b15df5 /activesupport/test | |
parent | afd9512c0b4ff98f3fec2ff9fd78d430b2ace974 (diff) | |
download | rails-952e9d9005b775827b17227e040499d0324bb928.tar.gz rails-952e9d9005b775827b17227e040499d0324bb928.tar.bz2 rails-952e9d9005b775827b17227e040499d0324bb928.zip |
refactor Range#include? to handle ranges with floats
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/range_ext_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/range_ext_test.rb b/activesupport/test/core_ext/range_ext_test.rb index f4b773e5fb..7a620305f3 100644 --- a/activesupport/test/core_ext/range_ext_test.rb +++ b/activesupport/test/core_ext/range_ext_test.rb @@ -53,6 +53,10 @@ class RangeTest < Test::Unit::TestCase assert !(2..8).include?(5..9) end + def test_should_include_identical_exclusive_with_floats + assert (1.0...10.0).include?(1.0...10.0) + end + def test_blockless_step assert_equal [1,3,5,7,9], (1..10).step(2) end |