Prev: Newbie
Next: RubyGems 1.3.7
From: Cs Webgrl on 1 Jul 2010 09:51 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 3 Jul 2010 14:12
[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. |