rails/rails — pull request #3744 by qoobaa (2011-11-24 14:41:37+00:00)
Title: Make ActiveModel::Name fail gracefully with anonymous classes

Defines behavior for cases described in #2586. Without the patch the behavior is different on Ruby 1.8 and 1.9:

1.8: ArgumentError: interning empty string
1.9: TypeError: can't convert nil into String

... which is not really helpful. ActiveModel::Name can be used with anonymous classes only when a name argument is given.