From d7ada598541e3f76c6a1a9405eb0021b0b5dbc3b Mon Sep 17 00:00:00 2001 From: kazu Date: Sun, 8 Oct 2017 07:00:01 +0000 Subject: Remove unnecessary `require 'thread'` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/drb/dchats.rb | 1 - sample/drb/dhasen.rb | 1 - sample/drb/dlogd.rb | 1 - sample/drb/dqueue.rb | 1 - sample/drb/http0serv.rb | 1 - sample/drb/name.rb | 1 - sample/drb/old_tuplespace.rb | 2 -- sample/drb/ring_echo.rb | 1 - sample/drb/simpletuple.rb | 2 -- sample/dualstack-httpd.rb | 1 - sample/observ.rb | 1 - sample/philos.rb | 1 - 12 files changed, 14 deletions(-) (limited to 'sample') diff --git a/sample/drb/dchats.rb b/sample/drb/dchats.rb index c07f748e99..58af3cf005 100644 --- a/sample/drb/dchats.rb +++ b/sample/drb/dchats.rb @@ -2,7 +2,6 @@ distributed Ruby --- chat server Copyright (c) 1999-2000 Masatoshi SEKI =end -require 'thread' require 'drb/drb' class ChatEntry diff --git a/sample/drb/dhasen.rb b/sample/drb/dhasen.rb index 9ab8534588..13ff38940e 100644 --- a/sample/drb/dhasen.rb +++ b/sample/drb/dhasen.rb @@ -17,7 +17,6 @@ require 'drb/drb' require 'chasen' -require 'thread' class Dhasen include DRbUndumped diff --git a/sample/drb/dlogd.rb b/sample/drb/dlogd.rb index be364511dc..a87e660346 100644 --- a/sample/drb/dlogd.rb +++ b/sample/drb/dlogd.rb @@ -4,7 +4,6 @@ =end require 'drb/drb' -require 'thread' class Logger def initialize(fname) diff --git a/sample/drb/dqueue.rb b/sample/drb/dqueue.rb index 1a405f5be5..a9afa8c858 100644 --- a/sample/drb/dqueue.rb +++ b/sample/drb/dqueue.rb @@ -3,7 +3,6 @@ Copyright (c) 1999-2000 Masatoshi SEKI =end -require 'thread' require 'drb/drb' DRb.start_service(nil, Thread::Queue.new) diff --git a/sample/drb/http0serv.rb b/sample/drb/http0serv.rb index 049f5a1de5..1a58811fed 100644 --- a/sample/drb/http0serv.rb +++ b/sample/drb/http0serv.rb @@ -1,7 +1,6 @@ require 'webrick' require 'drb/drb' require 'drb/http0' -require 'thread' module DRb module HTTP0 diff --git a/sample/drb/name.rb b/sample/drb/name.rb index 30c902b8f7..a8ad28749d 100644 --- a/sample/drb/name.rb +++ b/sample/drb/name.rb @@ -35,7 +35,6 @@ How to play. | 2 =end -require 'thread.rb' require 'drb/drb' module DRbNamedObject diff --git a/sample/drb/old_tuplespace.rb b/sample/drb/old_tuplespace.rb index 9c10a34527..8be1542c06 100644 --- a/sample/drb/old_tuplespace.rb +++ b/sample/drb/old_tuplespace.rb @@ -3,8 +3,6 @@ # Copyright (c) 1999-2000 Masatoshi SEKI # You can redistribute it and/or modify it under the same terms as Ruby. -require 'thread' - class TupleSpace class Template def initialize(list) diff --git a/sample/drb/ring_echo.rb b/sample/drb/ring_echo.rb index 3b743cab8e..c54628b54c 100644 --- a/sample/drb/ring_echo.rb +++ b/sample/drb/ring_echo.rb @@ -1,7 +1,6 @@ require 'drb/drb' require 'drb/eq' require 'rinda/ring' -require 'thread' class RingEcho include DRbUndumped diff --git a/sample/drb/simpletuple.rb b/sample/drb/simpletuple.rb index bfbd86e665..4bb4b1cff9 100644 --- a/sample/drb/simpletuple.rb +++ b/sample/drb/simpletuple.rb @@ -3,8 +3,6 @@ # Copyright (c) 1999-2000 Masatoshi SEKI # You can redistribute it and/or modify it under the same terms as Ruby. -require 'thread' - class SimpleTupleSpace def initialize @hash = {} diff --git a/sample/dualstack-httpd.rb b/sample/dualstack-httpd.rb index a6d4d3a2c2..ab02e17aea 100644 --- a/sample/dualstack-httpd.rb +++ b/sample/dualstack-httpd.rb @@ -3,7 +3,6 @@ # The code demonstrates how a multi-protocol daemon should be written. require "socket" -require "thread" port = 8888 res = Socket.getaddrinfo(nil, port, nil, Socket::SOCK_STREAM, nil, Socket::AI_PASSIVE) diff --git a/sample/observ.rb b/sample/observ.rb index 061e3c6a10..a7ea45271d 100644 --- a/sample/observ.rb +++ b/sample/observ.rb @@ -1,6 +1,5 @@ #! /usr/local/bin/ruby -require "thread" require "observer" class Tick diff --git a/sample/philos.rb b/sample/philos.rb index 622e58b4bf..c38aa4a1cc 100644 --- a/sample/philos.rb +++ b/sample/philos.rb @@ -1,7 +1,6 @@ # # The Dining Philosophers - thread example # -require "thread" srand #srand -- cgit v1.2.3