if I have these methods in a class:

def initialize(x, y)
  @x, @y = x, y
end

def foo
  @z = @x + @y
end

def bar
  foo
  @z * 2
end

What if I want to redefine @x inside method "foo" but only in there?

is there a simple way to do this?
-- 
Posted via http://www.ruby-forum.com/.