From: dave.burt@... Date: 2005-05-06T15:04:25+09:00 Subject: Re: object reference handle (like perl's reference to scalar) This is not possible, unfortunately. In Ruby, fname = "Eric" is just an assignment to a local variable. There are no method calls involved, and nothing to intercept. You can, of course, go even further and remove the =, leaving: fname "Eric" Reminds me of Traits (nee Attributes). In this case, "fname" would be a method, which means it would not be an object. You could create a thing like this using code like the following: def define_attribute(method_name) singleton_class = (class << self; self end) singleton_class.instance_eval do define_method method_name do |*args| if args.empty? instance_variable_get("@#{method_name}") else instance_variable_set("@#{method_name}", *args) end end end singleton_class end define_attribute :fname #=> #> fname "Eric" #=> "Eric" fname #=> "Eric" # or even on an object, OpenStruct-ishly: foo = "bar" foo.define_attribute "baz" #=> #> foo.baz 42 #=> 42 foo.baz #=> 42 But I digress wildly, I fear. Back to references, here's your example worked with my above ref.rb # Please add the following line to the top of ref.rb: require 'delegate' # on with the example require 'ref' hacker = ["bot","pen","a",5,10].map{|x|x.ref}.ref name = hacker[0..2] fname = name[0] lname = name[1] mname = name[2] height = hacker[3..4] feet = height[0] # I corrected an off-by one here inches = height[1] # and here fname[] = "Eric" # or like this: fname.ref = "Eric" lname[] = "Mahurin" mname[] = "?" feet[] = 6 inches[] = 5 p name #=> ["Eric","Mahurin","?"] p height #=> [6,5] p hacker #=> ["Eric","Mahurin","?",6,5]