From 9a650a6547d2a83004db1bf913e26a8daa1c0b6e Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 28 Dec 2009 16:28:26 -0800 Subject: Silence some trivial warnings: shadowed local vars, indentation mismatches --- actionpack/lib/abstract_controller/layouts.rb | 2 +- actionpack/lib/abstract_controller/localized_cache.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/abstract_controller') diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb index 46760bba7c..4073e9b386 100644 --- a/actionpack/lib/abstract_controller/layouts.rb +++ b/actionpack/lib/abstract_controller/layouts.rb @@ -20,7 +20,7 @@ module AbstractController end def clear_template_caches! - @found_layouts.clear if @found_layouts + @found_layouts.clear if defined? @found_layouts super end diff --git a/actionpack/lib/abstract_controller/localized_cache.rb b/actionpack/lib/abstract_controller/localized_cache.rb index ee7b43cb9f..bf648af60a 100644 --- a/actionpack/lib/abstract_controller/localized_cache.rb +++ b/actionpack/lib/abstract_controller/localized_cache.rb @@ -1,6 +1,6 @@ module AbstractController class HashKey - @hash_keys = Hash.new {|h,k| h[k] = Hash.new {|h,k| h[k] = {} } } + @hash_keys = Hash.new {|h,k| h[k] = Hash.new {|sh,sk| sh[sk] = {} } } def self.get(klass, formats, locale) @hash_keys[klass][formats][locale] ||= new(klass, formats, locale) -- cgit v1.2.3