mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-09-04 20:18:27 +02:00
Add guard clause to ruby warning supression
This commit is contained in:
parent
6c75ced38f
commit
7aa02ca4af
@ -9,7 +9,9 @@ require 'pathname'
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
# TODO: Temporary until warnings can be turned on only for developers to prevent confusion for end users
|
# 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
|
# @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')
|
require Pathname.new(__FILE__).realpath.expand_path.parent.join('config', 'boot')
|
||||||
|
Loading…
Reference in New Issue
Block a user