From: Michael Sas Date: 2012-12-16T02:15:07+09:00 Subject: by value - by reference, circular reference Hi, i have a circular reference between two classes. Initialize of one needs the other. Small example: A.new b_instance B.new a_instance So I thought I could do: a = A.new nil b = B.new a a = A.new B The attached valuedemo.rb contains a executable example of how i tried to do and shows the problem. It also showes where i get confused about call by value or call by reference. As I understand param in the example is not equal but the same to @param. So param and @param are references to the same object, rather identical copies of an object. So if the value changes in one place, it should change every where. It doesn't, so its clear my understanding is wrong. I would be happy about general advice on solving circular references too. Attachments: http://www.ruby-forum.com/attachment/7971/valuedemo.rb -- Posted via http://www.ruby-forum.com/.