IƱaki Baz Castillo wrote:
>    #what I want but it's not possible:

 There is always the stupid way

vgs% cat b.rb
#!/usr/bin/ruby
class A
   class Int__
      def initialize(obj, name)
         @self = obj
         @name = name
      end

      def []=(x, y)
         s = @self
         n = @name
         s.instance_eval {
            instance_variable_get(n)[x] = y
            @modified = true
         }
      end
   end

   def param
      @param ||= {}
      Int__.new(self, '@param')
   end
end

a = A.new
a.param[:x] = 24
p a
vgs% 

vgs% ./b.rb
#<A:0xb7c9e3cc @param={:x=>24}, @modified=true>
vgs% 


Guy Decoux