I'm working with dRuby and basicly I'm calling a remote method that returns me an object.
In the clientside I have this code:
handle_error(response) if response.is_a?(Error)
where response is the DRbObject. (I've developed this code before using dRuby and I'm returning an Error object if something went wrong). The problem is that now
response.is_a?(Error)
comes back with "false" because the object is actually a DRbObject. Any idea on how I can check the class of my application object?
Thanks! Roberto
Although I'm not sure how DRb manages the remote objects, I'd expect it to modify #kind_of? to keep the class hierarchy on the remote object, so you could do:
If this doesn't work you can always ask it if it responds to an specific method and go from there