diff --git a/lib/logstash/patches/cabin.rb b/lib/logstash/patches/cabin.rb index e47cbb5ba..63b5f6e15 100644 --- a/lib/logstash/patches/cabin.rb +++ b/lib/logstash/patches/cabin.rb @@ -1,4 +1,4 @@ -if ENV["PROFILE_BAD_LOG_CALLS"] || $DEBUGLIST.include?("log") +if ENV["PROFILE_BAD_LOG_CALLS"] || ($DEBUGLIST || []).include?("log") # Set PROFILE_BAD_LOG_CALLS=1 in your environment if you want # to track down logger calls that cause performance problems # diff --git a/lib/logstash/patches/profile_require_calls.rb b/lib/logstash/patches/profile_require_calls.rb index 683c0a106..0eb2f2fcc 100644 --- a/lib/logstash/patches/profile_require_calls.rb +++ b/lib/logstash/patches/profile_require_calls.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -if $DEBUGLIST.include?("require") +if ($DEBUGLIST || []).include?("require") ROOT = File.dirname(__FILE__) module Kernel alias_method :require_debug, :require