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

ruby-changes:46154

From: nobu <ko1@a...>
Date: Fri, 7 Apr 2017 13:01:01 +0900 (JST)
Subject: [ruby-changes:46154] nobu:r58267 (trunk): fix condition of assert_not_respond_to

nobu	2017-04-07 13:00:56 +0900 (Fri, 07 Apr 2017)

  New Revision: 58267

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

  Log:
    fix condition of assert_not_respond_to
    
    * test/lib/test/unit/assertions.rb (assert_not_respond_to): fix
      condition to assert.

  Modified files:
    trunk/test/lib/test/unit/assertions.rb
Index: test/lib/test/unit/assertions.rb
===================================================================
--- test/lib/test/unit/assertions.rb	(revision 58266)
+++ test/lib/test/unit/assertions.rb	(revision 58267)
@@ -389,7 +389,7 @@ EOT https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/assertions.rb#L389
           msg = message(msg) {
             "Expected #{mu_pp(obj)} (#{obj.class}) to not respond to ##{meth}#{" privately" if priv[0]}"
           }
-          return assert obj.respond_to?(meth, *priv), msg
+          return assert !obj.respond_to?(meth, *priv), msg
         end
         #get rid of overcounting
         if caller_locations(1, 1)[0].path.start_with?(MINI_DIR)

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

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