* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git] / sample / drb / gw_ct.rb
blob062278401839c3a9fcdb36874c2ae5c20f2f396c
1 require 'drb/drb'
3 class Foo
4   include DRbUndumped
6   def foo(n)
7     n + n
8   end
10   def bar(n)
11     yield(n) + yield(n)
12   end
13 end
15 DRb.start_service(nil)
16 puts DRb.uri
18 ro = DRbObject.new(nil, ARGV.shift)
19 ro[:tcp] = Foo.new
20 gets
22 it = ro[:unix]
23 p [it, it.foo(1)]
24 gets
26 p it.bar('2') {|n| n * 3}
27 gets