summaryrefslogtreecommitdiff
path: root/sample/drb/name.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-15 11:55:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-15 11:55:52 +0000
commit3a47cf3395dd4c4fe8bdd5df13aab698f2ca314b (patch)
treec4a278220ba8141b829c5c7b0777c1049cfe413c /sample/drb/name.rb
parent39da1b63699faf30c86e753e193c29b81b16136d (diff)
* remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/drb/name.rb')
-rw-r--r--sample/drb/name.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/sample/drb/name.rb b/sample/drb/name.rb
index 86b478f..9527d47 100644
--- a/sample/drb/name.rb
+++ b/sample/drb/name.rb
@@ -1,12 +1,12 @@
=begin
distributed Ruby --- NamedObject Sample
- Copyright (c) 2000-2001 Masatoshi SEKI
+ Copyright (c) 2000-2001 Masatoshi SEKI
=end
=begin
How to play.
-* start server
+* start server
Terminal 1
| % ruby name.rb druby://yourhost:7640
| druby://yourhost:7640
@@ -28,9 +28,9 @@ How to play.
| druby://yourhost:7640
| [return] to exit
-* continue client
+* continue client
Terminal 2
- type [return]
+ type [return]
| 1
| 2
=end
@@ -44,7 +44,7 @@ module DRbNamedObject
def drb_name=(name)
@drb_name = name
- Thread.exclusive do
+ Thread.exclusive do
raise(IndexError, name) if DRbNAMEDICT[name]
DRbNAMEDICT[name] = self
end
@@ -62,7 +62,7 @@ class DRbNamedIdConv < DRb::DRbIdConv
def to_id(obj)
if obj.kind_of? DRbNamedObject
- return obj.drb_name
+ return obj.drb_name
else
return super
end
@@ -98,7 +98,7 @@ class Front
@name['seq'] = seq
@name['mutex'] = mutex
end
-
+
def [](k)
@name[k]
end
@@ -108,7 +108,7 @@ if __FILE__ == $0
uri = ARGV.shift
name_conv = DRbNamedIdConv.new
-
+
DRb.install_id_conv(name_conv)
DRb.start_service(uri, Front.new)
puts DRb.uri