るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

クラス

検索結果

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

Shell#popd -> () (25.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"