1require 'drb/drb' 2require 'drb/extserv' 3 4class Foo 5 include DRbUndumped 6end 7 8class Bar 9 include DRbUndumped 10 def initialize 11 @foo = Foo.new 12 end 13 attr_reader :foo 14 15 def foo?(foo) 16 @foo == foo 17 end 18end 19 20if __FILE__ == $0 21 def ARGV.shift 22 it = super() 23 raise "usage: #{$0} <uri> <name>" unless it 24 it 25 end 26 27 DRb.start_service('druby://:0', Bar.new) 28 es = DRb::ExtServ.new(ARGV.shift, ARGV.shift) 29 DRb.thread.join 30end 31