Skip to content

Instantly share code, notes, and snippets.

@beauraF
Last active October 13, 2020 15:49
Show Gist options
  • Save beauraF/be2b6fcdec71bfd314d69774ea0b6620 to your computer and use it in GitHub Desktop.
Save beauraF/be2b6fcdec71bfd314d69774ea0b6620 to your computer and use it in GitHub Desktop.
# 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