るりまサーチ

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

別のキーワード

  1. matrix tr
  2. string tr
  3. string tr_s
  4. string tr!
  5. string tr_s!

検索結果

<< 1 2 3 > >>

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

関数を呼び出します。

...ります。
IO オブジェクトであれば FILE* が渡されます。
整数であればそれがアドレスとみなされます。
to_ptr を持っているならば、それを呼びだし Fiddle::Pointer に
変換したものを用います。
to_i を持っているならば、...
...アドレスと見なします

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

: double/float
R
uby の整数 or 浮動小数点数を C の浮動小数点数に変換します

返り値の変換は以下の通りです。

: void
nil を...

Logger::Formatter#call(severity, time, progname, msg) -> String (18202.0)

ログ情報をフォーマットして返します。

ログ情報をフォーマットして返します。

@param severity ログレベル。

@param time 時間。Time クラスのオブジェクト。

@param progname プログラム名

@param msg メッセージ。

Syslog::Logger::Formatter#call(severity, time, progname, message) -> String (18202.0)

引数を元にフォーマットした文字列を返します。

引数を元にフォーマットした文字列を返します。

ライブラリ内部で使用します。

TracePoint#callee_id -> Symbol | nil (9107.0)

イベントが発生したメソッドの呼ばれた名前を Symbol で返します。 トップレベルであった場合は nil を返します。

...した場合に発生します。

//emlist[][ruby]{
class C
def method_name
end
alias alias_name method_name
end

tr
ace = TracePoint.new(:call) do |tp|
p [tp.method_id, tp.callee_id] # => [:method_name, :alias_name]
end
tr
ace.enable do
C.new.alias_name
end
//}

@see TracePoint#method_id...

Thread#set_trace_func(pr) -> Proc | nil (6125.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]
# => ["c-call", "example.rb", 2, :inherited, #<Binding:0x000...
...007fc8de88c440>, 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, :current, #...
..."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 (6113.0)

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

...オブジェクト)

//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", "example.rb", 4, :inherited, #<Binding:0x00007f98e1087448>, Class]...
...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...

Thread::Backtrace::Location#absolute_path -> String (3113.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 (3113.0)

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

...Thread::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...

Thread::Backtrace::Location#inspect -> String (3113.0)

Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。

...Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文
字列に変換したオブジェクトを返します。

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

Foo.new(0..2).loc...
...ations.map do |call|
puts call.inspect
end

# => "path/to/foo.rb:5:in `initialize'"
# "path/to/foo.rb:9:in `new'"
# "path/to/foo.rb:9:in `<main>'"
//}...
<< 1 2 3 > >>