From bd3fde093112275bef5ab71bfac7ca17e43af8b8 Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Fri, 20 Jun 2014 09:55:41 -0400 Subject: Add regression test for NameError#name --- activesupport/lib/active_support/dependencies.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index d7db0d6648..a8d12366cc 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -187,7 +187,7 @@ module ActiveSupport #:nodoc: # top-level constant. def guess_for_anonymous(const_name) if Object.const_defined?(const_name) - raise NameError.new "#{const_name} cannot be autoloaded from an anonymous class or module", const_name + raise NameError.new "#{const_name} cannot be autoloaded from an anonymous class or module", const_name.to_s else Object end -- cgit v1.2.3