1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Import CSV 3.0.2

This includes performance improvement especially writing. Writing is
about 2 times faster.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2018-12-23 07:00:35 +00:00
parent c20a1946a6
commit e5d634260e
14 changed files with 1466 additions and 687 deletions

20
lib/csv/match_p.rb Normal file
View file

@ -0,0 +1,20 @@
# frozen_string_literal: true
# This provides String#match? and Regexp#match? for Ruby 2.3.
unless String.method_defined?(:match?)
class CSV
module MatchP
refine String do
def match?(pattern)
self =~ pattern
end
end
refine Regexp do
def match?(string)
self =~ string
end
end
end
end
end