るりまサーチ

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

別のキーワード

  1. _builtin each
  2. _builtin each_line
  3. prime each
  4. each
  5. tsort tsort_each

ライブラリ

クラス

検索結果

Pathname#each_line(*args) -> Enumerator (39174.0)

IO.foreach(self.to_s, *args, &block) と同じです。

...]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}

//emlist[例 ブロックを指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line {|f| p f }...
...uire "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line(4) {|f| p f }

# => "line"
# => "1\n"
# => "line"
# => "2,\n"
# => "line"
# => "3\n"
//}

//emlist[例 sep を指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("tes...
...tfile").each_line(",") {|f| p f }

# => "line1\nline2,"
# => "\nline3\n"
//}

@see IO.foreach...

Pathname#each_line(*args) {|line| ... } -> nil (39174.0)

IO.foreach(self.to_s, *args, &block) と同じです。

...]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}

//emlist[例 ブロックを指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line {|f| p f }...
...uire "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line(4) {|f| p f }

# => "line"
# => "1\n"
# => "line"
# => "2,\n"
# => "line"
# => "3\n"
//}

//emlist[例 sep を指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("tes...
...tfile").each_line(",") {|f| p f }

# => "line1\nline2,"
# => "\nline3\n"
//}

@see IO.foreach...

NEWS for Ruby 2.6.0 (48.0)

NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...りました。
* BigDecimal.new はバージョン 2.0 で削除予定です。

* Pathname
* Pathname#read, Pathname#binread, Pathname#write,
Pathname
#binwrite, Pathname#each_line, Pathname#readlines は
パスがパイプ文字 '|' で始まっていても外部コマンド...

NEWS for Ruby 2.4.0 (36.0)

NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ようになりました。
half には :even, :up, :down が指定可能です。 12548 12958 12953

* IO
* IO#gets, IO#readline, IO#each_line, IO#readlines, IO.foreach は
chomp というキーワード引数を受け付けるようになりました。12553

* Kernel
* Ker...
...String#casecmp? を追加 12786
* String#concat, String#prepend 複数の引数を受け付けるようになりました 12333
* String#each_line, String#lines 省略可能なキーワード引数 chomp を受け付けるようになりました 12553
* String#match? を追加 12898...
...ト 4217
* Net::FTP.new の引数をキーワード引数に対応しました
* Net::FTP#status に省略可能なキーワード引数 pathname を追加
solebox による貢献。https://github.com/ruby/ruby/pull/1478 12965

* openssl
* Ruby/OpenSSL 2.0
OpenSSL は https...

NEWS for Ruby 2.0.0 (30.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...str.lines.with_index(1) {|line, lineno| ... } # str.lines が配列を返すのでもう動かない
str.each_line.with_index(1) {|line, lineno| ... } # このように each_line に置き換える
//}

* IO#lines, IO#chars, IO#codepoints, IO#bytes, ARGF#lines, ARGF#chars,
ARGF#bytes,...
...gIO#codepoints, StringIO#bytes,
Zlib::GzipReader#lines, Zlib::GzipReader#bytes
* これらのメソッドは非推奨になりました。each_line, each_byte, each_char, each_codepoint を使ってください。

* Proc#==, m:Proc#eql?
* 削除されました。2つの Proc オブジ...
...: OpenStruct#to_h
* 拡張: OpenStruct.new OpenStruct/Struct のインスタンスを受け付けるようになりました

* pathname
* 拡張: Pathname#find ブロックを与えない場合 Enumerator を返すようになりました

* rake
* 0.9.5 に更新
* This versi...

絞り込み条件を変える

NEWS for Ruby 3.0.0 (18.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...* String#delete_suffix
* String#downcase
* String#dump
* String#each_char
* String#each_grapheme_cluster
* String#each_line
* String#gsub
* String#ljust
* String#lstrip
* String#partition
* String#reverse
* String#rjust
* Stri...
...ng with `!`.
* Ractor compatible.
* Improved support for YAML. 8382
* Use officially discouraged. Read OpenStruct@Caveats section.
* Pathname
* Ractor compatible.
* Psych
* Update to Psych 3.3.0
* This version is Ractor compatible.
* Reline
* Update to Reline 0.1.5...
...ef
* The following extensions are promoted to default gems from stdlib.
* digest
* io-nonblock
* io-wait
* nkf
* pathname
* syslog
* win32ole
* Bundled gems
* net-telnet and xmlrpc have been removed from the bundled gems. If you are interested in m...