diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-05 23:56:02 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-05 23:56:02 +0000 |
commit | 16457d4b96e3f0f368ca45abb6d1fa0b45a30e02 (patch) | |
tree | f92abb135386ecb4c52e0bbae9c5ad3fc8e267cf | |
parent | d9498f743b8a0e361908d62ae429f7719124170a (diff) | |
download | ruby-16457d4b96e3f0f368ca45abb6d1fa0b45a30e02.tar.gz |
add exclude_end? method to DuckRange.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_range.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb index 1d25e7c311..f0e0da2fd6 100644 --- a/test/ruby/test_range.rb +++ b/test/ruby/test_range.rb @@ -16,11 +16,16 @@ class TestRange < Test::Unit::TestCase end class DuckRange - def initialize(b,e) + def initialize(b,e,excl=false) @begin = b @end = e + @excl = excl end attr_reader :begin, :end + + def exclude_end? + @excl + end end def test_duckrange |