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

ruby-changes:31682

From: nobu <ko1@a...>
Date: Thu, 21 Nov 2013 18:51:23 +0900 (JST)
Subject: [ruby-changes:31682] nobu:r43761 (trunk): test_tempfile.rb: suppress warnings

nobu	2013-11-21 18:51:18 +0900 (Thu, 21 Nov 2013)

  New Revision: 43761

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

  Log:
    test_tempfile.rb: suppress warnings
    
    * test/test_tempfile.rb (test_tempfile_is_unlinked_when_ruby_exits): no error should emit.
    
    * test/test_tempfile.rb (test_tempfile_encoding_ascii8bit): remove unused variable.
    
    * test/test_tempfile.rb (test_tempfile_encoding_ascii8bit2): ditto.

  Modified files:
    trunk/test/test_tempfile.rb
Index: test/test_tempfile.rb
===================================================================
--- test/test_tempfile.rb	(revision 43760)
+++ test/test_tempfile.rb	(revision 43761)
@@ -203,6 +203,7 @@ File.open(path, "w").close https://github.com/ruby/ruby/blob/trunk/test/test_tempfile.rb#L203
 puts Tempfile.new('foo').path
     EOS
       assert !File.exist?(filename)
+      assert_nil(error)
     end
   end
 
@@ -294,7 +295,6 @@ puts Tempfile.new('foo').path https://github.com/ruby/ruby/blob/trunk/test/test_tempfile.rb#L295
   end
 
   def test_tempfile_encoding_ascii8bit
-    default_external=Encoding.default_external
     t = tempfile("TEST",:encoding=>"ascii-8bit")
     t.write("\xE6\x9D\xBE\xE6\xB1\x9F")
     t.rewind
@@ -302,7 +302,6 @@ puts Tempfile.new('foo').path https://github.com/ruby/ruby/blob/trunk/test/test_tempfile.rb#L302
   end
 
   def test_tempfile_encoding_ascii8bit2
-    default_external=Encoding.default_external
     t = tempfile("TEST",Dir::tmpdir,:encoding=>"ascii-8bit")
     t.write("\xE6\x9D\xBE\xE6\xB1\x9F")
     t.rewind

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

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