From: Sean O'Halpin Date: 2008-05-30T05:45:46+09:00 Subject: Re: customize a gem method On Thu, May 29, 2008 at 9:42 AM, Abir B. wrote: > Hello, > I want to customize a method of a gem wuthout changing the source code > of this gem . > Is that possible? Sure is: require 'rubygems' require 'pdf/writer' w = PDF::Writer.new w.text_width("Hello World") # => 51.67 class PDF::Writer def text_width(s) 42.0 end end w.text_width("Hello World") # => 42.0 Regards, Sean