るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.094秒)
トップページ > クエリ:String[x] > バージョン:2.1.0[x] > クエリ:a[x] > クエリ:u[x] > クエリ:start[x] > 種類:モジュール関数[x] > モジュール:ObjectSpace[x]

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. argf.class to_a
  5. dbm to_a

ライブラリ

検索結果

ObjectSpace.#allocation_sourcefile(object) -> String (36946.0)

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

...uby]{
require 'objspace'

ObjectSpace
::trace_object_allocations_start
obj = Object.new
puts "file:#{ObjectSpace::allocation_sourcefile(obj)}" # => file:test.rb
ObjectSpace
::trace_object_allocations_stop
//}

@see ObjectSpace.#trace_object_allocations_start,
ObjectSpace
.#trace_object_allocatio...