49件ヒット
[1-49件を表示]
(0.023秒)
種類
- インスタンスメソッド (35)
- 文書 (14)
ライブラリ
- pathname (35)
クラス
- Pathname (35)
キーワード
-
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (6) -
each
_ entry (13) -
each
_ line (22)
検索結果
先頭5件
-
Pathname
# each _ entry {|pathname| . . . } -> nil (21193.0) -
Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。
....foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。
//emlist[例][ruby]{
require "pathname"
Pathname("/usr/local").each_entry {|f| p f }
# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:......opt>
//}
@see Dir.foreach.......foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
require "pathname"
Pathname("/usr/local").each_entry {|f| p f }
# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:......etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
//}
@see Dir.foreach... -
Pathname
# each _ entry -> Enumerator (21093.0) -
Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。
....foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
require "pathname"
Pathname("/usr/local").each_entry {|f| p f }
# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:......etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
//}
@see Dir.foreach... -
Pathname
# each _ line(*args) -> Enumerator (21076.0) -
IO.foreach(self.to_s, *args, &block) と同じです。
...IO.foreach(self.to_s, *args, &block) と同じです。
//emlist[例][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}
//emlist[例 ブロックを指定][ruby]{
require "pathname"
IO.write("tes......tfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line {|f| p f }
# => "line1\n"
# => "line2,\n"
# => "line3\n"
//}
//emlist[例 limit を指定][ruby]{
require "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("testfile").each_line(",") {|f| p f }
# => "line1\nline2,"
# => "\nline3\n"
//}
@see IO.foreach... -
Pathname
# each _ line(*args) {|line| . . . } -> nil (21076.0) -
IO.foreach(self.to_s, *args, &block) と同じです。
...IO.foreach(self.to_s, *args, &block) と同じです。
//emlist[例][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}
//emlist[例 ブロックを指定][ruby]{
require "pathname"
IO.write("tes......tfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line {|f| p f }
# => "line1\n"
# => "line2,\n"
# => "line3\n"
//}
//emlist[例 limit を指定][ruby]{
require "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("testfile").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 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...推奨になる予定で、
今は警告が出ます。 14643
* File
* File.read, File.binread, File.write, File.binwrite,
File.foreach, File.readlines はパスがパイプ文字 '|' で始まっていても
外部コマンドを実行しなくなりました。 14245
*......りました。
* BigDecimal.new はバージョン 2.0 で削除予定です。
* Pathname
* Pathname#read, Pathname#binread, Pathname#write,
Pathname#binwrite, Pathname#each_line, Pathname#readlines は
パスがパイプ文字 '|' で始まっていても外部コマンド... -
NEWS for Ruby 2
. 4 . 0 (24.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
* Kernel#clone は freeze とい......ト 4217
* Net::FTP.new の引数をキーワード引数に対応しました
* Net::FTP#status に省略可能なキーワード引数 pathname を追加
solebox による貢献。https://github.com/ruby/ruby/pull/1478 12965
* openssl
* Ruby/OpenSSL 2.0
OpenSSL は https......して残っています。
* optparse
* OptionParser#parseやOptionParser#orderにキーワード引数 into を追加 11191
* pathname
* Pathname#empty? を追加 12596
* readline
* Readline.quoting_detection_proc, Readline.quoting_detection_proc= を追加
12659
* re...