On 26 May 2005, at 08:05, curtis.schofield / gmail.com wrote:

> Hi.
>
> Distributed ruby seems to have issue with dispatch doen via
> method_missing on the remote side. Is there a possible workaround for
> this..

This is by design, see #check_insecure_method.  DRb only lets you  
call public methods an object responds to.

DRb will let you call the method if you define #respond_to? correctly.

Beware the security implications of this.

require 'drb'

URI = 'druby://localhost:9000'

class MM
   def method_missing(method, *args) puts "called #{method}" end
   def respond_to?(method) method == :bloop end
end

case ARGV.first
when 'client'
   DRb.start_service
   mm = DRbObject.new nil, URI
   mm.bloop
   mm.whatever
when 'server'
   DRb.start_service URI, MM.new
   trap('INT') { DRb.thread.kill; exit }
   DRb.thread.join
else
   STDERR.puts "#{$0} client|server"
end

-- 
Eric Hodel - drbrain / segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04