1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (rb_frame_callee): check if prev_cfp can be accessible.

a patch from Yoshinori Sano <yoshinori.sano at gmail.com> in
  [ruby-dev:30252].  solves [ruby-dev:30200] and [ruby-core:9856].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-02-04 19:12:52 +00:00
parent d9046f918d
commit cbee6e017d
3 changed files with 16 additions and 4 deletions

View file

@ -1,3 +1,9 @@
Mon Feb 5 04:09:48 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_frame_callee): check if prev_cfp can be accessible.
a patch from Yoshinori Sano <yoshinori.sano at gmail.com> in
[ruby-dev:30252]. solves [ruby-dev:30200] and [ruby-core:9856].
Sun Feb 4 20:34:41 2007 Kouhei Sutou <kou@cozmixng.org> Sun Feb 4 20:34:41 2007 Kouhei Sutou <kou@cozmixng.org>
* test/rss/rss-assertions.rb: removed needless code for backward * test/rss/rss-assertions.rb: removed needless code for backward

8
eval.c
View file

@ -1879,7 +1879,13 @@ rb_frame_this_func(void)
ID ID
rb_frame_callee(void) rb_frame_callee(void)
{ {
return frame_func_id(GET_THREAD()->cfp + 1); yarv_thread_t *th = GET_THREAD();
yarv_control_frame_t *prev_cfp = YARV_PREVIOUS_CONTROL_FRAME(th->cfp);
/* check if prev_cfp can be accessible */
if ((void *)(th->stack + th->stack_size) == (void *)(prev_cfp)) {
return 0;
}
return frame_func_id(prev_cfp);
} }
void void

View file

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0" #define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2007-02-04" #define RUBY_RELEASE_DATE "2007-02-05"
#define RUBY_VERSION_CODE 190 #define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20070204 #define RUBY_RELEASE_CODE 20070205
#define RUBY_PATCHLEVEL 0 #define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0 #define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 2 #define RUBY_RELEASE_MONTH 2
#define RUBY_RELEASE_DAY 4 #define RUBY_RELEASE_DAY 5
RUBY_EXTERN const char ruby_version[]; RUBY_EXTERN const char ruby_version[];
RUBY_EXTERN const char ruby_release_date[]; RUBY_EXTERN const char ruby_release_date[];