[前][次][番号順一覧][スレッド一覧]

ruby-changes:35484

From: nobu <ko1@a...>
Date: Sat, 13 Sep 2014 09:47:16 +0900 (JST)
Subject: [ruby-changes:35484] nobu:r47566 (trunk): test_yield.rb: use temporary instance

nobu	2014-09-13 09:47:02 +0900 (Sat, 13 Sep 2014)

  New Revision: 47566

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47566

  Log:
    test_yield.rb: use temporary instance
    
    * test/ruby/test_yield.rb (test_with_enum): use temporary
      instance, do not define a method on the global class object.

  Modified files:
    trunk/test/ruby/test_yield.rb
Index: test/ruby/test_yield.rb
===================================================================
--- test/ruby/test_yield.rb	(revision 47565)
+++ test/ruby/test_yield.rb	(revision 47566)
@@ -66,7 +66,7 @@ class TestRubyYield < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/ruby/test_yield.rb#L66
   end
 
   def test_with_enum
-    obj = Object
+    obj = Object.new
     def obj.each
       yield(*[])
     end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]