From: Tasos Laskos Date: 2010-06-29T02:31:38+09:00 Subject: Regex.escape bug Hi guys, I'm using "ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]" and just noticed a possible bug in Regex.escape() while using it with gsub() This: -------- pp Regexp.escape( '.rb' ) -------- yields: -------- "\\.rb" -------- while it should be "\.rb". Regexp.new( '.rb' ) or Regexp.new( '\.rb' ) work though, they replaces the ".rb" string as expected. Yes I know that "Regexp.new( '.rb' )" works incidentally but I'm just mentioning it. :) -- Posted via http://www.ruby-forum.com/.