* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git] / sample / drb / drbmc.rb
blobc654fcea05e0d13d99848f6e7a27fd594bbb140d
1 =begin
2   multiple DRbServer client
3         Copyright (c) 1999-2002 Masatoshi SEKI 
4 =end
6 require 'drb/drb'
8 if __FILE__ == $0
9   s1 = ARGV.shift
10   s2 = ARGV.shift
11   unless s1 && s2
12     $stderr.puts("usage: #{$0} <server_uri1> <server_uri2>")
13     exit 1
14   end
16   DRb.start_service()
17   r1 = DRbObject.new(nil, s1)
18   r2 = DRbObject.new(nil, s2)
20   p [r1.hello, r1.hello.to_s]
21   p [r2.hello, r2.hello.to_s]
22 end