Skip to content
This repository
Browse code

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
Frederick Cheung authored December 15, 2008 josh committed December 15, 2008
2  actionpack/lib/action_controller/failsafe.rb
@@ -42,7 +42,7 @@ def log_failsafe_exception(exception)
42 42
       end
43 43
 
44 44
       def failsafe_logger
45  
-        if defined? Rails && Rails.logger
  45
+        if defined?(Rails) && Rails.logger
46 46
           Rails.logger
47 47
         else
48 48
           Logger.new($stderr)
2  activesupport/lib/active_support/dependencies.rb
@@ -559,7 +559,7 @@ class LoadingModule #:nodoc:
559 559
       # Old style environment.rb referenced this method directly.  Please note, it doesn't
560 560
       # actually *do* anything any more.
561 561
       def self.root(*args)
562  
-        if defined? Rails && Rails.logger
  562
+        if defined?(Rails) && Rails.logger
563 563
           Rails.logger.warn "Your environment.rb uses the old syntax, it may not continue to work in future releases."
564 564
           Rails.logger.warn "For upgrade instructions please see: http://manuals.rubyonrails.com/read/book/19"
565 565
         end
2  activesupport/lib/active_support/deprecation.rb
@@ -13,7 +13,7 @@ module Deprecation #:nodoc:
13 13
                          $stderr.puts callstack.join("\n  ") if debug
14 14
                        },
15 15
       'development' => Proc.new { |message, callstack|
16  
-                         logger = defined? Rails ? Rails.logger : Logger.new($stderr)
  16
+                         logger = defined?(Rails) ? Rails.logger : Logger.new($stderr)
17 17
                          logger.warn message
18 18
                          logger.debug callstack.join("\n  ") if debug
19 19
                        }

0 notes on commit 7c18518

Please sign in to comment.
Something went wrong with that request. Please try again.