1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_range.rb: add Range#last assertions

* test/ruby/test_range.rb (test_first_last): Add assertions to
  test of `Range#last` with exclude_end true case.  [Fix GH-970]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-07-17 06:36:42 +00:00
parent 3ee156c7a3
commit e2a87e8bc3
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Fri Jul 17 15:36:40 2015 yui-knk <spiketeika@gmail.com>
* test/ruby/test_range.rb (test_first_last): Add assertions to
test of `Range#last` with exclude_end true case. [Fix GH-970]
Fri Jul 17 09:59:14 2015 Eric Wong <e@80x24.org>
* thread.c (rb_thread_alone): simplify

View file

@ -265,7 +265,10 @@ class TestRange < Test::Unit::TestCase
assert_equal([0, 1, 2], (0...10).first(3))
assert_equal([7, 8, 9], (0...10).last(3))
assert_equal(0, (0...10).first)
assert_equal(10, (0...10).last)
assert_equal("a", ("a"..."c").first)
assert_equal("c", ("a"..."c").last)
assert_equal(0, (2...0).last)
end
def test_to_s