3fbb02294a8ca33d4684055adba5ed6f ruby-1.8.5.tar.gz
d662b7a68bb88366f2a76b433d765d75 ruby-arch.diff
+9d57b2fefcb86461814462033daff254 ruby-array_shift.diff
+9d25f59d1c33a0b215f6c25260dcb536 ruby-cgi_dos.diff
+8c83dec7591afc3bbea9d8325a7e29b4 ruby-rdoc-multiple_files.diff
af301cb7830a880e7b30fdba1a64ef97 ruby-valgrind.diff
name=ruby
version=1.8.5
-release=1
+release=2
source=(ftp://ftp.ruby-lang.org/pub/$name/1.8/$name-$version.tar.gz \
- $name-arch.diff $name-valgrind.diff)
+ $name-arch.diff $name-valgrind.diff \
+ $name-rdoc-multiple_files.diff $name-array_shift.diff \
+ $name-cgi_dos.diff)
build () {
cd $name-$version
patch -Np1 -i ../$name-valgrind.diff
patch -Np1 -i ../$name-arch.diff
+ patch -Np1 -i ../$name-rdoc-multiple_files.diff
+ patch -Np1 -i ../$name-array_shift.diff
+ patch -Np0 -i ../$name-cgi_dos.diff
./configure --prefix=/usr --enable-shared --enable-pthread \
--mandir=/usr/man
--- /dev/null
+diff -aur ruby-1.8.5.orig/array.c ruby-1.8.5/array.c
+--- ruby-1.8.5.orig/array.c 2006-06-24 16:53:36.000000000 +0200
++++ ruby-1.8.5/array.c 2006-11-12 11:58:46.187673233 +0100
+@@ -501,8 +501,16 @@
+ rb_ary_modify_check(ary);
+ if (RARRAY(ary)->len == 0) return Qnil;
+ top = RARRAY(ary)->ptr[0];
+- ary_make_shared(ary);
+- RARRAY(ary)->ptr++; /* shift ptr */
++ if (RARRAY(ary)->len < ARY_DEFAULT_SIZE && !FL_TEST(ary, ELTS_SHARED)) {
++ MEMMOVE(RARRAY(ary)->ptr, RARRAY(ary)->ptr + 1, VALUE, RARRAY(ary)->len - 1);
++ }
++ else {
++ if (!FL_TEST(ary, ELTS_SHARED)) {
++ RARRAY(ary)->ptr[0] = Qnil;
++ }
++ ary_make_shared(ary);
++ RARRAY(ary)->ptr++; /* shift ptr */
++ }
+ RARRAY(ary)->len--;
+
+ return top;
--- /dev/null
+--- lib/cgi.rb.orig 2006-08-22 18:38:19.000000000 +0900
++++ lib/cgi.rb 2006-11-03 00:18:53.000000000 +0900
+@@ -1018,7 +1018,7 @@ 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)
--- /dev/null
+Index: ruby-1.8.5.orig/lib/rdoc/parsers/parse_c.rb
+===================================================================
+RCS file: /src/ruby/lib/rdoc/parsers/parse_c.rb,v
+retrieving revision 1.25
+diff -u -1 -r1.25 parse_c.rb
+--- parse_c.rb 9 Sep 2004 02:47:35 -0000 1.25
++++ parse_c.rb 28 Jan 2005 02:45:45 -0000
+@@ -171,2 +171,3 @@
+
++ @@enclosure_classes = {}
+ @@known_bodies = {}
+@@ -210,3 +211,3 @@
+ if in_module
+- enclosure = @classes[in_module]
++ enclosure = @classes[in_module] || @@enclosure_classes[in_module]
+ unless enclosure
+@@ -231,2 +232,3 @@
+ @classes[var_name] = cm
++ @@enclosure_classes[var_name] = cm
+ @known_classes[var_name] = cm.full_name