るりまサーチ (Ruby 3.0)

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

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. fileutils compare_file
  4. fileutils copy_file
  5. psych load_file

モジュール

検索結果

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

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

...ない場合はnilを返します。

//emlist[例:test.rbというファイルで下記のスクリプトを実行した場合][ruby]{
require 'objspace'

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