aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederick Cheung <frederick.cheung@gmail.com>2008-12-15 11:49:08 -0600
committerJoshua Peek <josh@joshpeek.com>2008-12-15 11:49:08 -0600
commit7c18518105e98ccfd89fe64194ede27824dfe8b3 (patch)
tree0ee5bd2949dc0014fba83bb5d5ebeaef86fab89f
parent38412ecb5daa1826574ad0f132d23dc2ef4288bf (diff)
downloadrails-7c18518105e98ccfd89fe64194ede27824dfe8b3.tar.gz
rails-7c18518105e98ccfd89fe64194ede27824dfe8b3.tar.bz2
rails-7c18518105e98ccfd89fe64194ede27824dfe8b3.zip
Properly parenthasize calls to defined?(Rails) in 75fa82418 [#1563 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
-rw-r--r--actionpack/lib/action_controller/failsafe.rb2
-rw-r--r--activesupport/lib/active_support/dependencies.rb2
-rw-r--r--activesupport/lib/active_support/deprecation.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/failsafe.rb b/actionpack/lib/action_controller/failsafe.rb
index 1cd649b2e1..b1e9957b49 100644
--- a/actionpack/lib/action_controller/failsafe.rb
+++ b/actionpack/lib/action_controller/failsafe.rb
@@ -42,7 +42,7 @@ module ActionController
end
def failsafe_logger
- if defined? Rails && Rails.logger
+ if defined?(Rails) && Rails.logger
Rails.logger
else
Logger.new($stderr)
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 23b7aee514..7ce9adec2c 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -559,7 +559,7 @@ module ActiveSupport #: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
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb
index f18ea197a5..25b26e9c96 100644
--- a/activesupport/lib/active_support/deprecation.rb
+++ b/activesupport/lib/active_support/deprecation.rb
@@ -13,7 +13,7 @@ module ActiveSupport
$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
}