From: Ross Bamford Date: 2005-12-29T21:57:55+09:00 Subject: Re: Locking classes? On Thu, 29 Dec 2005 05:04:54 -0000, Steve Litt wrote: > Yeah, on a similar subject, under what circumstances would one want to > add a > method to an object if that method wasn't part of its class? > Check out the way open-uri returns an extended string: require 'open-uri' uri = URI.parse 'http://www.google.com' # s = uri.read #=> " ...[snip]... " s.class #=> String s.base_uri #=> for one example. It's actually several methods in this case, from a module. -- Ross Bamford - rosco@roscopeco.remove.co.uk