< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #9190 has been updated by simeonwillbanks (Simeon Willbanks).
Thanks everyone!
----------------------------------------
Feature #9190: Expose serial helper macros
https://bugs.ruby-lang.org/issues/9190#change-43521
Author: simeonwillbanks (Simeon Willbanks)
Status: Closed
Priority: Normal
Assignee:
Category: core
Target version:
I've defined RubyVM::InstructionHelper with singleton methods #method_serial and #constant_serial. They delegate to helper macros GET_METHOD_SERIAL() and GET_CONSTANT_SERIAL().
With these methods, users have visibility into the method and constant caches. If it makes sense, I hope this patch is included in Ruby 2.1.0.
def constants_busted?(&blk)
starting = RubyVM::InstructionHelper.constant_serial
yield
ending = RubyVM::InstructionHelper.constant_serial
ending > starting
end
busted = constants_busted? do
class Foo; end
end
puts busted.inspect
# true
https://github.com/ruby/ruby/pull/462.patch
Thanks for considering; any input is appreciated!
--
http://bugs.ruby-lang.org/