mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (setup_exception): avoid line number 0 when setting
$DEBUG=true. [ruby-dev:39116] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ae2065a285
commit
6bec06674c
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Mar 4 22:49:42 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* eval.c (setup_exception): avoid line number 0 when setting
|
||||
$DEBUG=true. [ruby-dev:39116]
|
||||
|
||||
Thu Mar 4 22:45:02 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* io.c (io_s_write, io_s_binwrite): add File#write and #binwrite.
|
||||
|
|
7
eval.c
7
eval.c
|
@ -394,11 +394,16 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg)
|
|||
PUSH_TAG();
|
||||
if ((status = EXEC_TAG()) == 0) {
|
||||
RB_GC_GUARD(e) = rb_obj_as_string(e);
|
||||
if (file) {
|
||||
if (file && line) {
|
||||
warn_printf("Exception `%s' at %s:%d - %s\n",
|
||||
rb_obj_classname(th->errinfo),
|
||||
file, line, RSTRING_PTR(e));
|
||||
}
|
||||
else if (file) {
|
||||
warn_printf("Exception `%s' at %s - %s\n",
|
||||
rb_obj_classname(th->errinfo),
|
||||
file, RSTRING_PTR(e));
|
||||
}
|
||||
else {
|
||||
warn_printf("Exception `%s' - %s\n",
|
||||
rb_obj_classname(th->errinfo),
|
||||
|
|
Loading…
Add table
Reference in a new issue