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

ruby-changes:51488

From: normal <ko1@a...>
Date: Wed, 20 Jun 2018 08:20:42 +0900 (JST)
Subject: [ruby-changes:51488] normal:r63698 (trunk): lib/drb/extservm.rb (service): do not return `false'

normal	2018-06-20 08:20:36 +0900 (Wed, 20 Jun 2018)

  New Revision: 63698

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

  Log:
    lib/drb/extservm.rb (service): do not return `false'
    
    invoke_service_command may set entries in @servers to `false',
    making it incompatible with the intended use of the
    safe navigation operator.
    
    This caused occasional DRb test failures, but they were hidden
    with automatic retry.
    
    [ruby-core:87524] [Bug #14856]
    
    Fixes: r53111 ("use safe navigation operator")
    commit 059c9c1cf371e049c7481c78b76e9620da52757f [GH-1142]

  Modified files:
    trunk/lib/drb/extservm.rb
Index: lib/drb/extservm.rb
===================================================================
--- lib/drb/extservm.rb	(revision 63697)
+++ lib/drb/extservm.rb	(revision 63698)
@@ -37,7 +37,7 @@ module DRb https://github.com/ruby/ruby/blob/trunk/lib/drb/extservm.rb#L37
       synchronize do
         while true
           server = @servers[name]
-          return server if server&.alive?
+          return server if server && server.alive? # server may be `false'
           invoke_service(name)
           @cond.wait
         end

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

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