mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* range.c (range_each): should honor to_str conversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a5aefa661e
commit
554786aedc
3 changed files with 22 additions and 11 deletions
|
@ -1,4 +1,5 @@
|
|||
require 'test/unit'
|
||||
require 'delegate'
|
||||
|
||||
class TestRange < Test::Unit::TestCase
|
||||
def test_range_string
|
||||
|
@ -13,6 +14,8 @@ class TestRange < Test::Unit::TestCase
|
|||
assert_equal(["6", "7", "8"], ("6".."8").to_a, "[ruby-talk:343187]")
|
||||
assert_equal(["6", "7"], ("6"..."8").to_a)
|
||||
assert_equal(["9", "10"], ("9".."10").to_a)
|
||||
assert_equal(["9", "10"], (SimpleDelegator.new("9").."10").to_a)
|
||||
assert_equal(["9", "10"], ("9"..SimpleDelegator.new("10")).to_a)
|
||||
end
|
||||
|
||||
def test_evaluation_order
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue