ruby/benchmark/bm_marshal_dump_load_geniv.rb

11 строки
173 B
Ruby

a = ''
a.instance_eval do
@a = :a
@b = :b
@c = :c
end
100000.times do
a = Marshal.load(Marshal.dump(a))
end
#p(a.instance_eval { @a == :a && @b == :b && @c == :c })