るりまサーチ

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

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

モジュール

キーワード

検索結果

<< < ... 5 6 7 >>

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

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).locations.map do |call|
puts call.inspect
end

# => "path/to/foo.rb:5:in `initialize...

Thread::Backtrace::Location#to_s -> String (21.0)

self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。

...ller と同じ表現にした文字列を返し
ます。

//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.to_s
end

# => path/to/foo.rb:5:in `initialize'
#...
<< < ... 5 6 7 >>