Prev: Newbie
Next: RubyGems 1.3.7
From: Cs Webgrl on
Awesome guidelines. Thank you so much for taking the time to write this
up and help me understand how everything works.

Much appreciated Josh!


--
Posted via http://www.ruby-forum.com/.

From: Josh Cheek on
[Note: parts of this message were removed to make it a legal post.]

On Wed, Jun 30, 2010 at 4:10 PM, Josh Cheek <josh.cheek(a)gmail.com> wrote:

> You can use s.delete('+') instead of s.gsub('+','') and it will be faster,
> prettier, and more expressive.
>

This is wrong, delete removes the intersection of characters, you do need
to use gsub. I guess the speed comparison is not relevant, but it is still
uglier and less expressive -- but more correct.

First  |  Prev  | 
Pages: 1 2
Prev: Newbie
Next: RubyGems 1.3.7