1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-07-18 18:31:41 +02:00

Add guard clause to ruby warning supression

This commit is contained in:
Alan Foster 2020-04-29 14:33:19 +01:00
parent 6c75ced38f
commit 7aa02ca4af
No known key found for this signature in database
GPG Key ID: 3BD4FA3818818F04

View File

@ -9,7 +9,9 @@ require 'pathname'
begin
# TODO: Temporary until warnings can be turned on only for developers to prevent confusion for end users
Warning[:deprecated] = false
if defined?(Warning) && Warning.respond_to?(:[]=)
Warning[:deprecated] = false
end
# @see https://github.com/rails/rails/blob/v3.2.17/railties/lib/rails/generators/rails/app/templates/script/rails#L3-L5
require Pathname.new(__FILE__).realpath.expand_path.parent.join('config', 'boot')