summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/mjit/c_pointer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ruby_vm/mjit/c_pointer.rb')
-rw-r--r--lib/ruby_vm/mjit/c_pointer.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/ruby_vm/mjit/c_pointer.rb b/lib/ruby_vm/mjit/c_pointer.rb
index f0f34e949e..0ba9baa7cd 100644
--- a/lib/ruby_vm/mjit/c_pointer.rb
+++ b/lib/ruby_vm/mjit/c_pointer.rb
@@ -57,11 +57,8 @@ module RubyVM::MJIT # :nodoc: all
# Return the offset to a field
define_singleton_method(:offsetof) { |field| members.fetch(field).last / 8 }
- # Get the offset of a member named +name+
- define_singleton_method(:offsetof) { |name|
- _, offset = members.fetch(name)
- offset / 8
- }
+ # Return member names
+ define_singleton_method(:members) { members.keys }
define_method(:initialize) do |addr = nil|
if addr.nil? # TODO: get rid of this feature later