Skip to content

Commit

Permalink
* eval.c (rb_frame_callee): check if prev_cfp can be accessible.
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
matz committed Feb 4, 2007
1 parent d9046f9 commit cbee6e0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Mon Feb 5 04:09:48 2007 Yukihiro Matsumoto <[email protected]>

* 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 <[email protected]>

* test/rss/rss-assertions.rb: removed needless code for backward
Expand Down
8 changes: 7 additions & 1 deletion eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,13 @@ rb_frame_this_func(void)
ID
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
Expand Down
6 changes: 3 additions & 3 deletions version.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#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_RELEASE_CODE 20070204
#define RUBY_RELEASE_CODE 20070205
#define RUBY_PATCHLEVEL 0

#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2007
#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_release_date[];
Expand Down

0 comments on commit cbee6e0

Please sign in to comment.