るりまサーチ

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io each_line
  5. io readlines

検索結果

<< 1 2 > >>

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

関数を呼び出します。

...関数を呼び出します。

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

引数の変換は...
...
Fiddle::Pointer は保持している C ポインタに変換されます。
文字列であればその先頭ポインタになります。
IO
オブジェクトであれば FILE* が渡されます。
整数であればそれがアドレスとみなされます。
to_ptr を持って...
...

: void
nil を返します

: (unsigned) char/short/int/long/long long
C の整数を Ruby の整数に変換します

: void*(つまり任意のポインタ型)
C のポインタを保持した Fiddle::Pointer を返します。

@param args 関数の引数
@see Fiddle::Function.new...

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

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

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

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

OpenSSL::SSL::SSLContext#session_get_cb=(cb) (6107.0)

セッションキャッシュを探索し、内部のキャッシュテーブルには 見付からなかった場合に呼び出されるコールバックを設定します。

...ます。

コールバックオブジェクトを call するときの引数は
[ 接続オブジェクト(OpenSSL::SSL::SSLSocket), セッションID(文字列) ]
という配列です。このコールバックの返り値が
OpenSSL::SSL::Session オブジェクトならば、
それをキャ...
...ッシュは見つからなかったものとして取り扱われます。

セッションキャッシュについて詳しくは OpenSSL::SSL::Session を
見てください。

@param cb コールバックオブジェクト(Proc もしくは Method)
@see OpenSSL::SSL::SSLContext#session_get_cb...

OpenSSL::SSL::SSLContext#session_new_cb=(cb) (6107.0)

新たなセッションが作られたときに呼び出されるコールバックを 指定します。

...バックオブジェクトを call するときの引数は
[ 接続オブジェクト(OpenSSL::SSL::SSLSocket), 新たなセッション(OpenSSL::SSL::Session)]
という配列です。

セッションキャッシュについて詳しくは OpenSSL::SSL::Session を
見てください。

@para...
...m cb コールバックオブジェクト(Proc もしくは Method)
@see OpenSSL::SSL::SSLContext#session_new_cb...

OpenSSL::SSL::SSLContext#session_remove_cb=(cb) (6107.0)

セッションが内部キャッシュから破棄されたときに呼び出される コールバックを設定します。

...クオブジェクトを call するときの引数は
[ SSLContextオブジェクト(OpenSSL::SSL::SSLContext),
破棄されるセッション(OpenSSL::SSL::Session)]
という配列です。

セッションキャッシュについて詳しくは OpenSSL::SSL::Session を
見てください...
...


@param cb コールバックオブジェクト(Proc もしくは Method)
@see OpenSSL::SSL::SSLContext#session_remove_cb...

絞り込み条件を変える

Thread#report_on_exception -> bool (6107.0)

真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...eport_on_exception です。

@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。

//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a...
...):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.report_on_exception = false
b.run # => #<Threa...
...d:0x00007fc3f48aefc0@(irb):4 dead>
//}

@see Thread.report_on_exception...

Thread#report_on_exception=(newstate) (6107.0)

真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...eport_on_exception です。

@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。

//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a...
...):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.report_on_exception = false
b.run # => #<Threa...
...d:0x00007fc3f48aefc0@(irb):4 dead>
//}

@see Thread.report_on_exception...

MiniTest::Assertions#assert_includes(collection, object, message = nil) -> true (3107.0)

与えられたコレクションにオブジェクトが含まれている場合、検査にパスしたことになります。

...tion 任意のコレクションを指定します。

@param object 任意のオブジェクトを指定します。

@param message 検査に失敗した場合に表示するメッセージを指定します。
文字列か Proc を指定します。Proc である場合は Proc#call...
...した
結果を使用します。

@raise MiniTest::Assertion 第一引数のオブジェクトが include? メソッドを持たない場合に発生します。
与えられたコレクションにオブジェクトが含まれていない場合に発生...

MiniTest::Assertions#skip(message = nil, backtrace = caller) (3101.0)

このメソッドを呼び出したテストメソッドをスキップします。

...ップします。

@param message メッセージを指定します。

@param backtrace 例外発生時のスタックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。

@raise MiniTest::Skip 必ず発生します。

@see Kerne...

Exception#full_message(highlight: true, order: :bottom) -> String (3013.0)

例外の整形された文字列を返します。

...は Exception.to_tty? の返り値と同じです。

@param order :top か :bottom で指定する必要があります。
バックトレースの一番奥がエラーメッセージの上(top)か下(bottom)かを指定します。
デフォルト値は Exception.to_tty?...
...ack \e[m(most recent call last):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
$stderr = $stdout
p e.full_message # => "test.rb:2:in `<main>': test (RuntimeError)\n"
$stderr = STDERR
p e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:i...
...n `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
end
//}

@see Exception.to_tty?...

絞り込み条件を変える

Thread::Backtrace::Location#absolute_path -> String (3013.0)

self が表すフレームの絶対パスを返します。

...][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.absolute_path
end

# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}

@see Thread::Backtrace::Location#path...

Thread::Backtrace::Location#base_label -> String (3013.0)

self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。

...d::Backtrace::Location#label から修飾を取り除いたもので構成
されます。

//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.base_label
end

#...
...=> initialize
# new
# <main>
//}

@see Thread::Backtrace::Location#label...
<< 1 2 > >>