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

add exclude_end? method to DuckRange.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2005-08-05 23:56:02 +00:00
parent d9498f743b
commit 16457d4b96

View file

@ -16,11 +16,16 @@ class TestRange < Test::Unit::TestCase
end end
class DuckRange class DuckRange
def initialize(b,e) def initialize(b,e,excl=false)
@begin = b @begin = b
@end = e @end = e
@excl = excl
end end
attr_reader :begin, :end attr_reader :begin, :end
def exclude_end?
@excl
end
end end
def test_duckrange def test_duckrange