Skip to content

Commit

Permalink
Require test/lib helpers from main test helper (#595)
Browse files Browse the repository at this point in the history
Because they are handled differently in `ruby/irb` and `ruby/ruby`.
  • Loading branch information
st0012 authored Jun 2, 2023
1 parent b06611d commit 625f759
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions test/irb/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

begin
require_relative "../lib/helper"
require_relative "../lib/envutil"
rescue LoadError # ruby/ruby defines helpers differently
end

Expand Down Expand Up @@ -66,10 +67,6 @@ def without_rdoc(&block)

yield
ensure
begin
require_relative "../lib/envutil"
rescue LoadError # ruby/ruby defines EnvUtil differently
end
EnvUtil.suppress_warning {
::Kernel.send(:alias_method, :require, :irb_original_require)
::Kernel.undef_method :irb_original_require
Expand Down
1 change: 0 additions & 1 deletion test/irb/test_debug_cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
require "tempfile"
require "tmpdir"

require_relative "../lib/envutil"
require_relative "helper"

module TestIRB
Expand Down

0 comments on commit 625f759

Please sign in to comment.