summaryrefslogtreecommitdiff
path: root/lib/drb/unix.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-18 21:19:18 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-18 21:19:18 +0000
commit7bbf2f308580f468802cd7d32c94fce1b9f1779e (patch)
tree0a680f59e70a78d60e776d7b763e618fb2fec624 /lib/drb/unix.rb
parent34276148c4450faa77bb298cfbe005f7c263f802 (diff)
* lib: Convert tabs to spaces for ruby files per
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style Patch by Steve Klabnik [Ruby 1.9 - Bug #4730] Patch by Jason Dew [Ruby 1.9 - Feature #4718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/drb/unix.rb')
-rw-r--r--lib/drb/unix.rb40
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/drb/unix.rb b/lib/drb/unix.rb
index a377dd995e7..10465987f22 100644
--- a/lib/drb/unix.rb
+++ b/lib/drb/unix.rb
@@ -9,12 +9,12 @@ module DRb
class DRbUNIXSocket < DRbTCPSocket
def self.parse_uri(uri)
if /^drbunix:(.*?)(\?(.*))?$/ =~ uri
- filename = $1
- option = $3
- [filename, option]
+ filename = $1
+ option = $3
+ [filename, option]
else
- raise(DRbBadScheme, uri) unless uri =~ /^drbunix:/
- raise(DRbBadURI, 'can\'t parse uri:' + uri)
+ raise(DRbBadScheme, uri) unless uri =~ /^drbunix:/
+ raise(DRbBadURI, 'can\'t parse uri:' + uri)
end
end
@@ -28,11 +28,11 @@ module DRb
def self.open_server(uri, config)
filename, = parse_uri(uri)
if filename.size == 0
- soc = temp_server
+ soc = temp_server
filename = soc.path
- uri = 'drbunix:' + soc.path
+ uri = 'drbunix:' + soc.path
else
- soc = UNIXServer.open(filename)
+ soc = UNIXServer.open(filename)
end
owner = config[:UNIXFileOwner]
group = config[:UNIXFileGroup]
@@ -67,18 +67,18 @@ module DRb
tmpdir = Dir::tmpdir
n = 0
while true
- begin
- tmpname = sprintf('%s/druby%d.%d', tmpdir, $$, n)
- lock = tmpname + '.lock'
- unless File.exist?(tmpname) or File.exist?(lock)
- Dir.mkdir(lock)
- break
- end
- rescue
- raise "cannot generate tempfile `%s'" % tmpname if n >= Max_try
- #sleep(1)
- end
- n += 1
+ begin
+ tmpname = sprintf('%s/druby%d.%d', tmpdir, $$, n)
+ lock = tmpname + '.lock'
+ unless File.exist?(tmpname) or File.exist?(lock)
+ Dir.mkdir(lock)
+ break
+ end
+ rescue
+ raise "cannot generate tempfile `%s'" % tmpname if n >= Max_try
+ #sleep(1)
+ end
+ n += 1
end
soc = UNIXServer.new(tmpname)
Dir.rmdir(lock)