DRb.start_serviceでエラー

自分のMacでDRb.start_serviceするとエラーになってしまう。

anna% irb --prompt simple -r drb/drb
>> DRb.start_service
SocketError: getaddrinfo: nodename nor servname provided, or not known
	from /opt/local/lib/ruby/1.8/drb/drb.rb:853:in `initialize'
	from /opt/local/lib/ruby/1.8/drb/drb.rb:853:in `open'
	from /opt/local/lib/ruby/1.8/drb/drb.rb:853:in `open_server_inaddr_any'
	from /opt/local/lib/ruby/1.8/drb/drb.rb:870:in `open_server'
	from /opt/local/lib/ruby/1.8/drb/drb.rb:759:in `open_server'
	from /opt/local/lib/ruby/1.8/drb/drb.rb:757:in `each'
	from /opt/local/lib/ruby/1.8/drb/drb.rb:757:in `open_server'
	from /opt/local/lib/ruby/1.8/drb/drb.rb:1352:in `initialize'
	from /opt/local/lib/ruby/1.8/drb/drb.rb:1640:in `new'
	from /opt/local/lib/ruby/1.8/drb/drb.rb:1640:in `start_service'
	from (irb):1
>> 

TCPSocket.open_server(port)のところでエラーとなっている。
どうやら、ここら辺の話の模様。
http://redmine.ruby-lang.org/issues/show/963

上記のレポートを見て/opt/local/lib/ruby/1.8/drb/drb.rbを変更してみる。

    def self.open_server_inaddr_any(host, port)
      infos = Socket::getaddrinfo(host, nil, 
                                  Socket::AF_UNSPEC,
                                  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

もう1回irbで確認

anna% irb --prompt simple -r drb/drb
>> DRb.start_service
=> #, @uri="druby://anna.local:52954", @safe_level=0, @idconv=#, @config={:tcp_acl=>nil, :safe_level=>0, :idconv=>#, :load_limit=>26214400, :argc_limit=>256, :verbose=>false}, @thread=#, @protocol=#nil, :tcp_port=>52954, :safe_level=>0, :idconv=>#, :load_limit=>26214400, :argc_limit=>256, :verbose=>false, :tcp_original_host=>""}, @msg=#, @socket=#>, @front=nil>
>> 

大丈夫みたい。