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

ruby-changes:74261

From: st0012 <ko1@a...>
Date: Wed, 26 Oct 2022 23:44:50 +0900 (JST)
Subject: [ruby-changes:74261] 40f8a781a3 (master): [ruby/irb] Extract without_rdoc helper

https://git.ruby-lang.org/ruby.git/commit/?id=40f8a781a3

From 40f8a781a39042cdccd641fef6e10cb2c8d98c41 Mon Sep 17 00:00:00 2001
From: st0012 <stan001212@g...>
Date: Mon, 24 Oct 2022 23:08:32 +0100
Subject: [ruby/irb] Extract without_rdoc helper

---
 test/irb/test_input_method.rb | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/test/irb/test_input_method.rb b/test/irb/test_input_method.rb
index 05580256fa..0e1af7bdc7 100644
--- a/test/irb/test_input_method.rb
+++ b/test/irb/test_input_method.rb
@@ -86,19 +86,6 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_input_method.rb#L86
     ensure
       Reline.add_dialog_proc(:show_doc, original_show_doc_proc, Reline::DEFAULT_DIALOG_CONTEXT)
     end
-
-    def without_rdoc(&block)
-      ::Kernel.send(:alias_method, :old_require, :require)
-
-      ::Kernel.define_method(:require) do |name|
-        raise LoadError, "cannot load such file -- rdoc (test)" if name == "rdoc"
-        original_require(name)
-      end
-
-      yield
-    ensure
-      ::Kernel.send(:alias_method, :require, :old_require)
-    end
   end
 end
 
-- 
cgit v1.2.3


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

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