Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Properly parenthasize calls to defined?(Rails) in 75fa824 [#1563 stat…

…e:resolved]

Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information...
commit 7c18518105e98ccfd89fe64194ede27824dfe8b3 1 parent 38412ec
@fcheung fcheung authored josh committed
View
2  actionpack/lib/action_controller/failsafe.rb
@@ -42,7 +42,7 @@ def log_failsafe_exception(exception)
end
def failsafe_logger
- if defined? Rails && Rails.logger
+ if defined?(Rails) && Rails.logger
Rails.logger
else
Logger.new($stderr)
View
2  activesupport/lib/active_support/dependencies.rb
@@ -559,7 +559,7 @@ class LoadingModule #:nodoc:
# Old style environment.rb referenced this method directly. Please note, it doesn't
# actually *do* anything any more.
def self.root(*args)
- if defined? Rails && Rails.logger
+ if defined?(Rails) && Rails.logger
Rails.logger.warn "Your environment.rb uses the old syntax, it may not continue to work in future releases."
Rails.logger.warn "For upgrade instructions please see: http://manuals.rubyonrails.com/read/book/19"
end
View
2  activesupport/lib/active_support/deprecation.rb
@@ -13,7 +13,7 @@ module Deprecation #:nodoc:
$stderr.puts callstack.join("\n ") if debug
},
'development' => Proc.new { |message, callstack|
- logger = defined? Rails ? Rails.logger : Logger.new($stderr)
+ logger = defined?(Rails) ? Rails.logger : Logger.new($stderr)
logger.warn message
logger.debug callstack.join("\n ") if debug
}
Please sign in to comment.
Something went wrong with that request. Please try again.