From: Brian Candler Date: 2009-08-27T00:00:15+09:00 Subject: Re: spaces in strings Joonas Lindholm wrote: > Ups, what I meant is that the 1.8.6 is the version I have home and at > other computer 1.8.7. But if the gsub!(/\s/, '') looks fine I have to do > more testing.. Yep. Are you running a standalone program, or in irb? In the first case, paste the program you are running, and its output. In the second case, paste the irb transcript. e.g. $ irb --simple-prompt >> s = "1 334.64" => "1 334.64" >> s.gsub!(/\s/, '') => "1334.64" >> s => "1334.64" >> Note that gsub! modifies the string in-place, and returns nil if no change was made. -- Posted via http://www.ruby-forum.com/.