るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.036秒)
トップページ > クエリ:Class#new[x] > クエリ:extend[x] > ライブラリ:objspace[x]

別のキーワード

  1. << rexml::attribute#name
  2. add rexml::attribute#name
  3. handle_interrupt thread#raise
  4. oid= openssl::x509::extension#oid
  5. oid openssl::x509::extension#oid=

モジュール

検索結果

ObjectSpace.#trace_object_allocations { ... } (20.0)

与えられたブロック内でオブジェクトのトレースを行います。 

...のトレースを行います。 

//emlist[例][ruby]{
require 'objspace'

class
C
include ObjectSpace

def foo
trace_object_allocations do
obj = Object.new
p "#{allocation_sourcefile(obj)}:#{allocation_sourceline(obj)}"
end
end
end

C.new.foo #=> "objtrace.rb:8"
//}...