るりまサーチ (Ruby 3.0)

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

別のキーワード

  1. _builtin *
  2. matrix *
  3. array *
  4. vector *
  5. bigdecimal *

ライブラリ

キーワード

検索結果

Fiddle::Closure::BlockCaller#call(*args) -> object (63607.0)

wrap しているブロックを呼び出します。

wrap しているブロックを呼び出します。

そのブロックの返り値がこのメソッドの返り値となります。

@param args 引数

Fiddle::Function#call(*args) -> Integer|DL::CPtr|nil (54643.0)

関数を呼び出します。

関数を呼び出します。

Fiddle::Function.new で指定した引数と返り値の型に基いて
Ruby のオブジェクトを適切に C のデータに変換して C の関数を呼び出し、
その返り値を Ruby のオブジェクトに変換して返します。

引数の変換は以下の通りです。

: void* (つまり任意のポインタ型)
nil ならば C の NULL に変換されます
Fiddle::Pointer は保持している C ポインタに変換されます。
文字列であればその先頭ポインタになります。
IO オブジェクトであれば FILE* が渡されます。
整数であればそれがアドレスとみ...

Method#call(*args) -> object (45646.0)

メソッドオブジェクトに封入されているメソッドを起動します。

メソッドオブジェクトに封入されているメソッドを起動します。

引数やブロックはそのままメソッドに渡されます。

self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。


@param args self に渡される引数。

@see UnboundMethod#bind_call
@see spec/safelevel

//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg...

Method#call(*args) { ... } -> object (45646.0)

メソッドオブジェクトに封入されているメソッドを起動します。

メソッドオブジェクトに封入されているメソッドを起動します。

引数やブロックはそのままメソッドに渡されます。

self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。


@param args self に渡される引数。

@see UnboundMethod#bind_call
@see spec/safelevel

//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg...

Continuation#call(*ret) -> () (45607.0)

self が記憶した状態を継続します。引数は そのまま Kernel.#callcc の戻り値になります。

self が記憶した状態を継続します。引数は そのまま
Kernel.#callcc の戻り値になります。

@param ret 継続に復帰した時に返す値を指定します。

絞り込み条件を変える

Proc#call(*arg) -> () (45607.0)

手続きオブジェクトを実行してその結果を返します。

手続きオブジェクトを実行してその結果を返します。

引数の渡され方はオブジェクトの生成方法によって異なります。
詳しくは Proc#lambda? を参照してください。

「===」は when の所に手続きを渡せるようにするためのものです。

//emlist[例][ruby]{
def sign(n)
case n
when lambda{|n| n > 0} then 1
when lambda{|n| n < 0} then -1
else 0
end
end

p sign(-4) #=> -1
p sign(0) #=> 0
p sign(7) #=> 1...

UnboundMethod#bind_call(recv, *args) -> object (18670.0)

self を recv に bind して args を引数として呼び出します。

self を recv に bind して args を引数として呼び出します。

self.bind(recv).call(*args) と同じ意味です。

//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}

@see UnboundMethod#bind, Method#call

UnboundMethod#bind_call(recv, *args) { ... } -> object (18670.0)

self を recv に bind して args を引数として呼び出します。

self を recv に bind して args を引数として呼び出します。

self.bind(recv).call(*args) と同じ意味です。

//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}

@see UnboundMethod#bind, Method#call

OpenSSL::SSL::SSLContext#tmp_dh_callback=(cb) (18358.0)

一時的 DH 鍵を生成するためのコールバックを設定します。

一時的 DH 鍵を生成するためのコールバックを設定します。

コールバックには Proc や Method を渡します。

暗号で一時的な DH 鍵を利用する場合にはこのコールバックが
呼びだされ、呼びだされたブロックは適切な鍵パラメータを返さなければ
なりません。これで設定するブロックは
proc{|sslsocket, is_export, keylen| ... }
という引数を取るようにします。それぞれの引数の意味は
* sslsocket 通信に使われる OpenSSL::SSL::SSLSocket オブジェクト
* is_export 輸出規制のある暗号を利用するかど...

Method#>>(callable) -> Proc (448.0)

self と引数を合成した Proc を返します。

self と引数を合成した Proc を返します。

戻り値の Proc は可変長の引数を受け取ります。
戻り値の Proc を呼び出すと、まず受け取った引数を self に渡して呼び出し、
その戻り値を callable に渡して呼び出した結果を返します。

Method#<< とは呼び出しの順序が逆になります。

@param callable Proc、Method、もしくは任意の call メソッドを持ったオブジェクト。

//emlist[例][ruby]{
def f(x)
x * x
end

def g(x)
x + x
end

# (3 * 3) + (3 * 3...

絞り込み条件を変える

Proc#>>(callable) -> Proc (448.0)

self と引数を合成した Proc を返します。

self と引数を合成した Proc を返します。

戻り値の Proc は可変長の引数を受け取ります。
戻り値の Proc を呼び出すと、まず受け取った引数を self に渡して呼び出し、
その戻り値を callable に渡して呼び出した結果を返します。

Proc#<< とは呼び出しの順序が逆になります。

@param callable Proc、Method、もしくは任意の call メソッドを持ったオブジェクト。

//emlist[例][ruby]{
f = proc { |x| x * x }
g = proc { |x| x + x }

# (3 * 3) + (3 * ...

Method#<<(callable) -> Proc (430.0)

self と引数を合成した Proc を返します。

self と引数を合成した Proc を返します。

戻り値の Proc は可変長の引数を受け取ります。
戻り値の Proc を呼び出すと、まず受け取った引数を callable に渡して呼び出し、
その戻り値を self に渡して呼び出した結果を返します。

Method#>> とは呼び出しの順序が逆になります。

@param callable Proc、Method、もしくは任意の call メソッドを持ったオブジェクト。

//emlist[例][ruby]{
def f(x)
x * x
end

def g(x)
x + x
end

# (3 + 3) * (3 + 3...

Proc#<<(callable) -> Proc (430.0)

self と引数を合成した Proc を返します。

self と引数を合成した Proc を返します。

戻り値の Proc は可変長の引数を受け取ります。
戻り値の Proc を呼び出すと、まず受け取った引数を callable に渡して呼び出し、
その戻り値を self に渡して呼び出した結果を返します。

Proc#>> とは呼び出しの順序が逆になります。

@param callable Proc、Method、もしくは任意の call メソッドを持ったオブジェクト。

//emlist[例][ruby]{
f = proc { |x| x * x }
g = proc { |x| x + x }

# (3 + 3) * (3 + ...

Method#===(*args) -> object (346.0)

メソッドオブジェクトに封入されているメソッドを起動します。

メソッドオブジェクトに封入されているメソッドを起動します。

引数やブロックはそのままメソッドに渡されます。

self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。


@param args self に渡される引数。

@see UnboundMethod#bind_call
@see spec/safelevel

//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg...

Method#[](*args) -> object (346.0)

メソッドオブジェクトに封入されているメソッドを起動します。

メソッドオブジェクトに封入されているメソッドを起動します。

引数やブロックはそのままメソッドに渡されます。

self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。


@param args self に渡される引数。

@see UnboundMethod#bind_call
@see spec/safelevel

//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg...

絞り込み条件を変える

Continuation#[](*ret) -> () (307.0)

self が記憶した状態を継続します。引数は そのまま Kernel.#callcc の戻り値になります。

self が記憶した状態を継続します。引数は そのまま
Kernel.#callcc の戻り値になります。

@param ret 継続に復帰した時に返す値を指定します。

Proc#===(*arg) -> () (307.0)

手続きオブジェクトを実行してその結果を返します。

手続きオブジェクトを実行してその結果を返します。

引数の渡され方はオブジェクトの生成方法によって異なります。
詳しくは Proc#lambda? を参照してください。

「===」は when の所に手続きを渡せるようにするためのものです。

//emlist[例][ruby]{
def sign(n)
case n
when lambda{|n| n > 0} then 1
when lambda{|n| n < 0} then -1
else 0
end
end

p sign(-4) #=> -1
p sign(0) #=> 0
p sign(7) #=> 1...

Proc#[](*arg) -> () (307.0)

手続きオブジェクトを実行してその結果を返します。

手続きオブジェクトを実行してその結果を返します。

引数の渡され方はオブジェクトの生成方法によって異なります。
詳しくは Proc#lambda? を参照してください。

「===」は when の所に手続きを渡せるようにするためのものです。

//emlist[例][ruby]{
def sign(n)
case n
when lambda{|n| n > 0} then 1
when lambda{|n| n < 0} then -1
else 0
end
end

p sign(-4) #=> -1
p sign(0) #=> 0
p sign(7) #=> 1...

Proc#yield(*arg) -> () (307.0)

手続きオブジェクトを実行してその結果を返します。

手続きオブジェクトを実行してその結果を返します。

引数の渡され方はオブジェクトの生成方法によって異なります。
詳しくは Proc#lambda? を参照してください。

「===」は when の所に手続きを渡せるようにするためのものです。

//emlist[例][ruby]{
def sign(n)
case n
when lambda{|n| n > 0} then 1
when lambda{|n| n < 0} then -1
else 0
end
end

p sign(-4) #=> -1
p sign(0) #=> 0
p sign(7) #=> 1...

LocalJumpError#reason -> Symbol (148.0)

例外を発生させた原因をシンボルで返します。

例外を発生させた原因をシンボルで返します。

返す値は以下のいずれかです。

* :break
* :redo
* :retry
* :next
* :return
* :noreason

例:

def foo
proc { return 10 }
end

begin
foo.call
rescue LocalJumpError => err
p err # => #<LocalJumpError: return from block-closure>
p err.reason ...

絞り込み条件を変える

Module#ruby2_keywords(method_name, ...) -> nil (136.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

For the given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword argument...

Proc#ruby2_keywords -> proc (136.0)

Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.

Marks the proc as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked ...