diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-05 13:33:21 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-05 13:33:21 +0000 |
commit | 60ebd4e26a1b6ed3ad11bade520db0a19e9be190 (patch) | |
tree | 7fd02799a27da1ab9c7f57ab5705100c4dab1d3b /lib/csv | |
parent | 21ce539f20b1376ab4644f9620b0cd1487ae99d6 (diff) |
Merge csv-3.0.0 from ruby/csv repository.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/csv')
-rw-r--r-- | lib/csv/csv.gemspec | 9 | ||||
-rw-r--r-- | lib/csv/row.rb | 5 | ||||
-rw-r--r-- | lib/csv/table.rb | 2 | ||||
-rw-r--r-- | lib/csv/version.rb | 2 |
4 files changed, 14 insertions, 4 deletions
diff --git a/lib/csv/csv.gemspec b/lib/csv/csv.gemspec index 0169c173d6..9d0ccc15af 100644 --- a/lib/csv/csv.gemspec +++ b/lib/csv/csv.gemspec @@ -1,6 +1,10 @@ # frozen_string_literal: true -require_relative "version" +begin + require_relative "lib/csv/version" +rescue LoadError + require_relative "version" +end Gem::Specification.new do |spec| spec.name = "csv" @@ -13,7 +17,8 @@ Gem::Specification.new do |spec| spec.homepage = "https://github.com/ruby/csv" spec.license = "BSD-2-Clause" - spec.files = ["lib/csv.rb", "lib/csv/table.rb", "lib/csv/core_ext/string.rb", "lib/csv/core_ext/array.rb", "lib/csv/row.rb", "lib/csv/version.rb", "README.md", "LICENSE.txt", "news.md"] + spec.files = Dir.glob("lib/**/*.rb") + spec.files += ["README.md", "LICENSE.txt", "news.md"] spec.require_paths = ["lib"] spec.required_ruby_version = ">= 2.3.0" diff --git a/lib/csv/row.rb b/lib/csv/row.rb index 8ff3480ae8..31eab2d0a4 100644 --- a/lib/csv/row.rb +++ b/lib/csv/row.rb @@ -48,6 +48,11 @@ class CSV extend Forwardable def_delegators :@row, :empty?, :length, :size + def initialize_copy(other) + super + @row = @row.dup + end + # Returns +true+ if this is a header row. def header_row? @header_row diff --git a/lib/csv/table.rb b/lib/csv/table.rb index 17a7c542e4..e9f3366a4a 100644 --- a/lib/csv/table.rb +++ b/lib/csv/table.rb @@ -375,4 +375,4 @@ class CSV "#<#{self.class} mode:#{@mode} row_count:#{to_a.size}>".encode("US-ASCII") end end -end +end
\ No newline at end of file diff --git a/lib/csv/version.rb b/lib/csv/version.rb index 35adea3a92..d62a093418 100644 --- a/lib/csv/version.rb +++ b/lib/csv/version.rb @@ -2,5 +2,5 @@ class CSV # The version of the installed library. - VERSION = "1.0.2" + VERSION = "3.0.1" end |