rails/rails — pull request #3746 by qoobaa (2011-11-24 14:54:48+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:

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

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