method
warn
v8.1.1 -
Show latest stable
- Class:
RailsStrictWarnings
warn(message, ...)public
No documentation available.
# File tools/strict_warnings.rb, line 25
def warn(message, ...)
return if SUPPRESSED_WARNINGS.match?(message)
super
testpath = message[/test\/.*\.rb/]&.chomp || message
return unless message.include?(PROJECT_ROOT) || Pathname.new(testpath).exist?
return if ALLOWED_WARNINGS.match?(message)
return unless ENV["RAILS_STRICT_WARNINGS"] || ENV["BUILDKITE"]
raise WarningError.new(message)
end