So the problem doesn't seem to be with sub! at all. It's with cgi.

If I get the variable "a" using the cgi code above, then I create string 
"b":

a = cgi['a']
b = String.new

a.class
=> String
b.class
=> String

So they should have the same methods since they are the same class. 
However, "a" seems to have extra methods.
a.first
=> "hi"
b.first
NoMethodError: undefined method `first' for "":String


It seems the cgi object is returning strings that aren't really strings. 
If that's the case, isn't it a bug that cgi['a'].class returns "String" 
when it is really something else?
-- 
Posted via http://www.ruby-forum.com/.