From: 7stud -- Date: 2009-08-27T01:38:15+09:00 Subject: Re: spaces in strings Joonas Lindholm wrote: > Brian Candler wrote: > >> ruby 1.7 was only a development version, so you should move to 1.8.6 if >> possible. >> >> However, "it doesn't seem to work" is not a useful problem description. >> You need to show exactly what you ran, the exact output (copy-paste), >> what you expected the output to be, and what platform you are running >> under. >> >> The code snippet you have shown looks OK to me. > > 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.. I get identical results with 1.8.6 and ruby ruby 1.9.1L str = "1 334.64" puts str str.gsub!(/\s/, "") puts str --output:-- 1 334.64 1334.64 I have a hard time believing that ruby 1.8.7 would produce different results--no matter how badly it is screwed up. -- Posted via http://www.ruby-forum.com/.