るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

検索結果

Shell#popdir -> () (18201.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"