1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/benchmark/vm_dstr_obj_def.rb

9 lines
130 B
Ruby
Raw Normal View History

i = 0
o = Object.new
def o.to_s; -""; end
x = y = o
while i<6_000_000 # benchmark loop 2
i += 1
str = "foo#{x}bar#{y}baz"
end