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

ruby-changes:40106

From: usa <ko1@a...>
Date: Mon, 19 Oct 2015 00:00:15 +0900 (JST)
Subject: [ruby-changes:40106] usa:r52187 (trunk): * ruby/test_require.rb (loading_fifo): checking by defined? is meaningless about

usa	2015-10-18 23:59:51 +0900 (Sun, 18 Oct 2015)

  New Revision: 52187

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

  Log:
    * ruby/test_require.rb (loading_fifo): checking by defined? is meaningless about
      notimplemented method.  such methods are defined, but not respond_to?.  this
      fixes test failures introduced at r52172.

  Modified files:
    trunk/test/ruby/test_require.rb
Index: test/ruby/test_require.rb
===================================================================
--- test/ruby/test_require.rb	(revision 52186)
+++ test/ruby/test_require.rb	(revision 52187)
@@ -708,7 +708,7 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_require.rb#L708
       end
       END
     }
-  end if defined?(File.mkfifo)
+  end if File.respond_to?(:mkfifo)
 
   def test_loading_fifo_threading_success
     Tempfile.create(%w'fifo .rb') {|f|
@@ -731,7 +731,7 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_require.rb#L731
       load(path)
     INPUT
     }
-  end if defined?(File.mkfifo)
+  end if File.respond_to?(:mkfifo)
 
   def test_throw_while_loading
     Tempfile.create(%w'bug-11404 .rb') do |f|

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

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