るりまサーチ

最速Rubyリファレンスマニュアル検索!
32件ヒット [1-32件を表示] (0.017秒)

別のキーワード

  1. _builtin tmpfile
  2. constants tmpfile
  3. tmpfile _builtin
  4. tmpfile file::constants

ライブラリ

クラス

キーワード

検索結果

File#path -> String (18144.0)

オープン時に使用したパスを文字列で返します。

...:TMPFILEオプション付きで作成されていたりする場合です。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE)...
...{|f| f.path } #=> "/tmp"
//}...
...です。

@raise IOError TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../t...
...mp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}...

File#to_path -> String (6144.0)

オープン時に使用したパスを文字列で返します。

...:TMPFILEオプション付きで作成されていたりする場合です。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE)...
...{|f| f.path } #=> "/tmp"
//}...
...です。

@raise IOError TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../t...
...mp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}...

NEWS for Ruby 2.5.0 (30.0)

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

...た 11286

* File
* File.open :newline オプションを指定するとテキストモードになります 13350
* File#path はFile::Constants::TMPFILE付きで開いたファイルに対して IOError を発生させます
13568
* File.stat, File.exist? など rb_stat() を...
...つか読み込んでから、Coverage.result を使って結果を取得することができます。
//emlist[][ruby]{
Coverage.result
#=> { "/path/to/file.rb"=>
# { :lines => [1, 2, 0, nil, ...],
# :branches =>
# { [:if, 0, 2, 1, 6, 4] =>
# { [:then, 1, 3, 2, 3, 8]...
...ッジのみを計測します。
また Coverage.result も旧フォーマットを返します。
//emlist[][ruby]{
Coverage.result
#=> { "/path/to/file.rb"=> [1, 2, 0, nil, ...] }
//}

* drb
* ACL::ACLEntry.new は IPAddr::InvalidPrefixError を抑制しなくなりました

* erb...