diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-25 01:40:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-25 01:40:15 +0000 |
commit | 0ba049256e1b8b17f68c45266396ed1e3976481b (patch) | |
tree | 401a744bf49a200f1cd80a27e26ff5264107deaf /test/ruby/test_range.rb | |
parent | bb2aa9b3434cc92dd7acf40ce26d12672aaf6597 (diff) | |
download | ruby-0ba049256e1b8b17f68c45266396ed1e3976481b.tar.gz |
range.c: check if exclude_end? is defined
* range.c (rb_range_values): should raise TypeError if necessary
method is not defined, not NoMethodError, when trying to tell if
the object is a Range and extract info.
[ruby-core:83541] [Bug #14048]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_range.rb')
-rw-r--r-- | test/ruby/test_range.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb index 66c4682d8d..5823810f33 100644 --- a/test/ruby/test_range.rb +++ b/test/ruby/test_range.rb @@ -387,7 +387,7 @@ class TestRange < Test::Unit::TestCase assert_raise(TypeError) { [][o] } class << o; attr_accessor :end end o.end = 0 - assert_raise(NoMethodError) { [][o] } + assert_raise(TypeError) { [][o] } def o.exclude_end=(v) @exclude_end = v end def o.exclude_end?() @exclude_end end o.exclude_end = false |