From ee3044e3ae0619821b63fde2f2e9f6c2e0ac8788 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 4 Apr 2007 15:42:16 +0000 Subject: * error.c (rb_notimplement), io.c (pipe_open): removed definite articles and UNIX manual section from messages. [ruby-dev:30690] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- error.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'error.c') diff --git a/error.c b/error.c index 2d4bafdf5..b80afa881 100644 --- a/error.c +++ b/error.c @@ -1027,8 +1027,8 @@ rb_loaderror(const char *fmt, ...) void rb_notimplement(void) { - rb_raise(rb_eNotImpError, - "The %s() function is unimplemented on this machine", + rb_raise(rb_eNotImpError, + "%s() function is unimplemented on this machine", rb_id2name(rb_frame_this_func())); } @@ -1473,21 +1473,21 @@ Init_syserr(void) static void err_append(const char *s) { - rb_thread_t *th = GET_THREAD(); - if (th->parse_in_eval) { - if (NIL_P(th->errinfo)) { - th->errinfo = rb_exc_new2(rb_eSyntaxError, s); + rb_thread_t *th = GET_THREAD(); + if (th->parse_in_eval) { + if (NIL_P(th->errinfo)) { + th->errinfo = rb_exc_new2(rb_eSyntaxError, s); + } + else { + VALUE str = rb_obj_as_string(GET_THREAD()->errinfo); + + rb_str_cat2(str, "\n"); + rb_str_cat2(str, s); + th->errinfo = rb_exc_new3(rb_eSyntaxError, str); + } } else { - VALUE str = rb_obj_as_string(GET_THREAD()->errinfo); - - rb_str_cat2(str, "\n"); - rb_str_cat2(str, s); - th->errinfo = rb_exc_new3(rb_eSyntaxError, str); + rb_write_error(s); + rb_write_error("\n"); } - } - else { - rb_write_error(s); - rb_write_error("\n"); - } } -- cgit