require 'drb/drb' DRb.start_service # Retrieve the Foo object from the gateway gw = DRbObject.new nil, ARGV.shift foo = gw[:unix] puts "fetched remote object:" p foo # => # puts # Call foo on the object running on the UNIX service p foo.foo(1) # => 2 puts # Call bar on the object running on the UNIX service, passing a # block p foo.bar('2') { |n| n * 3 } # => "222222"