Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
BuonOmo committed Feb 17, 2024
1 parent cca8367 commit f0239dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/support/copy_cat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
module CopyCat
module NoWarnRewrite
def warn(message, category: nil, **kwargs)
pp(Enumerator.new { |y|
m = Warning.method(:warn)
y << m
y << m while m = m.super_method
}.to_a)
if /method redefined; discarding old|previous definition of/.match?(message) &&
caller_locations.any? { _1.path.end_with?("test/support/copy_cat.rb") && _1.label == "copy_methods" }
# ignore
Expand Down

0 comments on commit f0239dd

Please sign in to comment.