Permalink
Browse files

we only support 1.9+, so just check for a name

  • Loading branch information...
1 parent 56cb34d commit a95ffadc14e757f91b3f18533bc442d141e77e39 @tenderlove tenderlove committed Jun 18, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/dependencies.rb
@@ -634,7 +634,7 @@ def to_constant_name(desc) #:nodoc:
when String then desc.sub(/^::/, '')
when Symbol then desc.to_s
when Module
- desc.name.presence ||
+ desc.name ||
raise(ArgumentError, "Anonymous modules have no name to be referenced by")
else raise TypeError, "Not a valid constant descriptor: #{desc.inspect}"
end

0 comments on commit a95ffad

Please sign in to comment.