ruby-changes:46712
From: kazu <ko1@a...>
Date: Sun, 21 May 2017 10:01:16 +0900 (JST)
Subject: [ruby-changes:46712] kazu:r58827 (trunk): Remove redundant square brackets
kazu 2017-05-21 10:01:10 +0900 (Sun, 21 May 2017) New Revision: 58827 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58827 Log: Remove redundant square brackets Use character class directly instead of character class in character class. Modified files: trunk/lib/csv.rb Index: lib/csv.rb =================================================================== --- lib/csv.rb (revision 58826) +++ lib/csv.rb (revision 58827) @@ -1014,7 +1014,7 @@ class CSV https://github.com/ruby/ruby/blob/trunk/lib/csv.rb#L1014 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 } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/