るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.117秒)
トップページ > 種類:モジュール関数[x] > クエリ:p[x] > クエリ:Integer[x] > モジュール:ObjectSpace[x] > クエリ:allocation_sourceline[x]

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer rationalize
  5. integer each_prime

ライブラリ

検索結果

ObjectSpace.#allocation_sourceline(object) -> Integer (21210.0)

objectの元となったソースファイルの行番号を返します。

...す。

@param object 元となるソースファイルの行番号を取得したいobjectを指定します。
@return objectの元となるソースファイルの行番号を返します。存在しない場合はnilを返します。

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

ObjectSpace
::trace_...
...object_allocations_start
obj = Object.new
p
uts "line:#{ObjectSpace::allocation_sourceline(obj)}" # => line:4
ObjectSpace
::trace_object_allocations_stop
//}

@see ObjectSpace.#trace_object_allocations_start,
ObjectSpace
.#trace_object_allocations_stop...