safeguard against uninitialized DEBUGLIST variable

Fixes #2668
This commit is contained in:
Joao Duarte 2015-02-23 11:22:42 +00:00 committed by Jordan Sissel
parent 9561ade035
commit c0558b0318
2 changed files with 2 additions and 2 deletions

View file

@ -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
#

View file

@ -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