Skip to content

Commit 1a68238

Browse files
committed
* eval.c (get_backtrace): check the result more.
[ruby-dev:31261] [ruby-bugs-12398] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 78cc8cc commit 1a68238

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Wed Aug 22 10:55:00 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
2+
3+
* eval.c (get_backtrace): check the result more.
4+
[ruby-dev:31261] [ruby-bugs-12398]
5+
16
Wed Aug 22 10:36:15 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
27

38
* bignum.c (rb_big_lshift, rb_big_rshift): separated functions

error.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -488,14 +488,14 @@ static VALUE
488488
exc_backtrace(exc)
489489
VALUE exc;
490490
{
491-
ID bt = rb_intern("bt");
491+
static ID bt;
492492

493-
if (!rb_ivar_defined(exc, bt)) return Qnil;
494-
return rb_ivar_get(exc, bt);
493+
if (!bt) bt = rb_intern("bt");
494+
return rb_attr_get(exc, bt);
495495
}
496496

497-
static VALUE
498-
check_backtrace(bt)
497+
VALUE
498+
rb_check_backtrace(bt)
499499
VALUE bt;
500500
{
501501
long i;
@@ -532,7 +532,7 @@ exc_set_backtrace(exc, bt)
532532
VALUE exc;
533533
VALUE bt;
534534
{
535-
return rb_iv_set(exc, "bt", check_backtrace(bt));
535+
return rb_iv_set(exc, "bt", rb_check_backtrace(bt));
536536
}
537537

538538
/*

eval.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,14 +1197,16 @@ error_pos()
11971197
}
11981198
}
11991199

1200+
VALUE rb_check_backtrace(VALUE);
1201+
12001202
static VALUE
12011203
get_backtrace(info)
12021204
VALUE info;
12031205
{
12041206
if (NIL_P(info)) return Qnil;
12051207
info = rb_funcall(info, rb_intern("backtrace"), 0);
12061208
if (NIL_P(info)) return Qnil;
1207-
return rb_check_array_type(info);
1209+
return rb_check_backtrace(info);
12081210
}
12091211

12101212
static void

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define RUBY_RELEASE_DATE "2007-08-22"
33
#define RUBY_VERSION_CODE 186
44
#define RUBY_RELEASE_CODE 20070822
5-
#define RUBY_PATCHLEVEL 71
5+
#define RUBY_PATCHLEVEL 72
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8

0 commit comments

Comments
 (0)