8 Commits

Author SHA1 Message Date
Yuki Tsujimoto
e151a2ff8e [ruby/csv] docs: fix example in Recipe: Capture Unconverted Fields
(https://github.com/ruby/csv/pull/276)

I've fixed the example in `Recipe: Capture Unconverted Fields`.

https://ruby.github.io/csv/doc/csv/recipes/parsing_rdoc.html#label-Recipe-3A+Capture+Unconverted+Fields

`parsed` is wrong: header row is missing and the values should be
integers.

```
$ ruby -v
ruby 3.2.1 (2023-02-08 revision https://github.com/ruby/csv/commit/31819e82c8) [x86_64-darwin21]

$ cat unconverted_fields.rb
require "csv"

source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
parsed = CSV.parse(source, converters: :integer, unconverted_fields: true)
p parsed
parsed.each {|row| p row.unconverted_fields }

$ ruby unconverted_fields.rb
[["Name", "Value"], ["foo", 0], ["bar", 1], ["baz", 2]]
["Name", "Value"]
["foo", "0"]
["bar", "1"]
["baz", "2"]
```
2023-05-25 01:44:17 +09:00
Burdette Lamar
81c57ae7ac [ruby/csv] Small RDoc changes for recipes
(https://github.com/ruby/csv/pull/190)

https://github.com/ruby/csv/commit/2102c78384
2023-05-25 01:44:17 +09:00
Sampat Badhe
677ccb927c [ruby/csv] fix typo conveters => converters for CSV parsing docs (#196)
https://github.com/ruby/csv/commit/77ccf486fe
2020-12-27 15:27:03 +09:00
Kazuhiro NISHIYAMA
85a7f723c3
Fix a typo [ci skip] 2020-12-14 10:26:04 +09:00
Burdette Lamar
20a9131270 [ruby/csv] RDoc recipes for RFC-compliant generation (#187)
https://github.com/ruby/csv/commit/5adeaff91f
2020-11-24 09:33:55 +09:00
Burdette Lamar
d48e688f64 [ruby/csv] RDoc recipes for diagnostics (#186)
https://github.com/ruby/csv/commit/d9e67918e2
2020-11-24 09:33:55 +09:00
Burdette Lamar
9266410c7a [ruby/csv] RDoc Recipes for write converters and RFC 4180 compliance (#185)
https://github.com/ruby/csv/commit/bee48b04c4
2020-11-24 09:33:55 +09:00
Burdette Lamar
c5fcafd2fd [ruby/csv] Split recipes into three pages: parsing, generating, filtering (#184)
Co-authored-by: Sutou Kouhei <kou@clear-code.com>

https://github.com/ruby/csv/commit/f0bab6a592
2020-11-24 09:33:55 +09:00