summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-02 16:30:04 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-02 16:30:04 +0000
commite4211600a94143266970e4edb925aed17e5abc56 (patch)
tree7a871e6a37a882f00fc13a4df12d4ffd61504a63 /test/ruby/test_module.rb
parent24df9a76903702303b2fb6122bbd8e7322a4e7fa (diff)
merge revision(s) r45178,r45179,r45180,r45183: [Backport #9568]
eval.c: remove unneeded GC guard * eval.c (setup_exception): remove RB_GC_GUARD which is no longer needed since r41598. * eval.c (setup_exception): preserve errinfo across calling #to_s method on the exception. [ruby-core:61091] [Bug #9568] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 047f7c99d3..c6979d8393 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -1500,17 +1500,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