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

ruby-changes:32333

From: nobu <ko1@a...>
Date: Wed, 25 Dec 2013 20:11:48 +0900 (JST)
Subject: [ruby-changes:32333] nobu:r44412 (trunk): test_method.rb, test_proc.rb: suppress warnings

nobu	2013-12-25 20:11:42 +0900 (Wed, 25 Dec 2013)

  New Revision: 44412

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

  Log:
    test_method.rb, test_proc.rb: suppress warnings
    
    * test/ruby/test_method.rb: suppress warnings in verbose mode.
    
    * test/ruby/test_proc.rb: ditto.

  Modified files:
    trunk/test/ruby/test_method.rb
    trunk/test/ruby/test_proc.rb
Index: test/ruby/test_proc.rb
===================================================================
--- test/ruby/test_proc.rb	(revision 44411)
+++ test/ruby/test_proc.rb	(revision 44412)
@@ -1209,7 +1209,7 @@ class TestProc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_proc.rb#L1209
   end
 
   def get_binding if: 1, case: 2, when: 3, begin: 4, end: 5
-    a = 0
+    a ||= 0
     binding
   end
 
Index: test/ruby/test_method.rb
===================================================================
--- test/ruby/test_method.rb	(revision 44411)
+++ test/ruby/test_method.rb	(revision 44412)
@@ -22,7 +22,7 @@ class TestMethod < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_method.rb#L22
   def mo5(a, *b, c) end
   def mo6(a, *b, c, &d) end
   def mo7(a, b = nil, *c, d, &e) end
-  def ma1((a), &b) end
+  def ma1((a), &b) nil && a end
 
   class Base
     def foo() :base end
@@ -293,7 +293,7 @@ class TestMethod < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_method.rb#L293
       end
     end
 
-    assert_nothing_raised do
+    assert_nothing_raised(bug8686) do
       m.define_singleton_method(:a, m.method(:a))
     end
   end
@@ -456,7 +456,7 @@ class TestMethod < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_method.rb#L456
   define_method(:pmo5) {|a, *b, c|}
   define_method(:pmo6) {|a, *b, c, &d|}
   define_method(:pmo7) {|a, b = nil, *c, d, &e|}
-  define_method(:pma1) {|(a), &b|}
+  define_method(:pma1) {|(a), &b| nil && a}
 
   def test_bound_parameters
     assert_equal([], method(:m0).parameters)
@@ -659,6 +659,7 @@ class TestMethod < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_method.rb#L659
       prepend m
     }
     assert_raise(NameError, bug7988) {Module.new{prepend m}.instance_method(:bar)}
+    true || c || bug7836
   end
 
   def test_gced_bmethod

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

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