1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

This commit is contained in:
Aaron Patterson 2013-06-17 17:50:11 -07:00
parent 56cb34d8e5
commit a95ffadc14

View file

@ -634,7 +634,7 @@ module ActiveSupport #: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