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

ruby-changes:27445

From: nobu <ko1@a...>
Date: Tue, 26 Feb 2013 00:01:56 +0900 (JST)
Subject: [ruby-changes:27445] nobu:r39497 (trunk): envutil.rb: rename member

nobu	2013-02-25 23:59:21 +0900 (Mon, 25 Feb 2013)

  New Revision: 39497

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

  Log:
    envutil.rb: rename member
    
    * test/ruby/envutil.rb (Test::Unit::Assertions::AssertFile): rename
      member to get rid of conflict with a method of Assertions.

  Modified files:
    trunk/test/ruby/envutil.rb

Index: test/ruby/envutil.rb
===================================================================
--- test/ruby/envutil.rb	(revision 39496)
+++ test/ruby/envutil.rb	(revision 39497)
@@ -317,7 +317,7 @@ eom https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L317
         AssertFile
       end
 
-      class << (AssertFile = Struct.new(:message).new)
+      class << (AssertFile = Struct.new(:failure_message).new)
         include Assertions
         def assert_file_predicate(predicate, *args)
           if /\Anot_/ =~ predicate
@@ -329,13 +329,13 @@ eom https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L329
           mesg = "Expected file " << args.shift.inspect
           mesg << mu_pp(args) unless args.empty?
           mesg << "#{neg} to be #{predicate}"
-          mesg << " #{message}" if message
+          mesg << " #{failure_message}" if failure_message
           assert(result, mesg)
         end
         alias method_missing assert_file_predicate
 
         def for(message)
-          clone.tap {|a| a.message = message}
+          clone.tap {|a| a.failure_message = message}
         end
       end
     end

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

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