diff --git a/NEWS.md b/NEWS.md index cde5426e..58e44322 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,17 @@ # News +## 3.3.5 - 2025-06-01 + +### Improvements + + * docs: Fixed `StringScanner` document URL. + * GH-343 + * Patch by Petrik de Heus + +### Thanks + + * Petrik de Heus + ## 3.3.4 - 2025-04-13 ### Improvements diff --git a/lib/csv/parser.rb b/lib/csv/parser.rb index c1a5e288..4a74e40d 100644 --- a/lib/csv/parser.rb +++ b/lib/csv/parser.rb @@ -47,7 +47,7 @@ class UnexpectedError < StandardError # Uses StringScanner (the official strscan gem). Strscan provides lexical # scanning operations on a String. We inherit its object and take advantage # on the methods. For more information, please visit: - # https://ruby-doc.org/stdlib-2.6.1/libdoc/strscan/rdoc/StringScanner.html + # https://docs.ruby-lang.org/en/master/StringScanner.html # class Scanner < StringScanner alias_method :scan_all, :scan diff --git a/lib/csv/version.rb b/lib/csv/version.rb index ef35cbb9..227f7f75 100644 --- a/lib/csv/version.rb +++ b/lib/csv/version.rb @@ -2,5 +2,5 @@ class CSV # The version of the installed library. - VERSION = "3.3.4" + VERSION = "3.3.5" end diff --git a/test/csv/helper.rb b/test/csv/helper.rb index ff3aa38b..79c5fe05 100644 --- a/test/csv/helper.rb +++ b/test/csv/helper.rb @@ -40,3 +40,7 @@ def with_default_internal(encoding) end end end + +class Ractor + alias value take unless method_defined? :value +end if defined?(Ractor) diff --git a/test/csv/interface/test_read.rb b/test/csv/interface/test_read.rb index cc0d3faa..bd55ae7d 100644 --- a/test/csv/interface/test_read.rb +++ b/test/csv/interface/test_read.rb @@ -64,7 +64,7 @@ def test_foreach_in_ractor ["1", "2", "3"], ["4", "5"], ] - assert_equal(rows, ractor.take) + assert_equal(rows, ractor.value) end end @@ -315,7 +315,7 @@ def test_read_in_ractor ["1", "2", "3"], ["4", "5"], ] - assert_equal(rows, ractor.take) + assert_equal(rows, ractor.value) end end diff --git a/test/csv/interface/test_write.rb b/test/csv/interface/test_write.rb index 0cd39a76..52f67e05 100644 --- a/test/csv/interface/test_write.rb +++ b/test/csv/interface/test_write.rb @@ -33,7 +33,7 @@ def test_generate_default_in_ractor csv << [1, 2, 3] << [4, nil, 5] end end - assert_equal(<<-CSV, ractor.take) + assert_equal(<<-CSV, ractor.value) 1,2,3 4,,5 CSV @@ -125,7 +125,6 @@ def test_append_row CSV end - if respond_to?(:ractor) ractor def test_append_row_in_ractor @@ -136,7 +135,7 @@ def test_append_row_in_ractor CSV::Row.new([], ["a", "b", "c"]) end end - ractor.take + ractor.value assert_equal(<<-CSV, File.read(@output.path, mode: "rb")) 1,2,3 a,b,c