From: Tom Sawyer Date: 2002-07-24T02:01:39+09:00 Subject: Re: Strings and member-operators uh, not without the test suite...but i still had the old message so i went back and looked at the test suite code and figured it out. jeez. two simple bloopers a -1 was supposed to be a -2 and i wan't returning str on a non-match. does this pass now? return str[0..0] + str[-1..-1] == '""' ? str[1..-2].strip : str i was just trying to do it without regexp. thanks, transami ~ On Tue, 2002-07-23 at 10:42, Josh Huber wrote: > Tom Sawyer writes: > > > really? what did it fail on? > > Dossy showed the output of the test suite: > > >> Failure occurred in test_do_nothing(StripQuotesTest) > >> [tc_ts_strip_quotes.rb:5]: Expected but was > > >> Failure occurred in test_strip_doublequotes(StripQuotesTest) > >> [tc_ts_strip_quotes.rb:9]: didn't remove outer double quotes. Expected > >> but was > > >> Failure occurred in test_strip_whitespace(StripQuotesTest) > >> [tc_ts_strip_quotes.rb:20]: didn't strip trailing whitespace. Expected > >> but was > > >> Finished in 0.00509 seconds. > >> 3 runs, 3 assertions, 3 failures, 0 errors > > ttyl, > > -- > Josh Huber > -- ~transami