Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Class and Module are duplicable #1028

Closed
lighthouse-import opened this issue May 16, 2011 · 1 comment
Closed

[PATCH] Class and Module are duplicable #1028

lighthouse-import opened this issue May 16, 2011 · 1 comment

Comments

@lighthouse-import
Copy link

Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/6708
Created by Sebastian Martinez - 2011-04-18 00:19:22 UTC

In active_support/core_ext/object/duplicable.rb says that either Class and Module are not duplicable.
If you run on the console:

Class.new.duplicable?
 => false 
Module.new.duplicable?
 => false 

but, if you do

Class.new.dup
 => #<Class:0x00000102983160>
Module.new.dup
 => #<Module:0x00000102976988>

Also DuplicableTest is not really testing if it raises an Exception.
Marked Class and Module as duplicable (as they are now) and fixed the test.

@lighthouse-import
Copy link
Author

Attachments saved to Gist: http://gist.github.com/971841

jake3030 pushed a commit to jake3030/rails that referenced this issue Jun 28, 2011
… Also added to has_many and has_and_belongs_to_many associations.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[rails#1028 state:committed]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant