Skip to content

Commit

Permalink
Revert as avoiding in test
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Mar 20, 2024
1 parent a14a5f3 commit 8b37fdb
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,16 @@
Warning[:experimental] = true

Gem.path.each do |path|
# https://github.com/ruby/ruby/blob/e5b585ba908d371c67d97988795a5e40ec2f9e93/lib/prettyprint.rb#L184
Warning.ignore(/literal string will be frozen in the future/, path)
Warning.ignore(//, path)
end

Warning.process do |warning|
# https://bugs.ruby-lang.org/issues/20205
# https://github.com/kachick/irb-power_assert/issues/176
next :default if RUBY_VERSION >= '3.4' && /literal string will be frozen in the future/.match?(warning)

Warning.process do |_warning|
:raise
end

require_relative '../lib/irb-power_assert'


class Test::Unit::TestCase
# Taken from https://github.com/ruby/irb/blob/ad08152c43d4309ee4dec3bbaf361ffc338c1f46/test/lib/minitest/unit.rb#L461-L495, thank you!
def capture_io
Expand Down

0 comments on commit 8b37fdb

Please sign in to comment.