ライブラリ
- ビルトイン (248)
-
irb
/ inspector (24) -
minitest
/ spec (2) - open-uri (24)
- prettyprint (12)
- pty (12)
- readline (24)
- shell (6)
-
shell
/ command-processor (84) -
shell
/ process-controller (48) - tracer (84)
-
webrick
/ httpproxy (12) -
webrick
/ httpserver (12) -
webrick
/ httpservlet / prochandler (12)
クラス
- Enumerator (19)
- Hash (30)
-
IRB
:: Inspector (12) -
MiniTest
:: Spec (2) - PrettyPrint (12)
- Proc (19)
-
RubyVM
:: InstructionSequence (36) - Shell (6)
-
Shell
:: CommandProcessor (84) -
Shell
:: ProcessController (48) - Tracer (84)
-
WEBrick
:: HTTPProxyServer (12) -
WEBrick
:: HTTPServer (12) -
WEBrick
:: HTTPServlet :: ProcHandler (12)
モジュール
オブジェクト
- main (24)
キーワード
- Inspector (12)
- [] (6)
- abort (24)
- activate (6)
-
active
_ process _ controllers (6) -
add
_ delegate _ command _ to _ shell (6) -
add
_ filter (24) - after (1)
-
alias
_ command (12) -
alias
_ map (6) - before (1)
-
block
_ output _ synchronize (6) - check (12)
-
completion
_ proc (12) -
completion
_ proc= (12) -
def
_ builtin _ commands (6) -
def
_ inspector (12) -
def
_ system _ command (6) -
define
_ method (24) - disasm (12)
- disassemble (12)
-
display
_ process _ id (12) -
display
_ process _ id= (12) -
display
_ process _ id? (12) -
each
_ active _ object (6) - exec (12)
- exit (12)
- exit! (12)
- fork (24)
- format (12)
- inactivate (6)
- initialize (6)
-
install
_ builtin _ commands (6) -
install
_ system _ commands (6) -
last
_ status (8) -
method
_ added (6) - new (110)
- of (22)
-
open
_ uri (24) -
process
_ controllers _ exclusive (6) -
ruby2
_ keywords _ hash? (6) -
run
_ config (6) -
set
_ get _ line _ procs (24) - spawn (12)
-
unalias
_ command (6) -
undef
_ system _ command (12) -
wait
_ to _ finish _ all _ process _ controllers (6)
検索結果
先頭5件
-
Proc
. new -> Proc (21157.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 (21157.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 と同じです。... -
Shell
:: ProcessController . active _ process _ controllers -> () (9101.0) -
@todo
@todo -
Shell
:: ProcessController . process _ controllers _ exclusive -> () (9101.0) -
@todo
@todo -
Shell
:: ProcessController . wait _ to _ finish _ all _ process _ controllers -> () (9101.0) -
@todo
@todo -
Readline
. completion _ proc=(proc) (6293.0) -
ユーザからの入力を補完する時の候補を取得する Proc オブジェクト proc を指定します。 proc は、次のものを想定しています。 (1) callメソッドを持つ。callメソッドを持たない場合、例外 ArgumentError を発生します。 (2) 引数にユーザからの入力文字列を取る。 (3) 候補の文字列の配列を返す。
...ユーザからの入力を補完する時の候補を取得する Proc オブジェクト
proc を指定します。
proc は、次のものを想定しています。
(1) callメソッドを持つ。callメソッドを持たない場合、例外 ArgumentError を発生します。
(2) 引数......の入力文字列を取る。
(3) 候補の文字列の配列を返す。
「/var/lib /v」の後で補完を行うと、
デフォルトでは proc の引数に「/v」が渡されます。
このように、ユーザが入力した文字列を
Readline.completer_word_break_characters に含ま......ルがある単語の最初の文字から現在のカーソル位置までの文字列が proc の引数に渡されます。
@param proc ユーザからの入力を補完する時の候補を取得する Proc オブジェクトを指定します。
nil を指定した場合はデフ... -
Readline
. completion _ proc -> Proc (6241.0) -
ユーザからの入力を補完する時の候補を取得する Proc オブジェクト proc を取得します。
...ユーザからの入力を補完する時の候補を取得する Proc オブジェクト
proc を取得します。
@see Readline.completion_proc=... -
Tracer
. set _ get _ line _ procs(filename , proc) (6208.0) -
あるファイルについて利用する、行番号からソースのその行の内容を返す 手続きを指定します。何も指定しなければデフォルトの動作が利用されます。 指定する手続きは行番号を唯一の引数として呼び出されます。
...所を文字列で指定します。
@param proc 通常、文字列を返す手続きオブジェクトを指定します。
# 例 dummy.rb の3行目から6 行目のトレース出力に !! をつける
require 'tracer'
Tracer.set_get_line_procs('./dummy.rb'){|line|
str = "\n"
str... -
Tracer
. set _ get _ line _ procs(filename) {|line| . . . . } (6108.0) -
あるファイルについて利用する、行番号からソースのその行の内容を返す 手続きを指定します。何も指定しなければデフォルトの動作が利用されます。 指定する手続きは行番号を唯一の引数として呼び出されます。
...所を文字列で指定します。
@param proc 通常、文字列を返す手続きオブジェクトを指定します。
# 例 dummy.rb の3行目から6 行目のトレース出力に !! をつける
require 'tracer'
Tracer.set_get_line_procs('./dummy.rb'){|line|
str = "\n"
str... -
Tracer
. display _ process _ id -> bool (6101.0) -
真ならば、プロセス ID を表示します。 デフォルトは、偽です。
真ならば、プロセス ID を表示します。
デフォルトは、偽です。 -
Tracer
. display _ process _ id=(flag) (6101.0) -
プロセス ID を表示するかどうかを設定します。
プロセス ID を表示するかどうかを設定します。
@param flag プロセス ID を表示するならば、真を指定します。