Navigation Menu

Skip to content

Commit

Permalink
Properly parenthasize calls to defined?(Rails) in 75fa824 [#1563 stat…
Browse files Browse the repository at this point in the history
…e:resolved]

Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information
fcheung authored and josh committed Dec 15, 2008
1 parent 38412ec commit 7c18518
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/failsafe.rb
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/dependencies.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/deprecation.rb
Expand Up @@ -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
}
Expand Down

0 comments on commit 7c18518

Please sign in to comment.