ruby193.diff

Jeremy Evans, 07/30/2011 03:23 AM

Download (2.23 KB)

View differences:

bootstraptest/test_thread.rb Thu Jul 28 12:49:25 2011
51 51
}
52 52
assert_equal %q{100}, %q{
53 53
  100.times{
54
    Thread.new{loop{Thread.pass}}
54
    Thread.new{Thread.pass while true}
55 55
  }
56 56
}
57 57
assert_equal %q{ok}, %q{
ext/socket/lib/socket.rb Fri Jul 29 10:50:44 2011
541 541
      end
542 542
    end
543 543

  
544
    pktinfo_sockets = {}
545 544
    sockets.each {|s|
546 545
      ai = s.local_address
547 546
      if ipv6_recvpktinfo && ai.ipv6? && ai.ip_address == "::"
548 547
        s.setsockopt(:IPV6, ipv6_recvpktinfo, 1)
549
        pktinfo_sockets[s] = true
550 548
      end
551 549
    }
552 550

  
......
591 589
      if ai.ipv6? and pktinfo = controls.find {|c| c.cmsg_is?(:IPV6, :PKTINFO) }
592 590
        ai = Addrinfo.udp(pktinfo.ipv6_pktinfo_addr.ip_address, ai.ip_port)
593 591
        yield msg, UDPSource.new(sender_addrinfo, ai) {|reply_msg|
594
          r.sendmsg reply_msg, 0, sender_addrinfo, pktinfo
592
          r.sendmsg reply_msg, 0, sender_addrinfo
595 593
        }
596 594
      else
597 595
        yield msg, UDPSource.new(sender_addrinfo, ai) {|reply_msg|
lib/test/unit.rb Wed Jul 27 16:04:54 2011
493 493
                end
494 494
            end
495 495
          end
496
          @workers.each do |worker|
497
            begin
498
              timeout(1) do
499
                worker.puts "quit"
496
          if @workers
497
            @workers.each do |worker|
498
              begin
499
                timeout(1) do
500
                  worker.puts "quit"
501
                end
502
              rescue Errno::EPIPE
503
              rescue Timeout::Error
500 504
              end
501
            rescue Errno::EPIPE
502
            rescue Timeout::Error
505
              worker.close
503 506
            end
504
            worker.close
505 507
          end
506 508
          begin
507
            timeout(0.2*@workers.size) do
508
              Process.waitall
509
            if @workers
510
              timeout(0.2*@workers.size) do
511
                Process.waitall
512
              end
509 513
            end
510 514
          rescue Timeout::Error
511 515
            @workers.each do |worker|