diff options
author | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2019-10-10 11:33:44 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-10-26 09:25:17 +0900 |
commit | f625a4be3c8f159e97f859785d95d50550b3edca (patch) | |
tree | 9d81281da0dc9453b780c4fdad3b17144263c06e /test | |
parent | 00989770535cfe69e618a2c556dad44610042e13 (diff) | |
download | ruby-f625a4be3c8f159e97f859785d95d50550b3edca.tar.gz |
[ruby/forwardable] Fix NoMethodError on ruby 2.4 or earlier
https://github.com/ruby/forwardable/runs/242918994#step:5:12
```
Error: test_obj_single_delegators_send_id(TestForwardable): NoMethodError: private method `attr_reader' called for #<Class:#<Object:0x00005605af501f58>>
```
https://github.com/ruby/forwardable/commit/711bbb2466
Diffstat (limited to 'test')
-rw-r--r-- | test/test_forwardable.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_forwardable.rb b/test/test_forwardable.rb index 2c91d6f87c..2c0face3ba 100644 --- a/test/test_forwardable.rb +++ b/test/test_forwardable.rb @@ -230,7 +230,7 @@ class TestForwardable < Test::Unit::TestCase def test_obj_single_delegators_send_id %i[def_delegators def_single_delegators].each do |m| obj = single_forwardable_object do - singleton_class.attr_reader :receiver + singleton_class.__send__ :attr_reader, :receiver __send__ m, :@receiver, :__send__, :__id__ end |