mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
21 lines
307 B
YAML
21 lines
307 B
YAML
|
prelude: |
|
||
|
class C
|
||
|
def m
|
||
|
1
|
||
|
end
|
||
|
|
||
|
("A".."M").each do |module_name|
|
||
|
eval <<-EOM
|
||
|
module #{module_name}
|
||
|
def m; super; end
|
||
|
end
|
||
|
prepend #{module_name}
|
||
|
EOM
|
||
|
end
|
||
|
end
|
||
|
|
||
|
obj = C.new
|
||
|
benchmark:
|
||
|
vm_iclass_super: obj.m
|
||
|
loop_count: 6000000
|