From 16457d4b96e3f0f368ca45abb6d1fa0b45a30e02 Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 5 Aug 2005 23:56:02 +0000 Subject: [PATCH] add exclude_end? method to DuckRange. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_range.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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