From 6eb76ba664a7ea1dc2b6804a0f2280e1f7531c53 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 6 Feb 2013 04:35:23 +0000 Subject: vm_method.c: show respond_to location * proc.c (rb_method_entry_location, rb_{mod,obj}_method_location): new functions to obtain source location of method definition. * vm_method.c (rb_obj_respond_to): show the location of old style respond_to? method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- method.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'method.h') diff --git a/method.h b/method.h index e1612cbb9b..b99674a913 100644 --- a/method.h +++ b/method.h @@ -126,6 +126,10 @@ int rb_method_entry_arity(const rb_method_entry_t *me); int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2); st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me); +VALUE rb_method_entry_location(rb_method_entry_t *me); +VALUE rb_mod_method_location(VALUE mod, ID id); +VALUE rb_obj_method_location(VALUE obj, ID id); + void rb_mark_method_entry(const rb_method_entry_t *me); void rb_free_method_entry(rb_method_entry_t *me); void rb_sweep_method_entry(void *vm); -- cgit v1.2.3