From 7bd2b4901825ff79c01e04679580536f2390b035 Mon Sep 17 00:00:00 2001 From: kazu Date: Sun, 21 May 2017 01:01:10 +0000 Subject: Remove redundant square brackets Use character class directly instead of character class in character class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/csv.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/csv.rb b/lib/csv.rb index 9a861c7327..c93c8f9ec3 100644 --- a/lib/csv.rb +++ b/lib/csv.rb @@ -1014,7 +1014,7 @@ class CSV HeaderConverters = { downcase: lambda { |h| h.encode(ConverterEncoding).downcase }, symbol: lambda { |h| - h.encode(ConverterEncoding).downcase.gsub(/[^[\s\w]]+/, "").strip. + h.encode(ConverterEncoding).downcase.gsub(/[^\s\w]+/, "").strip. gsub(/\s+/, "_").to_sym } } -- cgit v1.2.3