ruby-changes:58443
From: Kazuhiro <ko1@a...>
Date: Sat, 26 Oct 2019 09:29:15 +0900 (JST)
Subject: [ruby-changes:58443] f625a4be3c (master): [ruby/forwardable] Fix NoMethodError on ruby 2.4 or earlier
https://git.ruby-lang.org/ruby.git/commit/?id=f625a4be3c From f625a4be3c8f159e97f859785d95d50550b3edca Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Thu, 10 Oct 2019 11:33:44 +0900 Subject: [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 diff --git a/test/test_forwardable.rb b/test/test_forwardable.rb index 2c91d6f..2c0face 100644 --- a/test/test_forwardable.rb +++ b/test/test_forwardable.rb @@ -230,7 +230,7 @@ class TestForwardable < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_forwardable.rb#L230 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/