# Passing to with drb

**URL:** <https://www.ruby-forum.com/t/passing-to-with-drb/157219>\
**Category:** Ruby\
**Created:** [January 8, 2009, 4:30pm UTC](https://www.ruby-forum.com/t/passing-to-with-drb/157219 "2009-01-08T16:30:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Larz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/85f322/32.png) [@Larz](https://www.ruby-forum.com/u/Larz)\
**Post date:** [January 8, 2009, 4:30pm UTC](https://www.ruby-forum.com/t/passing-to-with-drb/157219/1 "2009-01-08T16:30:47Z")

</div>

I’ve been finding it easiest to pass hashes and arrays to DRb  
processes because of what it can marshal. It would be nice if I could  
pass a Struct or something as hash notation is extra verbose and I’d  
like to be able to use the ‘dot’ notation. I guess I’d have to use  
some sort of hash to Struct conversion after recieving the hash,  
anyone else thought about that type of thing ?

---

<div class="post-metadata">

**Author:** ![Larz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/85f322/32.png) [@Larz](https://www.ruby-forum.com/u/Larz)\
**Post date:** [January 8, 2009, 11:05pm UTC](https://www.ruby-forum.com/t/passing-to-with-drb/157219/2 "2009-01-08T23:05:43Z")

</div>

Larz wrote:

> I’ve been finding it easiest to pass hashes and arrays to DRb  
> processes because of what it can marshal. It would be nice if I could  
> pass a Struct or something as hash notation is extra verbose and I’d  
> like to be able to use the ‘dot’ notation. I guess I’d have to use  
> some sort of hash to Struct conversion after recieving the hash,  
> anyone else thought about that type of thing ?

No need, you can pass your native struct (or any other Ruby class).  
However both client and server processes need the class definition. If  
you stick this in a file which they both require, then the job is done.
