るりまサーチ

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

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

クラス

検索結果

Pathname#expand_path(default_dir = '.') -> Pathname (18160.0)

Pathname.new(File.expand_path(self.to_s, *args)) と同じです。

...w(File.expand_path(self.to_s, *args)) と同じです。

@
param default_dir self が相対パスであれば default_dir を基準に展開されます。

//emlist[例][ruby]{
require
"pathname"

path = Pathname("testfile")
Pathname.pwd # => #<Pathname:/path/to>
path.expand_path...
...# => #<Pathname:/path/to/testfile>
path.expand_path("../") # => #<Pathname:/path/testfile>
//}

@
see File.expand_path...