Skip to content

Commit

Permalink
Ignore frozen string literal warning in ruby-head(3.4.0dev) and the P…
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick authored Mar 20, 2024
1 parent 971901c commit a113d11
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

require 'stringio'
require 'warning'
require 'prettyprint'

# How to use => https://test-unit.github.io/test-unit/en/
require 'test/unit'
Expand All @@ -14,13 +15,16 @@
Warning.ignore(//, path)
end

# https://github.com/kachick/irb-power_assert/issues/176
# https://github.com/ruby/ruby/blob/e5b585ba908d371c67d97988795a5e40ec2f9e93/lib/prettyprint.rb#L184
Warning.ignore(/literal string will be frozen in the future/, PrettyPrint.instance_method(:text).source_location.first)

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 a113d11

Please sign in to comment.