[前][次][番号順一覧][スレッド一覧]

ruby-changes:61362

From: aycabta <ko1@a...>
Date: Sun, 24 May 2020 23:53:15 +0900 (JST)
Subject: [ruby-changes:61362] 37b8a7afca (master): [ruby/rdoc] Add instance_methods because instance_method_list should be obsolete

https://git.ruby-lang.org/ruby.git/commit/?id=37b8a7afca

From 37b8a7afca9ccc01ba6520511cfc87198db9acbb Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Thu, 21 May 2020 22:58:50 +0900
Subject: [ruby/rdoc] Add instance_methods because instance_method_list should
 be obsolete

https://github.com/ruby/rdoc/commit/9b1da32254

diff --git a/lib/rdoc/context.rb b/lib/rdoc/context.rb
index 6caf0d6..7d5ea98 100644
--- a/lib/rdoc/context.rb
+++ b/lib/rdoc/context.rb
@@ -992,11 +992,19 @@ class RDoc::Context < RDoc::CodeObject https://github.com/ruby/ruby/blob/trunk/lib/rdoc/context.rb#L992
 
   ##
   # Instance methods
+
+  def instance_methods
+    @instance_methods ||= method_list.reject { |a| a.singleton }
+  end
+
+  ##
+  # Instance methods
   #--
-  # TODO rename to instance_methods
+  # TODO remove this later
 
   def instance_method_list
-    @instance_method_list ||= method_list.reject { |a| a.singleton }
+    @instance_methods ||= method_list.reject { |a| a.singleton }
+    warn '#instance_method_list is obsoleted, please use #instance_methods'
   end
 
   ##
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]