From: Ye Dingding Date: 2007-09-02T23:34:04+09:00 Subject: How to extend a method? ------=_Part_6074_16207715.1188743641606 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Class A attr_accessor :a def initialize self.a = 'a' end end I want to extend class A and add a new instance variable b. How can i do this? Class A attr_accessor :b def initialize ----------------------------------------------- How can i initialize the variable b. Must i rewrite the whole method, like self.a = 'a' self.b = 'b' ----------------------------------------------- end end ------=_Part_6074_16207715.1188743641606--