diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-25 05:23:54 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-25 05:23:54 +0000 |
commit | c22d62485fd20fbd4f79b026b7a03314caa0f81c (patch) | |
tree | e8a1ff4504195a8fe1a71ed51221466d402dc5bc /test | |
parent | dd73ab14e7a931d7e452320ad212bdc4450cfcae (diff) | |
download | ruby-c22d62485fd20fbd4f79b026b7a03314caa0f81c.tar.gz |
range.c: use rb_check_funcall
* range.c (rb_range_values): use rb_check_funcall instead of
calling rb_respond_to then rb_funcall, and allow `begin` and
`end` to be private as well as other internal conversions.
[ruby-core:83541] [Bug #14048]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_range.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb index 5823810f33..77d026c912 100644 --- a/test/ruby/test_range.rb +++ b/test/ruby/test_range.rb @@ -393,6 +393,9 @@ class TestRange < Test::Unit::TestCase o.exclude_end = false assert_nil([0][o]) assert_raise(RangeError) { [0][o] = 1 } + class << o + private :begin, :end + end o.begin = 10 o.end = 10 assert_nil([0][o]) |