526件ヒット
[1-100件を表示]
(0.031秒)
別のキーワード
種類
- インスタンスメソッド (216)
- モジュール関数 (168)
- 文書 (106)
- 特異メソッド (24)
- ライブラリ (12)
ライブラリ
- ビルトイン (336)
-
irb
/ cmd / help (12) -
irb
/ cmd / load (36) -
rubygems
/ installer (24)
クラス
- BasicObject (36)
-
File
:: Stat (24) -
Gem
:: Installer (24) -
IRB
:: ExtendCommand :: Help (12) -
IRB
:: ExtendCommand :: Load (12) -
IRB
:: ExtendCommand :: Require (12) -
IRB
:: ExtendCommand :: Source (12) - Module (24)
- String (84)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 3
. 1 . 0 (4) - Rubyの起動 (12)
- []= (84)
- ` (12)
-
class
_ exec (12) -
exec
_ format (12) - executable? (12)
-
executable
_ real? (24) - execute (48)
-
instance
_ eval (24) -
instance
_ exec (12) -
module
_ exec (12) - new (12)
-
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
rubygems
/ commands / install _ command (12) - spawn (48)
- system (48)
- セキュリティモデル (12)
- 多言語化 (12)
検索結果
先頭5件
-
rubygems
/ commands / install _ command (26042.0) -
Gem パッケージをローカルリポジトリにインストールするためのライブラリです。
...o-]test インストール時にユニットテストを実行します
-w, --[no-]wrappers Use bin wrappers for executables
DOSHISH なプラットフォーム上では無効です
-P, --trust-policy POLICY Spec......ジをインストールします
--[no-]format-executable Make installed executable names match ruby.
If ruby is ruby18, foo_exec will be
foo_exec18
Local/Remote Options:
-l, --local......た設定ファイルを使用します
--backtrace バックトレースを表示します
--debug Ruby 自体のデバッグオプションを有効にします
Arguments:
GEMNAME インストールする Gem パッケージ... -
Kernel
. # exec(env , program , *args , options={}) -> () (18144.0) -
引数で指定されたコマンドを実行します。
...動に成功した場合、このメソッドからは戻りません。
この形式では、常に shell を経由せずに実行されます。
exec(3) でコマンドを実行すると、
元々のプログラムの環境をある程度(ファイルデスクリプタなど)引き継ぎます......raise Errno::EXXX 起動に失敗し、ruby インタプリタに制御が戻った場合に発生します。
//emlist[例][ruby]{
# a.rb
exec ['sleep', 'mysleep'], '600'
//}
上記スクリプトを実行すると以下のようになります。
$ ruby a.rb
## sleep してるので制御......替えて以下を実行
$ ps aux|grep sleep
xxxx 32754 0.0 0.0 2580 468 pts/3 S+ 22:01 0:00 mysleep 600
xxxx 32761 0.0 0.0 2824 792 pts/6 S+ 22:01 0:00 grep sleep
@see Kernel.#system,Kernel.#`,Kernel.#spawn,Kernel.#fork,IO.popen,IO.pipe,Kernel.#open,exec(3)... -
Kernel
. # exec(program , *args , options={}) -> () (18144.0) -
引数で指定されたコマンドを実行します。
...動に成功した場合、このメソッドからは戻りません。
この形式では、常に shell を経由せずに実行されます。
exec(3) でコマンドを実行すると、
元々のプログラムの環境をある程度(ファイルデスクリプタなど)引き継ぎます......raise Errno::EXXX 起動に失敗し、ruby インタプリタに制御が戻った場合に発生します。
//emlist[例][ruby]{
# a.rb
exec ['sleep', 'mysleep'], '600'
//}
上記スクリプトを実行すると以下のようになります。
$ ruby a.rb
## sleep してるので制御......替えて以下を実行
$ ps aux|grep sleep
xxxx 32754 0.0 0.0 2580 468 pts/3 S+ 22:01 0:00 mysleep 600
xxxx 32761 0.0 0.0 2824 792 pts/6 S+ 22:01 0:00 grep sleep
@see Kernel.#system,Kernel.#`,Kernel.#spawn,Kernel.#fork,IO.popen,IO.pipe,Kernel.#open,exec(3)... -
Kernel
. # exec(command , options={}) -> () (18134.0) -
引数で指定されたコマンドを実行します。
...EXXX 起動に失敗し、ruby インタプリタに制御が戻った場合に発生します。
//emlist[例][ruby]{
# a.rb
puts '実行前'
exec 'echo "実行中"'
puts '実行後'
//}
上記のスクリプトを実行すると以下のようになります。
$ ruby a.rb
実行前
実... -
Kernel
. # exec(env , command , options={}) -> () (18134.0) -
引数で指定されたコマンドを実行します。
...EXXX 起動に失敗し、ruby インタプリタに制御が戻った場合に発生します。
//emlist[例][ruby]{
# a.rb
puts '実行前'
exec 'echo "実行中"'
puts '実行後'
//}
上記のスクリプトを実行すると以下のようになります。
$ ruby a.rb
実行前
実... -
Rubyの起動 (6273.0)
-
Rubyの起動 * cmd_option * shebang
...Rubyの起動
* cmd_option
* shebang
Rubyインタプリタの起動は以下の書式のコマンドラインにより行います。
ruby [ option ...] [ -- ] [ programfile ] [ argument ...]
ここで、option は後述のcmd_option
のいずれかを指定します。-- は、オプシ......ョン列の終りを明示するため
に使用できます。programfile は、Ruby スクリプトを記述したファイ
ルです。これを省略したり`-' を指定した場合には標準入力を Ruby ス
クリプトとみなします。
programfile が `#!' で始まるファイル......!/bin/sh
exec ruby -S -x $0 "$@"
#! ruby
//}
システムは最初の行により、スクリプトを/bin/sh
に渡します。/bin/shは2行目を実行しRubyインタプリタを起動します。
Rubyインタプリタは-x
オプションにより`#!'で始まり, "ruby"とい... -
BasicObject
# instance _ exec(*args) {|*vars| . . . } -> object (6125.0) -
与えられたブロックをレシーバのコンテキストで実行します。
...タに渡す値です。
//emlist[例][ruby]{
class KlassWithSecret
def initialize
@secret = 99
end
end
k = KlassWithSecret.new
# 以下で x には 5 が渡される
k.instance_exec(5) {|x| @secret + x } #=> 104
//}
@see Module#class_exec, Module#module_exec, BasicObject#instance_eval... -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (6122.0) -
RI から Ruby のドキュメントを参照します。
...RI から Ruby のドキュメントを参照します。
irb(main):001:0> help String#match
...
@param names 参照したいクラス名やメソッド名などを文字列で指定します。
names を指定しなかった場合は、RI を対話的なモードで起動します。メソ......ter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.
>> String#match
String#match
(from ruby core)
------------------------------------------------------------------------------
str.match(pattern) -> matchdata or nil
str.m... -
IRB
:: ExtendCommand :: Load # execute(file _ name , priv = nil) -> nil (6116.0) -
ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実 行します。
...ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実
行します。
Kernel.#load と異なり、path の内容を irb で一行ずつタイプしたかの
ように、irb 上で一行ずつ評価されます。
@param file_name ファイル名を文...