mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
merges r24401 from trunk into ruby_1_9_1.
-- * eval.c (rb_longjmp): reset raised flag before fatal error. * eval_error.c (error_print): file can be NULL. line can be 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b1e7a961d2
commit
df359ef462
4 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Wed Aug 5 12:39:23 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (rb_longjmp): reset raised flag before fatal error.
|
||||||
|
|
||||||
|
* eval_error.c (error_print): file can be NULL. line can be 0.
|
||||||
|
|
||||||
Wed Aug 5 01:38:27 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
Wed Aug 5 01:38:27 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* lib/pp.rb (guard_inspect_key): untrust internal hash to prevent
|
* lib/pp.rb (guard_inspect_key): untrust internal hash to prevent
|
||||||
|
|
1
eval.c
1
eval.c
|
@ -345,6 +345,7 @@ rb_longjmp(int tag, VALUE mesg)
|
||||||
|
|
||||||
if (rb_thread_set_raised(th)) {
|
if (rb_thread_set_raised(th)) {
|
||||||
th->errinfo = exception_error;
|
th->errinfo = exception_error;
|
||||||
|
rb_thread_reset_raised(th);
|
||||||
JUMP_TAG(TAG_FATAL);
|
JUMP_TAG(TAG_FATAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,10 +87,12 @@ error_print(void)
|
||||||
if (NIL_P(errat)) {
|
if (NIL_P(errat)) {
|
||||||
const char *file = rb_sourcefile();
|
const char *file = rb_sourcefile();
|
||||||
int line = rb_sourceline();
|
int line = rb_sourceline();
|
||||||
if (file)
|
if (!file)
|
||||||
warn_printf("%s:%d", file, line);
|
|
||||||
else
|
|
||||||
warn_printf("%d", line);
|
warn_printf("%d", line);
|
||||||
|
else if (!line)
|
||||||
|
warn_printf("%s", file);
|
||||||
|
else
|
||||||
|
warn_printf("%s:%d", file, line);
|
||||||
}
|
}
|
||||||
else if (RARRAY_LEN(errat) == 0) {
|
else if (RARRAY_LEN(errat) == 0) {
|
||||||
error_pos();
|
error_pos();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#define RUBY_VERSION "1.9.1"
|
#define RUBY_VERSION "1.9.1"
|
||||||
#define RUBY_PATCHLEVEL 271
|
#define RUBY_PATCHLEVEL 272
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
#define RUBY_VERSION_MINOR 9
|
#define RUBY_VERSION_MINOR 9
|
||||||
#define RUBY_VERSION_TEENY 1
|
#define RUBY_VERSION_TEENY 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue