summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 5eb0457496..02739dd520 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -1564,17 +1564,11 @@ class TestModule < Test::Unit::TestCase
end
def labeled_module(name, &block)
- Module.new do
- singleton_class.class_eval {define_method(:to_s) {name}; alias inspect to_s}
- class_eval(&block) if block
- end
+ EnvUtil.labeled_module(name, &block)
end
def labeled_class(name, superclass = Object, &block)
- Class.new(superclass) do
- singleton_class.class_eval {define_method(:to_s) {name}; alias inspect to_s}
- class_eval(&block) if block
- end
+ EnvUtil.labeled_class(name, superclass, &block)
end
def test_prepend_instance_methods_false