diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-13 04:53:22 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-13 04:53:22 +0000 |
commit | 7f7236025953af6e0308995e073f9babbe149473 (patch) | |
tree | 9bf6db5c720b6039d2f913fbfa466ff46d221ca3 /io.c | |
parent | c37c5419d251c5e72d413a4759eac2a34c1de3e4 (diff) |
* parse.y (parser_parse_string): mention "regexp" in a error
message. a patch from Mauricio Fernandez <mfp at acm.org>
[ruby-core:07340]
* eval.c (rb_f_autoload): check if ruby_cbase is nil (during
instance_eval for objects cannot have singleton classes,
e.g. fixnums and symbols). [ruby-dev:28178]
* gc.c (rb_gc_call_finalizer_at_exit): turn on during_gc while
invoking finalizers.
* gc.c (rb_gc_finalize_deferred): ditto.
* io.c (rb_write_error2): use fwrite(3) if rb_stderr is not
updated or is already freed. [ruby-dev:28313]
* eval.c (error_line): include the class name of a surrounding
method in error position description.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -3798,7 +3798,12 @@ rb_obj_display(int argc, VALUE *argv, VALUE self) void rb_write_error2(const char *mesg, long len) { - rb_io_write(rb_stderr, rb_str_new(mesg, len)); + if (rb_stderr == orig_stderr || RFILE(orig_stderr)->fptr->fd < 0) { + fwrite(mesg, sizeof(char), len, stderr); + } + else { + rb_io_write(rb_stderr, rb_str_new(mesg, len)); + } } void |