From: Hiroharu Sugawara Date: 2003-02-01T09:04:29+09:00 Subject: Re: Overriding methods in inherited classes Travis, On Sat, 1 Feb 2003 03:07:07 +0900 Travis Whitton wrote: > Following my long withstanding tradition of following up my own posts, I > believe I have a solution. Does anybody see any problem with doing the > following? > > require 'cgi' > > class SCGI < CGI > module QueryExtension > def [](*args) > if @params[*args] > return @params[*args][0] > end > end > end Another possible solution: def [](key); @params[key].to_s; end I'm not sure about the behavior of cgi.[] method, though we cannot predict the class of return object anyway in Ruby. -- susu