Project

General

Profile

Bug #1744 » ex.rb

Example file - DarKo (Guillaume Delugré), 07/09/2009 04:41 AM

 
require 'delegate'

class C < DelegateClass(Integer)
attr_accessor :var

def initialize
@var = 1
end
end

c = C.new
p c.var # => 1

d = Marshal.load(Marshal.dump(c))

p d.var # => nil

    (1-1/1)