I am a little confused about object assignment and pointers in Ruby, and coded up this snippet to test my assumptions.
class Foo
attr_accessor :one, :two
You never deal with a copy. It's the same object in memory, but you just declare 2 references to it: in your first example: bar and beans point towards the same object in memory; and in your second example: foo and baz point to the same array in memory initially.
Check out the 2 picture/drawings, in the Java tutorial page that explains the mechanism (it's the same as in Ruby) and those 2 pictures only, worth more than any explanation in words: http://docs.oracle.com/javase/tutorial/java/javaOO/objectcreation.html