るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. dir chdir
  2. dir open
  3. dir foreach
  4. dir each_child
  5. rake original_dir

ライブラリ

クラス

検索結果

Shell#popdir -> () (54604.0)

ディレクトリスタックからポップし, それをカレントディレクトリにする.

ディレクトリスタックからポップし, それをカレントディレクトリにする.

動作例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.pushd("/tmp")
p sh.cwd #=> "/tmp"
sh.pushd("/usr")
p sh.cwd #=> "/usr"
sh.popd
p sh.cwd #=> "/tmp"