From: Michael Linfield Date: 2007-09-28T02:18:43+09:00 Subject: gsub-ing each character I want to convert certain letters to numbers on a gets.chomp.. my initial approach was this---- words = gets.chomp new = words.each {|p| p.gsub(/[h]/, '00')} puts new ##### however this doesnt work the miracle :) new = words.gsub(/[h]/, '00') puts new ##### this works perfectly, but the problem occurs if i want to gsub more than one character as if i have new = another.gsub then puts new only outputs the last gsub. Ideas? Thanks! -- Posted via http://www.ruby-forum.com/.