transfire / gmail.com wrote:

> Ah! Of course, Thank you. Unfortuantely NOW I need class local methods!
> :(

Well, this leads me to ask again about these state of affairs for a
future Ruby. Are we going to get local instance vars? I think the
suggested notation was @_. And likewise what of local methods?

If I recall correctly I think that last thing I suggest was making all
instance vars local, which would measn accessors were paramount in
sharing data better levels and then local methods could be defined with


  def @method()

But maybe that's too much. Anyway it's just a thought. I don't really
care so much how it's done just so long as it becomes possible. If you
want a usecase, my particular case is defining cross-concerns, I want
to be able to access the internal state of the class hierachy in
general as we do now, while maintiang a separate local state (for the
concern) as well.

On a side note I think I found a bug in Ruby, maybe

  class X
    def self.method_added(name)
      p name
    end
  end

  class X
    def x; end
   end
   => :x

  class << X
    undef_method :method_added
  end

  class X
    def y; end
  end
  => NoMethodError: undefined method `method_added' for X:Class


</Trans>