From: Jim Freeze Date: 2002-01-17T03:16:33+09:00 Subject: Protecting a member hash Hi: I have a class that stores data in a hash. I would like the user to be able to retrieve values from the hash, but not modify it. class Test attr_reader :entity def initialize @entity = {'a'=>"fred"} end end t = Test.new p t.entity #=> {"a"=>"fred"} t.entity['a'] = "changed" p t.entity #-> {"a"=>"changed"} Other than freezing @entity, is it possible top protect it from being changed? Thanks -- Jim Freeze Today is a fine day for Ruby programming. www.freeze.org