aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_range.rb6
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6fd8185b41..99ea4a96ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jul 17 15:36:52 2015 yui-knk <spiketeika@gmail.com>
+
+ * test/ruby/test_range.rb (test_first_last): Add test for
+ `Range.new`. [Fix GH-971]
+
Fri Jul 17 15:36:40 2015 yui-knk <spiketeika@gmail.com>
* test/ruby/test_range.rb (test_first_last): Add assertions to
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb
index 9b8bdca6e3..e544caf984 100644
--- a/test/ruby/test_range.rb
+++ b/test/ruby/test_range.rb
@@ -4,6 +4,12 @@ require 'timeout'
require 'bigdecimal'
class TestRange < Test::Unit::TestCase
+ def test_new
+ assert_equal((0..2), Range.new(0, 2))
+ assert_equal((0..2), Range.new(0, 2, false))
+ assert_equal((0...2), Range.new(0, 2, true))
+ end
+
def test_range_string
# XXX: Is this really the test of Range?
assert_equal([], ("a" ... "a").to_a)