From 9a24232fd28baa60a4a460b2fc70a538b746bca0 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 15 Apr 2002 07:48:47 +0000 Subject: * pack.c (pack_unpack): should treat 'U' in character unit, not in byte unit. * error.c (exc_initialize): should clear backtrace information. * io.c (rb_io_fptr_cleanup): should close IO created by IO.new(fd). * rubyio.h: remove FMODE_FDOPEN git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 82068f140f..0e8b5cc0bd 100644 --- a/eval.c +++ b/eval.c @@ -5049,14 +5049,13 @@ eval(self, src, scope, file, line) if (strcmp(file, "(eval)") == 0) { if (ruby_sourceline > 1) { errat = get_backtrace(ruby_errinfo); - err = RARRAY(errat)->ptr[0]; + err = rb_str_dup(RARRAY(errat)->ptr[0]); rb_str_cat2(err, ": "); rb_str_append(err, ruby_errinfo); } else { err = rb_str_dup(ruby_errinfo); } - errat = Qnil; rb_exc_raise(rb_funcall(ruby_errinfo, rb_intern("exception"), 1, err)); } rb_exc_raise(ruby_errinfo); -- cgit v1.2.3