diff options
author | st0012 <stan001212@gmail.com> | 2022-10-24 23:08:32 +0100 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2022-10-26 10:44:03 -0400 |
commit | 40f8a781a39042cdccd641fef6e10cb2c8d98c41 (patch) | |
tree | d9259e5ffc9875de20fb3f231efba8f3be37c746 /test | |
parent | b795e66a2d085d0bb54eaf51cbc0df3d377d3618 (diff) |
[ruby/irb] Extract without_rdoc helper
Diffstat (limited to 'test')
-rw-r--r-- | test/irb/test_input_method.rb | 13 |
1 files changed, 0 insertions, 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 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 |