зеркало из https://github.com/github/ruby.git
21 строка
307 B
YAML
21 строка
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
|