diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-02 00:45:09 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-02 00:45:09 -0300 |
commit | 7c6861b0bc85077ed1f1dcb4a919de0f1b8d490d (patch) | |
tree | 8f7319a922ff5124985f11e6908afdadbe32f8d1 /activesupport/lib/active_support/core_ext | |
parent | 8a1c3476a62005e3cb7cfe440da71b94fab8aa5b (diff) | |
download | rails-7c6861b0bc85077ed1f1dcb4a919de0f1b8d490d.tar.gz rails-7c6861b0bc85077ed1f1dcb4a919de0f1b8d490d.tar.bz2 rails-7c6861b0bc85077ed1f1dcb4a919de0f1b8d490d.zip |
Do not check only for the Rails constant
This constant may be define for auxiliar gems like rails-html-sanitizer
and these methods call will fail.
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/kernel/debugger.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/kernel/debugger.rb b/activesupport/lib/active_support/core_ext/kernel/debugger.rb index d8bb461010..ddf66b2022 100644 --- a/activesupport/lib/active_support/core_ext/kernel/debugger.rb +++ b/activesupport/lib/active_support/core_ext/kernel/debugger.rb @@ -3,7 +3,7 @@ module Kernel # Starts a debugging session if the +debugger+ gem has been loaded (call rails server --debugger to load it). def debugger message = "\n***** Debugger requested, but was not available (ensure the debugger gem is listed in Gemfile/installed as gem): Start server with --debugger to enable *****\n" - defined?(Rails) ? Rails.logger.info(message) : $stderr.puts(message) + defined?(Rails.logger) ? Rails.logger.info(message) : $stderr.puts(message) end alias breakpoint debugger unless respond_to?(:breakpoint) end |