Skip to content

Commit cfcee42

Browse files
committed
Fix 3.5 structs
1 parent 1be08a6 commit cfcee42

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

interpreter/ruby/ruby.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,14 @@ func Loader(ebpf interpreter.EbpfHandler, info *interpreter.LoaderInfo) (interpr
15541554
vms.rclass_and_rb_classext_t.classext = 32
15551555
vms.rb_classext_struct.as_singleton_class_attached_object = 96
15561556
vms.rb_classext_struct.classpath = 120
1557-
case version < rubyVersion(4, 1, 0):
1557+
case version <= rubyVersion(3, 5, 0):
1558+
rid.hasClassPath = true
1559+
rid.rubyFlSingleton = libpf.Address(RUBY_FL_USER1)
1560+
1561+
vms.rclass_and_rb_classext_t.classext = 32
1562+
vms.rb_classext_struct.as_singleton_class_attached_object = 96
1563+
vms.rb_classext_struct.classpath = 120
1564+
case version >= rubyVersion(4, 0, 0) && version < rubyVersion(4, 1, 0):
15581565
rid.hasClassPath = true
15591566
rid.rubyFlSingleton = libpf.Address(RUBY_FL_USER1)
15601567

@@ -1700,7 +1707,7 @@ func Loader(ebpf interpreter.EbpfHandler, info *interpreter.LoaderInfo) (interpr
17001707
vms.iseq_constant_body.succ_index_table = 136
17011708
vms.iseq_constant_body.local_iseq = 168
17021709
vms.iseq_constant_body.size_of_iseq_constant_body = 352
1703-
case version >= rubyVersion(3, 5, 0) && version < rubyVersion(4, 1, 0):
1710+
case version >= rubyVersion(4, 0, 0) && version < rubyVersion(4, 1, 0):
17041711
vms.iseq_constant_body.insn_info_body = 112
17051712
vms.iseq_constant_body.insn_info_size = 128
17061713
vms.iseq_constant_body.succ_index_table = 136

0 commit comments

Comments
 (0)