Skip to content

Instantly share code, notes, and snippets.

@beauraF

beauraF/warning.rb

Last active Oct 13, 2020
Embed
What would you like to do?
# frozen_string_literal: true
Warning.singleton_class.prepend(
Module.new do
DISABLED_WARNINGS = Regexp.union(
/_pry_ is deprecated, use pry_instance instead/,
/warning: The called method( `.+')? is defined here/,
)
def warn(warning)
super unless warning.match?(DISABLED_WARNINGS)
end
end
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.