From 3fb752a921a56fb4ea3188fb12f02f6a5749480e Mon Sep 17 00:00:00 2001 From: jeg2 Date: Thu, 20 Mar 2014 14:38:21 +0000 Subject: * lib/csv.rb: Fixed a broken regular expression that was causing CSV to miss escaping some special meaning characters when used in parsing. Reported by David Unric [ruby-core:54986] [Bug #8405] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/csv.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/csv.rb b/lib/csv.rb index e5ecf5c9a8..2326792cd7 100644 --- a/lib/csv.rb +++ b/lib/csv.rb @@ -1507,8 +1507,7 @@ class CSV # if we can transcode the needed characters # @re_esc = "\\".encode(@encoding) rescue "" - @re_chars = /#{%"[-][\\.^$?*+{}()|# \r\n\t\f\v]".encode(@encoding)}/ - # @re_chars = /#{%"[-][\\.^$?*+{}()|# \r\n\t\f\v]".encode(@encoding, fallback: proc{""})}/ + @re_chars = /#{%"[-\\]\\[\\.^$?*+{}()|# \r\n\t\f\v]".encode(@encoding)}/ init_separators(options) init_parsers(options) -- cgit v1.2.3