8000 Merge pull request #9 from github/1.9-invalidation-counter · github/ruby@0e75de1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e75de1

Browse files
author
Charlie Somerville
committed
Merge pull request #9 from github/1.9-invalidation-counter
Expose method state version in our 1.9
2 parents e233cae + 72b4833 commit 0e75de1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

vm.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,6 +2078,12 @@ ruby_vm_constant_state_version()
20782078
return ULONG2NUM(ruby_constant_global_state_version);
20792079
}
20802080

2081+
static VALUE
2082+
ruby_vm_method_state_version()
2083+
{
2084+
return ULONG2NUM(ruby_method_global_state_version);
2085+
}
2086+
20812087
void
20822088
Init_VM(void)
20832089
{
@@ -2092,6 +2098,7 @@ Init_VM(void)
20922098

20932099
/* method cache metrics */
20942100
rb_define_singleton_method(rb_cRubyVM, "constant_state_version", ruby_vm_constant_state_version, 0);
2101+
rb_define_singleton_method(rb_cRubyVM, "method_state_version", ruby_vm_method_state_version, 0);
20952102

20962103
/* ::VM::FrozenCore */
20972104
fcore = rb_class_new(rb_cBasicObject);

0 commit comments

Comments
 (0)
0