Skip to content

Commit 72b4833

Browse files
author
Charlie Somerville
committed
expose method state version too
1 parent 6bbb6ed commit 72b4833

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy