るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

クラス

検索結果

Shell#popdir -> () (18301.0)

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

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

動作例
r
equire '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"...