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:
parent
d9498f743b
commit
16457d4b96
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue