145件ヒット
[1-100件を表示]
(0.048秒)
ライブラリ
- ビルトイン (95)
- open-uri (22)
-
shell
/ command-processor (6) - tracer (22)
クラス
- Proc (18)
-
Shell
:: CommandProcessor (6) - Tracer (22)
キーワード
- abort (22)
-
add
_ filter (22) - exit (11)
- exit! (11)
- fork (22)
- new (18)
-
open
_ uri (22) -
run
_ config (6) - spawn (11)
検索結果
先頭5件
-
Proc
. new -> Proc (9163.0) -
ブロックをコンテキストとともにオブジェクト化して返します。
...OSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead」
が出力され、Ruby 3.0 では
ArgumentError (tried to create Proc object without a block)
が発生します。
ブロックを指定しなければ、こ......上にブロックがないのにブロックを省略した呼び出しを行ったときに発生します。
//emlist[例][ruby]{
def foo
pr = Proc.new
pr.call(1)
end
foo {|arg| p arg }
# => 1
//}
これは以下と同じです。
//emlist[例][ruby]{
def foo
yield(1)
end
foo {|arg| p ar......entError が発生します。
//emlist[例][ruby]{
def foo
Proc.new
end
foo
# => -:2:in `new': tried to create Proc object without a block (ArgumentError)
# from -:2:in `foo'
# from -:4:in `<main>'
//}
Proc.new は、Proc#initialize が定義されていれば
オブジェクト... -
Proc
. new { . . . } -> Proc (9163.0) -
ブロックをコンテキストとともにオブジェクト化して返します。
...OSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead」
が出力され、Ruby 3.0 では
ArgumentError (tried to create Proc object without a block)
が発生します。
ブロックを指定しなければ、こ......上にブロックがないのにブロックを省略した呼び出しを行ったときに発生します。
//emlist[例][ruby]{
def foo
pr = Proc.new
pr.call(1)
end
foo {|arg| p arg }
# => 1
//}
これは以下と同じです。
//emlist[例][ruby]{
def foo
yield(1)
end
foo {|arg| p ar......entError が発生します。
//emlist[例][ruby]{
def foo
Proc.new
end
foo
# => -:2:in `new': tried to create Proc object without a block (ArgumentError)
# from -:2:in `foo'
# from -:4:in `<main>'
//}
Proc.new は、Proc#initialize が定義されていれば
オブジェクト......行ったときに発生します。
//emlist[][ruby]{
pr = Proc.new {|arg| p arg }
pr.call(1) # => 1
//}
//emlist[][ruby]{
Proc.new # => -e:1:in `new': tried to create Proc object without a block (ArgumentError)
//}
Proc.new は、Proc#initialize が定義されていれば
オブジェクトの......初期化のためにこれを呼び出します。このことを
除けば、Kernel.#proc と同じです。... -
Process
. spawn(cmd , *arg) -> Integer (3029.0) -
関数 Kernel.#spawn と同じです。
...関数 Kernel.#spawn と同じです。
@param cmd Kernel.#spawn と同じです。
@param arg Kernel.#spawn と同じです。
@raise NotImplementedError メソッドが現在のプラットフォームで実装されていない場合に発生します。... -
Process
. abort -> () (3017.0) -
関数 Kernel.#abort と同じです。
...関数 Kernel.#abort と同じです。
@param message 終了時のメッセージを文字列で指定します。... -
Process
. abort(message) -> () (3017.0) -
関数 Kernel.#abort と同じです。
...関数 Kernel.#abort と同じです。
@param message 終了時のメッセージを文字列で指定します。... -
Process
. exit!(status = false) -> () (3017.0) -
関数 Kernel.#exit! と同じです。
...関数 Kernel.#exit! と同じです。
@param status 終了ステータスを boolean か整数で指定します。true の場合は成功を、false は失敗を意味します。
@see _exit(2)... -
Process
. exit(status = true) -> () (3017.0) -
プロセスを終了します。関数 Kernel.#exit と同じです。
...プロセスを終了します。関数 Kernel.#exit と同じです。
@param status 終了ステータスを boolean か整数で指定します。true の場合は成功を、false は失敗を意味します。
@see exit(3)... -
Process
. fork -> Integer | nil (3017.0) -
子プロセスを生成します。関数 Kernel.#fork と同じです。
...子プロセスを生成します。関数 Kernel.#fork と同じです。
@raise NotImplementedError メソッドが現在のプラットフォームで実装されていない場合に発生します。
@see fork(2)... -
Process
. fork { . . . } -> Integer | nil (3017.0) -
子プロセスを生成します。関数 Kernel.#fork と同じです。
...子プロセスを生成します。関数 Kernel.#fork と同じです。
@raise NotImplementedError メソッドが現在のプラットフォームで実装されていない場合に発生します。
@see fork(2)... -
Shell
:: CommandProcessor . run _ config -> () (3017.0) -
ユーザのホームディレクトリに "~/.rb_shell" というファイルが存在すれば、それを Kernel.#load します。
...ユーザのホームディレクトリに "~/.rb_shell" というファイルが存在すれば、それを Kernel.#load します。
存在しない時は何もしません。...