るりまサーチ

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

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer times
  5. integer chr

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

Matrix#trace -> Integer | Float | Rational | Complex (15238.0)

トレース (trace) を返します。

...トレース (trace) を返します。

行列のトレース (trace) とは、対角要素の和です。

//emlist[例][ruby]{
require 'matrix'
Matrix[[7,6], [3,9]].trace # => 16
//}

trace
は正方行列でのみ定義されます。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が...

IRB::Context#back_trace_limit -> Integer (6209.0)

エラー発生時のバックトレース表示の先頭、末尾の上限の行数を返します。

...エラー発生時のバックトレース表示の先頭、末尾の上限の行数を返します。

デフォルト値は 16 です。

@see IRB::Context#back_trace_limit=...

Thread#set_trace_func(pr) -> Proc | nil (6150.0)

スレッドにトレース用ハンドラを設定します。

...除します。

設定したハンドラを返します。

//emlist[例][ruby]{
th = Thread.new do
class Trace
end
2.to_s
Thread.current.set_trace_func nil
3.to_s
end
th.set_trace_func lambda {|*arg| p arg }
th.join

# => ["line", "example.rb", 2, nil, #<Binding:0x00007fc8de87cb08>, nil]...
...<Binding:0x00007fc8de88c440>, nil]
# => ["c-call", "example.rb", 4, :to_s, #<Binding:0x00007fc8de896f30>, Integer]
# => ["c-return", "example.rb", 4, :to_s, #<Binding:0x00007fc8de894a50>, Integer]
# => ["line", "example.rb", 5, nil, #<Binding:0x00007fc8de967b08>, nil]
# => ["c-call", "example.rb", 5...
..."c-return", "example.rb", 5, :current, #<Binding:0x00007fc8de9673b0>, Thread]
# => ["c-call", "example.rb", 5, :set_trace_func, #<Binding:0x00007fc8de966fc8>, Thread]
//}

@param pr トレースハンドラ(Proc オブジェクト) もしくは nil
@see Thread#add_trace_func Kernel.#set_trace_func...

Thread#add_trace_func(pr) -> Proc (6138.0)

スレッドにトレース用ハンドラを追加します。

...ラを返します。

@param pr トレースハンドラ(Proc オブジェクト)

//emlist[例][ruby]{
th = Thread.new do
class Trace
end
43.to_s
end
th.add_trace_func lambda {|*arg| p arg }
th.join

# => ["line", "example.rb", 4, nil, #<Binding:0x00007f98e107d0d8>, nil]
# => ["c-call", "exa...
...e0>, nil]
# => ["line", "example.rb", 6, nil, #<Binding:0x00007f98e108d4b0>, nil]
# => ["c-call", "example.rb", 6, :to_s, #<Binding:0x00007f98e1097aa0>, Integer]
# => ["c-return", "example.rb", 6, :to_s, #<Binding:0x00007f98e1095cc8>, Integer]
//}

@see Thread#set_trace_func Kernel.#set_trace_func...

IRB::Context#back_trace_limit=(val) (6120.0)

エラー発生時のバックトレース表示の先頭、末尾の上限の行数をそれぞれ val 行に設定します。

...ぞれ val
行に設定します。

.irbrc ファイル中で IRB.conf[:BACK_TRACE_LIMIT] を設定する事でも同様の
操作が行えます。

@param val バックトレース表示の先頭、末尾の上限を Integer で指定
します。

@see IRB::Context#back_trace_limit...

絞り込み条件を変える

TracePoint#lineno -> Integer (3114.0)

発生したイベントの行番号を返します。

...発生したイベントの行番号を返します。

@raise RuntimeError イベントフックの外側で実行した場合に発生します。

//emlist[例][ruby]{
def foo(ret)
ret
end
trace
= TracePoint.new(:call, :return) do |tp|
tp.lineno
end
trace
.enable
foo 1
# => 1
# 3
//}...

Thread::Backtrace::Location#lineno -> Integer (3102.0)

self が表すフレームの行番号を返します。

...self が表すフレームの行番号を返します。

例: Thread::Backtrace::Location の例1を用いた例

//emlist[][ruby]{
loc = c(0..1).first
loc.lineno # => 2
//}...

Tracer#get_thread_no -> Integer (3102.0)

@todo

@todo

Matrix#tr -> Integer | Float | Rational | Complex (138.0)

トレース (trace) を返します。

...トレース (trace) を返します。

行列のトレース (trace) とは、対角要素の和です。

//emlist[例][ruby]{
require 'matrix'
Matrix[[7,6], [3,9]].trace # => 16
//}

trace
は正方行列でのみ定義されます。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が...
<< 1 2 > >>