3件ヒット
[1-3件を表示]
(0.037秒)
別のキーワード
検索結果
先頭3件
-
ObjectSpace
. # allocation _ sourceline(object) -> Integer (72622.0) -
objectの元となったソースファイルの行番号を返します。
objectの元となったソースファイルの行番号を返します。
@param object 元となるソースファイルの行番号を取得したいobjectを指定します。
@return objectの元となるソースファイルの行番号を返します。存在しない場合はnilを返します。
//emlist[例][ruby]{
require 'objspace'
ObjectSpace::trace_object_allocations_start
obj = Object.new
puts "line:#{ObjectSpace::allocation_sourceline(obj)}" # => lin... -
ObjectSpace
. # trace _ object _ allocations { . . . } (18319.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"
//} -
NEWS for Ruby 2
. 1 . 0 (163.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...をサポート
* rinda
* Rinda::RingServer, Rinda::RingFinger
* マルチキャストソケットをサポート
* rubygems
* 2.2.0 に更新。 Notable new features include:
* Gemfile or gem.deps.rb support including Gem.file.lock (experimental)
* Improved, iterati...