Current Path : /compat/linux/proc/self/root/usr/local/share/examples/ruby18/drb/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //compat/linux/proc/self/root/usr/local/share/examples/ruby18/drb/gw_cu.rb |
require 'drb/drb' require 'drb/unix' class Foo include DRbUndumped def foo(n) n + n end def bar(n) yield(n) + yield(n) end end DRb.start_service('drubyunix:', nil) puts DRb.uri ro = DRbObject.new(nil, ARGV.shift) ro[:unix] = Foo.new gets it = ro[:tcp] p [it, it.foo(1)] gets p it.bar('2') {|n| n * 3} gets