[ruby/irb] Fix deprecation test when ran multiple times

(https://github.com/ruby/irb/pull/695)

https://github.com/ruby/irb/commit/ae0e5bb80f
This commit is contained in:
Peter Zhu 2023-08-26 09:56:44 -04:00 committed by git
parent 9ea9f99248
commit a97dedf761

View File

@ -203,11 +203,10 @@ module TestIRB
end
def test_initialising_the_old_top_level_ruby_lex
_, err = capture_output do
assert_in_out_err(["--disable-gems", "-W:deprecated"], <<~RUBY, [], /warning: constant ::RubyLex is deprecated/)
require "irb"
::RubyLex.new(nil)
end
assert_match(/warning: constant ::RubyLex is deprecated/, err)
RUBY
end
private