diff options
author | Peter Zhu <peter@peterzhu.ca> | 2023-08-26 09:56:44 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-08-26 13:56:51 +0000 |
commit | a97dedf761c6931cbb2b9267faad2395481a3f57 (patch) | |
tree | b51a6963a803abdfbd26b53efb0d73b087f8f375 | |
parent | 9ea9f992487711fa1a66637edcaf1327d0cd5099 (diff) |
[ruby/irb] Fix deprecation test when ran multiple times
(https://github.com/ruby/irb/pull/695)
https://github.com/ruby/irb/commit/ae0e5bb80f
-rw-r--r-- | test/irb/test_ruby_lex.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/irb/test_ruby_lex.rb b/test/irb/test_ruby_lex.rb index 336f4fd366..09344e1b0e 100644 --- a/test/irb/test_ruby_lex.rb +++ b/test/irb/test_ruby_lex.rb @@ -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 |