mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
b83ff8ccd8
from https://github.com/ksss/mruby-method/commit/0837a0b507a5b4cdf8a1f1039ee371cee4e3b7fb
mruby-method
A implementetion of class Method and UnboundMethod for mruby
p Enumerable.instance_method(:find_all).source_location
#=> ["mruby/mruby/mrblib/enum.rb", 148]
Installation
in build_config.rb
MRuby::Build.new do |conf|
enable_debug
conf.gem :mgem => "mruby-method"
# or
conf.gem :github => "ksss/mruby-method"
end
Note
source_location method need this configuration in build_config.rb
MRuby::Build.new do |conf|
enable_debug
end
Supported Methods
Kernel
Kernel#methodKernel#singleton_method
Module
Module#instance_method
Method class
Method#nameMethod#callMethod#super_methodMethod#arityMethod#unbindMethod#[]Method#ownerMethod#receiverMethod#parametersMethod#source_locationMethod#to_proc
UnboundMethod class
UnboundMethod#nameUnboundMethod#bindUnboundMethod#super_methodUnboundMethod#arityUnboundMethod#ownerUnboundMethod#parametersUnboundMethod#source_location
