ruby-changes:12250
From: shyouhei <ko1@a...>
Date: Fri, 3 Jul 2009 09:41:00 +0900 (JST)
Subject: [ruby-changes:12250] Ruby:r23940 (ruby_1_8_7): merge revision(s) 22996:
shyouhei 2009-07-03 09:40:40 +0900 (Fri, 03 Jul 2009) New Revision: 23940 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23940 Log: merge revision(s) 22996: * lib/drb/drb.rb (open_server_inaddr_any): fixed multiple network families problem. a patch from Charl Matthee at [ruby-core:21033]. Modified files: branches/ruby_1_8_7/ChangeLog branches/ruby_1_8_7/lib/drb/drb.rb branches/ruby_1_8_7/version.h Index: ruby_1_8_7/ChangeLog =================================================================== --- ruby_1_8_7/ChangeLog (revision 23939) +++ ruby_1_8_7/ChangeLog (revision 23940) @@ -1,3 +1,8 @@ +Fri Jul 3 09:05:38 2009 Masatoshi SEKI <m_seki@m...> + + * lib/drb/drb.rb (open_server_inaddr_any): fixed multiple network + families problem. a patch from Charl Matthee at [ruby-core:21033]. + Wed Jul 1 15:46:30 2009 Tanaka Akira <akr@f...> * lib/pathname.rb (Pathname#sub): set $~ in block.binding. Index: ruby_1_8_7/version.h =================================================================== --- ruby_1_8_7/version.h (revision 23939) +++ ruby_1_8_7/version.h (revision 23940) @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.8.7" -#define RUBY_RELEASE_DATE "2009-07-01" +#define RUBY_RELEASE_DATE "2009-07-03" #define RUBY_VERSION_CODE 187 -#define RUBY_RELEASE_CODE 20090701 -#define RUBY_PATCHLEVEL 176 +#define RUBY_RELEASE_CODE 20090703 +#define RUBY_PATCHLEVEL 177 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 7 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 7 -#define RUBY_RELEASE_DAY 1 +#define RUBY_RELEASE_DAY 3 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; Index: ruby_1_8_7/lib/drb/drb.rb =================================================================== --- ruby_1_8_7/lib/drb/drb.rb (revision 23939) +++ ruby_1_8_7/lib/drb/drb.rb (revision 23940) @@ -842,15 +842,10 @@ Socket::SOCK_STREAM, 0, Socket::AI_PASSIVE) - family = infos.collect { |af, *_| af }.uniq - case family - when ['AF_INET'] - return TCPServer.open('0.0.0.0', port) - when ['AF_INET6'] - return TCPServer.open('::', port) - else - return TCPServer.open(port) - end + families = Hash[*infos.collect { |af, *_| af }.uniq.zip([]).flatten] + return TCPServer.open('0.0.0.0', port) if families.has_key?('AF_INET') + return TCPServer.open('::', port) if families.has_key?('AF_INET6') + return TCPServer.open(port) end # Open a server listening for connections at +uri+ using -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/