るりまサーチ (Ruby 2.1.0)

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

別のキーワード

  1. shell cwd
  2. cwd shell

ライブラリ

クラス

検索結果

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