From 55bb4f8888258e713d8688ed0409ccde6d98fc29 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 29 Oct 2004 01:06:37 +0000 Subject: * eval.c (ruby_cleanup): ruby_finalize_1 may cause exception, should be wrapped by PUSH_TAG/POP_TAG(). [ruby-dev:24627] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ eval.c | 2 +- lib/cgi.rb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76da9a838..d8f0c84d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 29 10:00:30 2004 Yukihiro Matsumoto + + * eval.c (ruby_cleanup): ruby_finalize_1 may cause exception, + should be wrapped by PUSH_TAG/POP_TAG(). [ruby-dev:24627] + Thu Oct 28 23:32:54 2004 akira yamada * ext/zlib/zlib.c (zstream_detach_input): resets klass of z->input if diff --git a/eval.c b/eval.c index 63e4c1312..530662fdc 100644 --- a/eval.c +++ b/eval.c @@ -1432,9 +1432,9 @@ ruby_cleanup(ex) POP_ITER(); ruby_errinfo = err; ex = error_handle(ex); + ruby_finalize_1(); POP_TAG(); - ruby_finalize_1(); if (err && rb_obj_is_kind_of(err, rb_eSystemExit)) { VALUE st = rb_iv_get(err, "status"); return NUM2INT(st); diff --git a/lib/cgi.rb b/lib/cgi.rb index fc0913349..b68ee803e 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -1023,7 +1023,7 @@ class CGI content_length -= c.size end - buf = buf.sub(/\A((?:.|\n)*?)(?:#{EOL})?#{boundary}(#{EOL}|--)/n) do + buf = buf.sub(/\A((?:.|\n)*?)(?:#{EOL})?#{boundary}(#{EOL}|#{LF}|--)/n) do body.print $1 if "--" == $2 content_length = -1 -- cgit