Files
RubyMotion/test/Benchmark/app/benchmark/module.rb
2014-01-27 09:37:38 +09:00

25 lines
364 B
Ruby

module Baz
CONST_BAZ = "baz"
@@baz = "baz"
end
class Foo
CONST_FOO = 42
@@foo = "foo"
end
class Bar
include Baz
end
def bm_module
Benchmark.benchmark("", 30, "%r\n") do |x|
module_alias_method(x)
module_class_eval(x)
module_class_variable_get(x)
module_class_variable_set(x)
module_const_get(x)
module_const_set(x)
end
end