Skip to content

Commit

Permalink
[ruby/irb] Extract without_rdoc helper
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 authored and peterzhu2118 committed Oct 26, 2022
1 parent b795e66 commit 40f8a78
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions test/irb/test_input_method.rb
Expand Up @@ -86,19 +86,6 @@ def test_initialization_with_use_autocomplete_but_without_rdoc
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

0 comments on commit 40f8a78

Please sign in to comment.