mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
21 lines
274 B
YAML
21 lines
274 B
YAML
|
prelude: |
|
||
|
class A
|
||
|
@@foo = 1
|
||
|
|
||
|
def self.foo
|
||
|
@@foo
|
||
|
end
|
||
|
|
||
|
("A".."Z").each do |module_name|
|
||
|
eval <<-EOM
|
||
|
module #{module_name}
|
||
|
end
|
||
|
|
||
|
include #{module_name}
|
||
|
EOM
|
||
|
end
|
||
|
end
|
||
|
benchmark:
|
||
|
vm_cvar: A.foo
|
||
|
loop_count: 600000
|