Skip to content

Commit

Permalink
we only support 1.9+, so just check for a name
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Jun 18, 2013
1 parent 56cb34d commit a95ffad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/dependencies.rb
Expand Up @@ -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
Expand Down

0 comments on commit a95ffad

Please sign in to comment.