diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-21 01:01:10 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-21 01:01:10 +0000 |
commit | 7bd2b4901825ff79c01e04679580536f2390b035 (patch) | |
tree | 8f59e1c47d2057095cfa62915b982fc32c1acf48 /lib | |
parent | 61aa046b5a0bedea79909b58921568220d4231fd (diff) | |
download | ruby-7bd2b4901825ff79c01e04679580536f2390b035.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csv.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 } } |