Class: Module

Inherits:
Object show all
Defined in:
lib/wilson.rb

Instance Method Summary collapse

Instance Method Details

#defasm(name, *args, &block) ⇒ Object



1175
1176
1177
1178
1179
1180
1181
# File 'lib/wilson.rb', line 1175

def defasm name, *args, &block
  code = assemble(args.size, &block)
  ptr  = code.to_ptr

  ASM << ptr
  Ruby.rb_define_method self, name.to_s, ptr, args.size
end