diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | lib/cgi.rb | 2 |
3 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Fri Oct 29 10:00:30 2004 Yukihiro Matsumoto <matz@ruby-lang.org> + + * 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 <akira@ruby-lang.org> * ext/zlib/zlib.c (zstream_detach_input): resets klass of z->input if @@ -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 fc0913349d..b68ee803ee 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 |