This project is archived and is in readonly mode.

#829 ✓resolved
Frederick Cheung

Classes should not be duplicable

Reported by Frederick Cheung | August 14th, 2008 @ 02:50 PM | in 2.x

Classes are currently marked as duplicable and so class_inheritable_accessor calls dup on them which causes no end of trouble. Among other things a duped class doesn't have a name. It also means that

class Foo
  class_inheritable_accessor :some_class

Foo.some_class = Bar
Foo.some_class == Bar #=> false

which guarantees you AssociationTypeMismatch errors and other niceties

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by