aboutsummaryrefslogtreecommitdiffstats
path: root/lib/csv.rb
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-21 01:01:10 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-21 01:01:10 +0000
commit7bd2b4901825ff79c01e04679580536f2390b035 (patch)
tree8f59e1c47d2057095cfa62915b982fc32c1acf48 /lib/csv.rb
parent61aa046b5a0bedea79909b58921568220d4231fd (diff)
downloadruby-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/csv.rb')
-rw-r--r--lib/csv.rb2
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
}
}