On Aug 14, 2008, at 10:43 AM, Patrick Li wrote: > Hi, > I'm having a hard time spotting my bug in this code. > When it runs it gives me: > uninitialized constant String::StringIO (NameError) > > Am I missing something? StringIO is a global constant. Why can't ruby > find it? > > class String > def self.fromURL(string) > string = string.string if string.is_a?(StringIO) > CGI.unescape(string) > end > end > > Thanks a lot for your help > -Patrick > -- > Posted via http://www.ruby-forum.com/. > require 'stringio' a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama