check @there if it is nil to prevent infinite loop

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-09-20 08:05:05 +00:00
parent 4e195e0ff3
commit 796700aca7

View File

@ -73,7 +73,7 @@ module DRbCore
def teardown
@ext.stop_service if defined?(@ext) && @ext
DRbService.manager.unregist(@service_name)
while (@there.to_s rescue nil)
while (@there&&@there.to_s rescue nil)
# nop
end
signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :INT : :TERM
@ -294,7 +294,7 @@ module DRbAry
def teardown
@ext.stop_service if defined?(@ext) && @ext
DRbService.manager.unregist(@service_name)
while (@there.to_s rescue nil)
while (@there&&@there.to_s rescue nil)
# nop
end
signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :INT : :TERM