From 8e4c6d848216495cf4ddde1aae52f9ac3c0c0801 Mon Sep 17 00:00:00 2001 From: shugo Date: Tue, 25 Dec 2007 08:49:09 +0000 Subject: [PATCH] * vm.c (rb_frame_method_id_and_class): new function to get the method id and class of the current frame. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ include/ruby/intern.h | 1 + vm.c | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index e2e5660dcc..33739f3e3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Dec 25 17:48:28 2007 Shugo Maeda + + * vm.c (rb_frame_method_id_and_class): new function to get the + method id and class of the current frame. + Tue Dec 25 17:32:04 2007 Akinori MUSHA * lib/mkmf.rb (create_makefile): Add a missing dependency on the diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 977f58cd69..eaacc96052 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -626,6 +626,7 @@ VALUE rb_str_succ(VALUE); VALUE rb_time_succ(VALUE); void Init_stack(VALUE*); void rb_frame_pop(void); +int rb_frame_method_id_and_class(ID *idp, VALUE *klassp); #if defined(__cplusplus) #if 0 diff --git a/vm.c b/vm.c index 00689dcde3..0da900dfc8 100644 --- a/vm.c +++ b/vm.c @@ -1388,6 +1388,12 @@ rb_thread_method_id_and_class(rb_thread_t *th, ID *idp, VALUE *klassp) return 0; } +int +rb_frame_method_id_and_class(ID *idp, VALUE *klassp) +{ + return rb_thread_method_id_and_class(GET_THREAD(), idp, klassp); +} + VALUE rb_thread_current_status(rb_thread_t *th) {