diff options
-rw-r--r-- | ChangeLog | 43 | ||||
-rw-r--r-- | bignum.c | 5 | ||||
-rw-r--r-- | ext/dbm/extconf.rb | 8 | ||||
-rw-r--r-- | hash.c | 19 | ||||
-rw-r--r-- | ia64.s | 33 | ||||
-rw-r--r-- | lib/cgi.rb | 7 | ||||
-rw-r--r-- | parse.y | 3 | ||||
-rw-r--r-- | version.c | 4 | ||||
-rw-r--r-- | version.h | 10 |
9 files changed, 80 insertions, 52 deletions
@@ -1,3 +1,46 @@ +Mon Dec 4 10:22:26 2006 URABE Shyouhei <shyouhei@ice.uec.ac.jp> + + * stable version 1.8.5-p2 relased. + +Sun Dec 3 17:11:12 2006 Shugo Maeda <shugo@ruby-lang.org> + + * lib/cgi.rb (CGI::QueryExtension::read_multipart): should quote + boundary. JVN#84798830 + +Sun Nov 26 16:36:46 2006 URABE Shyouhei <shyouhei@ruby-lang.org> + + * version.h: addition of RUBY_PATCHLEVEL. + * version.c: ditto. + +Fri Nov 24 10:17:51 2006 Yukihiro Matsumoto <matz@ruby-lang.org> + + * bignum.c (bignorm): avoid segmentation. a patch from Hiroyuki + Ito <ZXB01226@nifty.com>. [ruby-list:43012] + +Thu Nov 2 15:43:39 2006 NAKAMURA Usaku <usa@ruby-lang.org> + + * parse.y (primary): should set NODE even when compstmt is NULL. + merge from trunk. fixed: [ruby-dev:29732] + +Sat Sep 23 21:34:15 2006 Yukihiro Matsumoto <matz@ruby-lang.org> + + * lib/cgi.rb (CGI::QueryExtension::read_multipart): CGI content + may be empty. a patch from Jamis Buck <jamis at 37signals.com>. + +Mon Sep 4 21:43:57 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/dbm/extconf.rb: create makefile according to the result of check + for dbm header. fixed: [ruby-dev:29445] + +Tue Aug 29 19:10:10 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * hash.c (rb_hash_s_create): fixed memory leak, based on the patch + by Kent Sibilev <ksruby at gmail.com>. fixed: [ruby-talk:211233] + +Fri Aug 25 17:15:17 2006 Yukihiro Matsumoto <matz@ruby-lang.org> + + * stable version 1.8.5 released. + Fri Aug 25 17:02:06 2006 Yukihiro Matsumoto <matz@ruby-lang.org> * gc.c (gc_sweep): typo fixed. @@ -99,7 +99,10 @@ static VALUE bignorm(x) VALUE x; { - if (!FIXNUM_P(x)) { + if (FIXNUM_P(x)) { + return x; + } + else if (TYPE(x) == T_BIGNUM) { long len = RBIGNUM(x)->len; BDIGIT *ds = BDIGITS(x); diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb index 19bfc1f6d3..52ec688952 100644 --- a/ext/dbm/extconf.rb +++ b/ext/dbm/extconf.rb @@ -46,16 +46,16 @@ def db_prefix(func) end if dblib - db_check(dblib) + dbm_hdr = db_check(dblib) else - for dblib in %w(db db2 db1 dbm gdbm gdbm_compat qdbm) - db_check(dblib) and break + dbm_hdr = %w(db db2 db1 dbm gdbm gdbm_compat qdbm).any? do |dblib| + db_check(dblib) end end have_header("cdefs.h") have_header("sys/cdefs.h") -if /DBM_HDR/ =~ $CFLAGS and have_func(db_prefix("dbm_open")) +if dbm_hdr and have_func(db_prefix("dbm_open")) have_func(db_prefix("dbm_clearerr")) unless $dbm_conf_have_gdbm create_makefile("dbm") end @@ -223,20 +223,31 @@ rb_hash_foreach(hash, func, farg) rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash); } +static VALUE hash_alloc0 _((VALUE)); static VALUE hash_alloc _((VALUE)); static VALUE -hash_alloc(klass) +hash_alloc0(klass) VALUE klass; { NEWOBJ(hash, struct RHash); OBJSETUP(hash, klass, T_HASH); hash->ifnone = Qnil; - hash->tbl = st_init_table(&objhash); return (VALUE)hash; } +static VALUE +hash_alloc(klass) + VALUE klass; +{ + VALUE hash = hash_alloc0(klass); + + RHASH(hash)->tbl = st_init_table(&objhash); + + return hash; +} + VALUE rb_hash_new() { @@ -325,9 +336,7 @@ rb_hash_s_create(argc, argv, klass) int i; if (argc == 1 && TYPE(argv[0]) == T_HASH) { - hash = hash_alloc(klass); - - RHASH(hash)->ifnone = Qnil; + hash = hash_alloc0(klass); RHASH(hash)->tbl = st_copy(RHASH(argv[0])->tbl); return hash; diff --git a/ia64.s b/ia64.s deleted file mode 100644 index ba5241daf2..0000000000 --- a/ia64.s +++ /dev/null @@ -1,33 +0,0 @@ -// rb_ia64_flushrs and rb_ia64_bsp is written in IA64 assembly language -// because Intel Compiler for IA64 doesn't support inline assembly. -// -// This file is based on following C program compiled by gcc. -// -// void rb_ia64_flushrs(void) { __builtin_ia64_flushrs(); } -// void *rb_ia64_bsp(void) { return __builtin_ia64_bsp(); } -// - .file "ia64.c" - .text - .align 16 - .global rb_ia64_flushrs# - .proc rb_ia64_flushrs# -rb_ia64_flushrs: - .prologue - .body - flushrs - ;; - nop.i 0 - br.ret.sptk.many b0 - .endp rb_ia64_flushrs# - .align 16 - .global rb_ia64_bsp# - .proc rb_ia64_bsp# -rb_ia64_bsp: - .prologue - .body - nop.m 0 - ;; - mov r8 = ar.bsp - br.ret.sptk.many b0 - .endp rb_ia64_bsp# - .ident "GCC: (GNU) 3.3.5 (Debian 1:3.3.5-13)" diff --git a/lib/cgi.rb b/lib/cgi.rb index 1598df89f2..ac80d91799 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -967,6 +967,7 @@ class CGI def read_multipart(boundary, content_length) params = Hash.new([]) boundary = "--" + boundary + quoted_boundary = Regexp.quote(boundary, "n") buf = "" bufsize = 10 * 1024 boundary_end="" @@ -998,7 +999,7 @@ class CGI end body.binmode if defined? body.binmode - until head and /#{boundary}(?:#{EOL}|--)/n.match(buf) + until head and /#{quoted_boundary}(?:#{EOL}|--)/n.match(buf) if (not head) and /#{EOL}#{EOL}/n.match(buf) buf = buf.sub(/\A((?:.|\n)*?#{EOL})#{EOL}/n) do @@ -1018,14 +1019,14 @@ class CGI else stdinput.read(content_length) end - if c.nil? + if c.nil? || c.empty? raise EOFError, "bad content body" end buf.concat(c) content_length -= c.size end - buf = buf.sub(/\A((?:.|\n)*?)(?:[\r\n]{1,2})?#{boundary}([\r\n]{1,2}|--)/n) do + buf = buf.sub(/\A((?:.|\n)*?)(?:[\r\n]{1,2})?#{quoted_boundary}([\r\n]{1,2}|--)/n) do body.print $1 if "--" == $2 content_length = -1 @@ -1481,7 +1481,8 @@ primary : literal } | tLPAREN compstmt ')' { - $$ = $2; + if (!$2) $$ = NEW_NIL(); + else $$ = $2; } | primary_value tCOLON2 tCONSTANT { @@ -17,6 +17,7 @@ const char ruby_version[] = RUBY_VERSION; const char ruby_release_date[] = RUBY_RELEASE_DATE; const char ruby_platform[] = RUBY_PLATFORM; +const int ruby_patchlevel = RUBY_PATCHLEVEL; void Init_version() @@ -28,6 +29,7 @@ Init_version() rb_define_global_const("RUBY_VERSION", v); rb_define_global_const("RUBY_RELEASE_DATE", d); rb_define_global_const("RUBY_PLATFORM", p); + rb_define_global_const("RUBY_PATCHLEVEL", INT2FIX(RUBY_PATCHLEVEL)); /* obsolete constants */ rb_define_global_const("VERSION", v); @@ -38,7 +40,7 @@ Init_version() void ruby_show_version() { - printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM); + printf("ruby %s (%s patchlevel %d) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PATCHLEVEL, RUBY_PLATFORM); fflush(stdout); } @@ -1,15 +1,17 @@ #define RUBY_VERSION "1.8.5" -#define RUBY_RELEASE_DATE "2006-08-23" +#define RUBY_RELEASE_DATE "2006-12-06" #define RUBY_VERSION_CODE 185 -#define RUBY_RELEASE_CODE 20060823 +#define RUBY_RELEASE_CODE 20061206 +#define RUBY_PATCHLEVEL 6 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 5 #define RUBY_RELEASE_YEAR 2006 -#define RUBY_RELEASE_MONTH 8 -#define RUBY_RELEASE_DAY 23 +#define RUBY_RELEASE_MONTH 12 +#define RUBY_RELEASE_DAY 6 RUBY_EXTERN const char ruby_version[]; RUBY_EXTERN const char ruby_release_date[]; RUBY_EXTERN const char ruby_platform[]; +RUBY_EXTERN const int ruby_patchlevel; |