Class#dup fails to copy methods
Reported by Wilson Bilkovich | June 4th, 2008 @ 09:23 PM | in 1.0 preview
irb(main):009:0> k1 = Class.new { def self.zomg;666;end }
=> #<Class:0x3d9>
irb(main):010:0> k2 = k1.dup
=> #<Class:0x3e1>
irb(main):011:0> k1.zomg
=> 666
irb(main):012:0> k2.zomg
NoMethodError: No method 'zomg' on #<Class:0x3e1> (Class)
from Kernel(Class)#zomg (method_missing_cv) at kernel/core/kernel.rb:649
from Object#irb_binding {} at (irb):12
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
