class String
remove_method(:each)
end
class Object
def reach
if(x.respond_to?(:each))
self.each{|x| x.reach(yield)}
else
yield(self)
end
end
end
This is my code.. I keep getting the error that it can't find the local
variable 'x' .... why???
--
Posted via http://www.ruby-forum.com/.