From 3f1caaf23a60df82a72873b4bfce4dc47aa51029 Mon Sep 17 00:00:00 2001 From: kennyj Date: Sat, 19 May 2012 23:54:52 +0900 Subject: Fix warning: shadowing outer local variable - constant. --- activesupport/lib/active_support/inflector/methods.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index e5b0cf4f9e..2acc6ddee5 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -212,10 +212,10 @@ module ActiveSupport # Go down the ancestors to check it it's owned # directly before we reach Object or the end of ancestors. - constant = constant.ancestors.inject do |constant, ancestor| - break constant if ancestor == Object + constant = constant.ancestors.inject do |const, ancestor| + break const if ancestor == Object break ancestor if ancestor.const_defined?(name, false) - constant + const end # owner is in Object, so raise -- cgit v1.2.3