From 5bff643540d8a32bed918c29a86d400cd47ec11d Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 13 Dec 2013 14:03:48 +0000 Subject: test_weakmap.rb: fix test * test/ruby/test_weakmap.rb (test_include?): Object.new does not excute the block, use tap. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_weakmap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby/test_weakmap.rb') diff --git a/test/ruby/test_weakmap.rb b/test/ruby/test_weakmap.rb index bc88ab0dd0..d63d82f9de 100644 --- a/test/ruby/test_weakmap.rb +++ b/test/ruby/test_weakmap.rb @@ -31,7 +31,7 @@ class TestWeakMap < Test::Unit::TestCase def test_include? m = __callee__[/test_(.*)/, 1] k = "foo" - Object.new do |x| + Object.new.tap do |x| @wm[k] = x assert_send([@wm, m, k]) assert_not_send([@wm, m, "FOO".downcase]) -- cgit v1.2.3