ruby-changes:39196
From: nobu <ko1@a...>
Date: Fri, 17 Jul 2015 15:38:42 +0900 (JST)
Subject: [ruby-changes:39196] nobu:r51277 (trunk): test_range.rb: add Range#new test
nobu 2015-07-17 15:37:05 +0900 (Fri, 17 Jul 2015) New Revision: 51277 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51277 Log: test_range.rb: add Range#new test * test/ruby/test_range.rb (test_first_last): Add test for `Range.new`. [Fix GH-971] Modified files: trunk/ChangeLog trunk/test/ruby/test_range.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 51276) +++ ChangeLog (revision 51277) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jul 17 15:36:52 2015 yui-knk <spiketeika@g...> + + * 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@g...> * test/ruby/test_range.rb (test_first_last): Add assertions to Index: test/ruby/test_range.rb =================================================================== --- test/ruby/test_range.rb (revision 51276) +++ test/ruby/test_range.rb (revision 51277) @@ -4,6 +4,12 @@ require 'timeout' https://github.com/ruby/ruby/blob/trunk/test/ruby/test_range.rb#L4 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/