るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.085秒)
トップページ > クエリ:a[x] > クエリ:MalformedCSVError[x]

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. argf.class to_a
  5. dbm to_a

ライブラリ

クラス

キーワード

検索結果

CSV::MalformedCSVError (24000.0)

不正な CSV をパースしようとしたときに発生する例外です。

不正な CSV をパースしようとしたときに発生する例外です。

CSV.new(data, options = Hash.new) -> CSV (166.0)

このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。

...になります。
文字列に追記したい場合は CSV.generate を使用してください。
他の位置から処理したい場合はあらかじめそのように設定した StringIO を渡してください。

@param data String か IO のインスタンスを指定します。...
...ing のインスタンスを指定した場合、CSV#string を使用して
後からデータを取り出すことが出来ます。

@param options CSV をパースするためのオプションをハッシュで指定します。
パフォーマンス上の理由でイ...
...limit
This is a maximum size CSV will read ahead looking for the closing quote
for a field. (In truth, it reads to the first line ending beyond this
size.) If a quote cannot be found within the limit CSV will raise a
MalformedCSVError
, assuming the data is faulty. You can use this lim...

CSV#field_size_limit -> Integer (18.0)

フィールドサイズの最大値を返します。

...ire "csv"

csv = CSV.new(DATA)
csv.field_size_limit # => nil
p csv.read # => [["a", "b"], ["\n2\n2\n", ""]]

DATA.rewind
csv = CSV.new(DATA, field_size_limit: 4)
p csv.field_size_limit # => 4
csv.read # => #<CSV::MalformedCSVError: Field size exceeded on line 2.>

__END__
"a","b"
"
2
2
",""
//}

@se...