Error msg with string#sub!

Umm, nevermind. I forgot the replace with part of my expression…

result.sub!(/^\s+/, '')
puts (result)
result.sub!(/$\s+/, '')
···

-----Original Message-----
From: Dwayne Smurdon @ DNA Media Pro [mailto:smurdon@dnamediapro.com]
Sent: Sunday, February 02, 2003 8:04 PM
To: ruby-talk ML
Subject: error msg with string#sub!

When the method below executes, it outputs:

Starting with: (303) 294-0889
step 1
./OutlookContact.rb:44:in `sub!’: wrong # of arguments(1 for 2)
(ArgumentError)

— end output ----
Any idea who a string.sub could have the wrong # of args? Is it because my
result has parens in it?

-Dwayne

---- begin method -----

def resultCleaner(result)
puts (“Starting with:\t #{result}”, “step 1\t”)
result.sub!(/^\s+/)
puts (result)
result.sub!(/$\s+/)
puts ( “Step 2:\t #{result}”, “Final:\t #{result}”)
end