<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,114 @@
+Sat May 31 23:53:35 2008  Akinori MUSHA  &lt;knu@iDaemons.org&gt;
+
+	* .: Release as Ruby 1.8.7.
+
+Sat May 31 23:33:34 2008  Akinori MUSHA  &lt;knu@iDaemons.org&gt;
+
+	* README, README.ja: Add a note about default C flags.
+
+Sat May 31 22:11:15 2008  Kazuhiro NISHIYAMA  &lt;zn@mbf.nifty.com&gt;
+
+	* version.c (ruby_description, ruby_copyright): backported from
+	  1.9. bug#19002, [ruby-dev:34883]
+
+	* error.c (report_bug): uses ruby_description.
+
+Sat May 31 20:56:04 2008  Akinori MUSHA  &lt;knu@iDaemons.org&gt;
+
+	* array.c (rb_ary_delete_if): should return enumerator if no block
+	  is given.  [ruby-dev:34901]
+
+Sat May 31 18:28:17 2008  Nobuyoshi Nakada  &lt;nobu@ruby-lang.org&gt;
+
+	* suppress warnings with -Wwrite-string.
+
+Sat May 31 15:58:08 2008  Nobuyoshi Nakada  &lt;nobu@ruby-lang.org&gt;
+
+	* Makefile.in, configure.in (warnflags): defaulted to -Wall
+	  -Wno-parentheses with gcc.  [ruby-dev:34810]
+
+Fri May 30 05:28:18 2008  NAKAMURA Usaku  &lt;usa@ruby-lang.org&gt;
+
+	* enum.c (count_i, count_iter_i, count_all_i): add prototypes for VC.
+
+Fri May 30 04:32:07 2008  Akinori MUSHA  &lt;knu@iDaemons.org&gt;
+
+	* enum.c (count_i, count_iter_i): Sync with trunk.
+	  enum.c (enum_count, count_all_i, Init_Enumerable),
+	  array.c (rb_ary_count): Sync with trunk.  If no argument or
+	  block is given, count the number of all elements.
+
+Fri May 30 03:12:18 2008  Akinori MUSHA  &lt;knu@iDaemons.org&gt;
+
+	* ext/openssl/ossl_bn.c (ossl_bn_s_rand, ossl_bn_s_pseudo_rand):
+	  Int should be enough here.
+
+Fri May 30 02:35:00 2008  Akinori MUSHA  &lt;knu@iDaemons.org&gt;
+
+	* ext/openssl/ossl_bn.c (ossl_bn_s_rand, ossl_bn_s_pseudo_rand),
+	  ext/openssl/ossl_pkey_dh.c (ossl_dh_s_generate)
+	  (ossl_dh_initialize),
+	  ext/openssl/ossl_pkey_dsa.c (ossl_dsa_s_generate),
+	  ext/openssl/ossl_rand.c (ossl_rand_bytes)
+	  (ossl_rand_pseudo_bytes, ossl_rand_egd_bytes),
+	  ext/openssl/ossl_x509store.c (ossl_x509stctx_set_error): Do not
+	  use FIX2INT() without checking the value type.  Use NUM2INT()
+	  instead; found by akr in [ruby-dev:34890].
+
+Thu May 29 20:07:45 2008  Akinori MUSHA  &lt;knu@iDaemons.org&gt;
+
+	* configure.in, win32/Makefile.sub, mkconfig.rb, instruby.rb,
+	  ruby.c, lib/mkmf.rb, README.EXT, README.EXT.ja: Backport the
+	  vendor_ruby directory support.
+
+Thu May 29 17:52:31 2008  Nobuyoshi Nakada  &lt;nobu@ruby-lang.org&gt;
+
+	* ext/zlib/extconf.rb: search zlib1, and regard mswin32 later than VC6
+	  as WIN32.  [ruby-core:16984]
+
+Wed May 28 17:54:29 2008  Akinori MUSHA  &lt;knu@iDaemons.org&gt;
+
+	* string.c (rb_str_start_with): Remove an unused variable.
+	  (rb_str_upto_m): Fix a prototype.
+
+Wed May 28 17:48:28 2008  Akinori MUSHA  &lt;knu@iDaemons.org&gt;
+
+	* range.c (range_step): Fix brokenness when a non-integer numeric
+	  value is specified as step. [rubyspec]
+	  (range_step): Make use of String#step internally if a string (or
+	  string-alike) range is given.
+
+	* string.c (rb_str_upto_m, Init_String): Add an optional second
+	  argument to specify if the last value should be included.
+
+Wed May 28 16:53:39 2008  Akinori MUSHA  &lt;knu@iDaemons.org&gt;
+
+	* array.c (rb_ary_slice_bang): Call rb_ary_modify_check() at the
+	  beginning. [rubyspec]
+
+Wed May 28 16:12:44 2008  Akinori MUSHA  &lt;knu@iDaemons.org&gt;
+
+	* lib/webrick/httpservlet/cgihandler.rb (WEBrick::HTTPServlet::CGIHandler#do_GET):
+	  Set the HTTP status code to 302 if a Location header field is
+	  present and the status code is not valid as a client
+	  redirection.  cf. RFC 3875 6.2.3, 6.2.4.
+
+Wed May 28 15:18:16 2008  Nobuyoshi Nakada  &lt;nobu@ruby-lang.org&gt;
+
+	* lib/singleton.rb (SingletonClassMethods): _load should be public.
+
+Wed May 28 12:52:41 2008  Nobuyoshi Nakada  &lt;nobu@ruby-lang.org&gt;
+
+	* marshal.c (w_object, marshal_dump, r_object0, marshal_load): search
+	  private methods too.  [ruby-dev:34671]
+
+	* object.c (convert_type): ditto.
+
+Tue May 27 23:26:49 2008  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* error.c (rb_bug): description from rb_bug() should include
+	  patchlevel.  [ruby-dev:34826]
+
 Tue May 27 20:19:22 2008  Akinori MUSHA  &lt;knu@iDaemons.org&gt;
 
 	* array.c (rb_ary_slice_bang): Return an empty array instead of</diff>
      <filename>ChangeLog</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,31 @@ with all sufficient information, see the ChangeLog file.
 
 == Changes since the 1.8.6 release
 
+=== Configuration changes
+
+* default C flags
+
+  Some C compiler flags may be added by default depending on your
+  environment.  Specify optflags=.. and warnflags=.. as necessary to
+  override them.
+
+* vendor_ruby directory
+
+  A new library directory named `vendor_ruby' is introduced in
+  addition to `site_ruby'.  The idea is to separate libraries
+  installed by the package system (`vendor') from manually (`site')
+  installed libraries preventing the former from getting overwritten
+  by the latter, while preserving the user option to override vendor
+  libraries with site libraries. (`site_ruby' takes precedence over
+  `vendor_ruby')
+
+  If you are a package maintainer, make each library package configure
+  the library passing the `--vendor' option to `extconf.rb' so that
+  the library files will get installed under `vendor_ruby'.
+
+  You can change the directory locations using configure options such
+  as `--with-sitedir=DIR' and `--with-vendordir=DIR'.
+
 === Library updates (outstanding ones only)
 
 * new library
@@ -241,11 +266,16 @@ with all sufficient information, see the ChangeLog file.
 
   * String#each_byte
   * String#each
-  * String#each_lines
+  * String#each_line
   * String#gsub(pattern)
 
     Return an enumerator if no block is given.
 
+  * String#upto
+
+    An optional second argument is added to specify if the last value
+    should be included.
+
   * StopIteration
 
     New exception class that causes Kernel#loop to stop iteration when</diff>
      <filename>NEWS</filename>
    </modified>
    <modified>
      <diff>@@ -70,6 +70,10 @@ This is what you need to do to compile and install Ruby:
 
   2. Run ./configure, which will generate config.h and Makefile.
 
+     Some C compiler flags may be added by default depending on your
+     environment.  Specify optflags=.. and warnflags=.. as necessary
+     to override them.
+
   3. Edit defines.h if you need.  Usually this step will not be needed.
 
   4. Remove comment mark(#) before the module names from ext/Setup (or</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -662,6 +662,11 @@ Try generating the Makefile by:
 
   ruby extconf.rb
 
+If the library should be installed under vendor_ruby directory
+instead of site_ruby directory, use --vendor option as follows.
+
+  ruby extconf.rb --vendor
+
 You don't need this step if you put the extension library under the ext
 directory of the ruby source tree.  In that case, compilation of the
 interpreter will do this step for you.</diff>
      <filename>README.EXT</filename>
    </modified>
    <modified>
      <diff>@@ -765,6 +765,12 @@ Makefile
 
 &#164;&#200;&#164;&#183;&#164;&#198;&#164;&#175;&#164;&#192;&#164;&#181;&#164;&#164;&#161;&#165;
 
+site_ruby &#165;&#199;&#165;&#163;&#165;&#236;&#165;&#175;&#165;&#200;&#165;&#234;&#164;&#199;&#164;&#202;&#164;&#175;&#161;&#162;
+vendor_ruby &#165;&#199;&#165;&#163;&#165;&#236;&#165;&#175;&#165;&#200;&#165;&#234;&#164;&#203;&#165;&#164;&#165;&#243;&#165;&#185;&#165;&#200;&#161;&#188;&#165;&#235;&#164;&#185;&#164;&#235;&#190;&#236;&#185;&#231;&#164;&#203;&#164;&#207;
+&#176;&#202;&#178;&#188;&#164;&#206;&#164;&#232;&#164;&#166;&#164;&#203; --vendor &#165;&#170;&#165;&#215;&#165;&#183;&#165;&#231;&#165;&#243;&#164;&#242;&#178;&#195;&#164;&#168;&#164;&#198;&#164;&#175;&#164;&#192;&#164;&#181;&#164;&#164;&#161;&#165;
+
+  ruby extconf.rb --vendor
+
 &#165;&#199;&#165;&#163;&#165;&#236;&#165;&#175;&#165;&#200;&#165;&#234;&#164;&#242;ext&#176;&#202;&#178;&#188;&#164;&#203;&#205;&#209;&#176;&#213;&#164;&#183;&#164;&#191;&#190;&#236;&#185;&#231;&#164;&#203;&#164;&#207;Ruby&#193;&#180;&#194;&#206;&#164;&#206;make&#164;&#206;&#187;&#254;&#164;&#203;
 &#188;&#171;&#198;&#176;&#197;&#170;&#164;&#203;Makefile&#164;&#172;&#192;&#184;&#192;&#174;&#164;&#181;&#164;&#236;&#164;&#222;&#164;&#185;&#164;&#206;&#164;&#199;&#161;&#164;&#164;&#179;&#164;&#206;&#165;&#185;&#165;&#198;&#165;&#195;&#165;&#215;&#164;&#207;&#201;&#212;&#205;&#215;&#164;&#199;&#164;&#185;&#161;&#165;
 </diff>
      <filename>README.EXT.ja</filename>
    </modified>
    <modified>
      <diff>@@ -92,6 +92,10 @@ Ruby
 
   2. configure&#164;&#242;&#188;&#194;&#185;&#212;&#164;&#183;&#164;&#198;Makefile&#164;&#202;&#164;&#201;&#164;&#242;&#192;&#184;&#192;&#174;&#164;&#185;&#164;&#235;
 
+     &#180;&#196;&#182;&#173;&#164;&#203;&#164;&#232;&#164;&#195;&#164;&#198;&#164;&#207;&#165;&#199;&#165;&#213;&#165;&#169;&#165;&#235;&#165;&#200;&#164;&#206;C&#165;&#179;&#165;&#243;&#165;&#209;&#165;&#164;&#165;&#233;&#205;&#209;&#165;&#170;&#165;&#215;&#165;&#183;&#165;&#231;&#165;&#243;&#164;&#172;&#201;&#213;&#164;&#173;
+     &#164;&#222;&#164;&#185;&#161;&#165;configure&#165;&#170;&#165;&#215;&#165;&#183;&#165;&#231;&#165;&#243;&#164;&#199; optflags=.. warnflags=.. &#197;&#249;
+     &#164;&#199;&#190;&#229;&#189;&#241;&#164;&#173;&#164;&#199;&#164;&#173;&#164;&#222;&#164;&#185;&#161;&#165;
+
   3. (&#201;&#172;&#205;&#215;&#164;&#202;&#164;&#233;&#164;&#208;)defines.h&#164;&#242;&#202;&#212;&#189;&#184;&#164;&#185;&#164;&#235;
 
      &#194;&#191;&#202;&#172;&#161;&#164;&#201;&#172;&#205;&#215;&#204;&#181;&#164;&#164;&#164;&#200;&#187;&#215;&#164;&#164;&#164;&#222;&#164;&#185;&#161;&#165;</diff>
      <filename>README.ja</filename>
    </modified>
    <modified>
      <diff>@@ -2080,6 +2080,7 @@ rb_ary_slice_bang(argc, argv, ary)
     VALUE arg1, arg2;
     long pos, len, orig_len;
 
+    rb_ary_modify_check(ary);
     if (rb_scan_args(argc, argv, &quot;11&quot;, &amp;arg1, &amp;arg2) == 2) {
 	pos = NUM2LONG(arg1);
 	len = NUM2LONG(arg2);
@@ -2184,6 +2185,7 @@ static VALUE
 rb_ary_delete_if(ary)
     VALUE ary;
 {
+    RETURN_ENUMERATOR(ary, 0, 0);
     rb_ary_reject_bang(ary);
     return ary;
 }
@@ -3063,27 +3065,34 @@ rb_ary_nitems(ary)
 
 /*
  *  call-seq:
+ *     array.count      -&gt; int
  *     array.count(obj) -&gt; int
  *     array.count { |item| block }  -&gt; int
  *  
- *  Returns the number of elements which equals to &lt;i&gt;obj&lt;/i&gt;.
- *  If a block is given, counts tthe number of elements yielding a true value.
+ *  Returns the number of elements.  If an argument is given, counts
+ *  the number of elements which equals to &lt;i&gt;obj&lt;/i&gt;.  If a block is
+ *  given, counts the number of elements yielding a true value.
  *
  *     ary = [1, 2, 4, 2]
+ *     ary.count             # =&gt; 4
  *     ary.count(2)          # =&gt; 2
  *     ary.count{|x|x%2==0}  # =&gt; 3
  *
  */
 
 static VALUE
-rb_ary_count(int argc, VALUE *argv, VALUE ary)
+rb_ary_count(argc, argv, ary)
+    int argc;
+    VALUE *argv;
+    VALUE ary;
 {
     long n = 0;
 
     if (argc == 0) {
 	VALUE *p, *pend;
 
-	RETURN_ENUMERATOR(ary, 0, 0);
+	if (!rb_block_given_p())
+	    return LONG2NUM(RARRAY_LEN(ary));
 
 	for (p = RARRAY_PTR(ary), pend = p + RARRAY_LEN(ary); p &lt; pend; p++) {
 	    if (RTEST(rb_yield(*p))) n++;</diff>
      <filename>array.c</filename>
    </modified>
    <modified>
      <diff>@@ -294,9 +294,12 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub
 \#define RUBY_LIB &quot;/lib/ruby/$(MAJOR).$(MINOR)&quot;
 \#define RUBY_SITE_LIB &quot;/lib/ruby/site_ruby&quot;
 \#define RUBY_SITE_LIB2 &quot;/lib/ruby/site_ruby/$(MAJOR).$(MINOR)&quot;
+\#define RUBY_VENDOR_LIB &quot;/lib/ruby/vendor_ruby&quot;
+\#define RUBY_VENDOR_LIB2 &quot;/lib/ruby/vendor_ruby/$(MAJOR).$(MINOR)&quot;
 \#define RUBY_PLATFORM &quot;$(ARCH)-$(OS)&quot;
 \#define RUBY_ARCHLIB &quot;/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)&quot;
 \#define RUBY_SITE_ARCHLIB &quot;/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)&quot;
+\#define RUBY_VENDOR_ARCHLIB &quot;/lib/ruby/vendor_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)&quot;
 |
 	@exit &gt; $@
 
@@ -409,6 +412,7 @@ s,@EXPORT_PREFIX@,_,;t t
 s,@arch@,$(ARCH)-$(OS),;t t
 s,@sitearch@,$(ARCH)-$(OS),;t t
 s,@sitedir@,$${prefix}/lib/ruby/site_ruby,;t t
+s,@vendordir@,$${prefix}/lib/ruby/vendor_ruby,;t t
 s,@configure_args@,--enable-shared $(configure_args),;t t
 s,@configure_input@,$$configure_input,;t t
 s,@srcdir@,$(srcdir),;t t</diff>
      <filename>bcc32/Makefile.sub</filename>
    </modified>
    <modified>
      <diff>@@ -1710,9 +1710,28 @@ AC_DEFINE_UNQUOTED(RUBY_LIB, &quot;${RUBY_LIB_PATH}&quot;)
 AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, &quot;${RUBY_SITE_LIB_PATH}&quot;)
 AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, &quot;${RUBY_SITE_LIB_PATH2}&quot;)
 
+AC_ARG_WITH(vendordir,
+	    [  --with-vendordir=DIR    vendor libraries in DIR [PREFIX/lib/ruby/vendor_ruby]],
+            [vendordir=$withval],
+            [vendordir='${prefix}/lib/ruby/vendor_ruby'])
+VENDOR_DIR=`eval echo \\&quot;${vendordir}\\&quot;`
+case &quot;$target_os&quot; in
+  cygwin*|mingw*|*djgpp*|os2-emx*)
+    RUBY_VENDOR_LIB_PATH=&quot;`expr &quot;$VENDOR_DIR&quot; : &quot;$prefix\(/.*\)&quot;`&quot; ||
+    RUBY_VENDOR_LIB_PATH=&quot;$VENDOR_DIR&quot;;;
+  *)
+    RUBY_VENDOR_LIB_PATH=&quot;$VENDOR_DIR&quot;;;
+esac
+RUBY_VENDOR_LIB_PATH2=&quot;${RUBY_VENDOR_LIB_PATH}/${MAJOR}.${MINOR}&quot;
+
+AC_DEFINE_UNQUOTED(RUBY_LIB, &quot;${RUBY_LIB_PATH}&quot;)
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, &quot;${RUBY_VENDOR_LIB_PATH}&quot;)
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB2, &quot;${RUBY_VENDOR_LIB_PATH2}&quot;)
+
 AC_SUBST(arch)dnl
 AC_SUBST(sitearch)dnl
 AC_SUBST(sitedir)dnl
+AC_SUBST(vendordir)dnl
 
 configure_args=$ac_configure_args
 AC_SUBST(configure_args)dnl
@@ -1725,6 +1744,8 @@ if test &quot;$fat_binary&quot; != no ; then
 
     AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB,
                  &quot;${RUBY_SITE_LIB_PATH}/&quot; __ARCHITECTURE__ &quot;-${target_os}&quot;)
+    AC_DEFINE_UNQUOTED(RUBY_VENDOR_THIN_ARCHLIB,
+                 &quot;${RUBY_VENDOR_LIB_PATH}/&quot; __ARCHITECTURE__ &quot;-${target_os}&quot;)
     AC_DEFINE_UNQUOTED(RUBY_PLATFORM, __ARCHITECTURE__ &quot;-${target_os}&quot;)
 else
     arch=&quot;${target_cpu}-${target_os}&quot;
@@ -1738,6 +1759,7 @@ esac
 
 AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, &quot;${RUBY_LIB_PATH}/${arch}&quot;)
 AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, &quot;${RUBY_SITE_LIB_PATH2}/${sitearch}&quot;)
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, &quot;${RUBY_VENDOR_LIB_PATH2}/${sitearch}&quot;)
 
 AC_ARG_WITH(search-path,
 		[  --with-search-path=DIR specify the additional search path],</diff>
      <filename>configure.in</filename>
    </modified>
    <modified>
      <diff>@@ -475,7 +475,7 @@ dir_inspect(dir)
 
     Data_Get_Struct(dir, struct dir_data, dirp);
     if (dirp-&gt;path) {
-	char *c = rb_obj_classname(dir);
+	const char *c = rb_obj_classname(dir);
 	int len = strlen(c) + strlen(dirp-&gt;path) + 4;
 	VALUE s = rb_str_new(0, len);
 	snprintf(RSTRING_PTR(s), len+1, &quot;#&lt;%s:%s&gt;&quot;, c, dirp-&gt;path);</diff>
      <filename>dir.c</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,7 @@
 #include &quot;util.h&quot;
 
 VALUE rb_mEnumerable;
-static ID id_each, id_eqq, id_cmp;
+static ID id_each, id_eqq, id_cmp, id_size;
 
 struct iter_method_arg {
     VALUE obj;
@@ -113,37 +113,57 @@ enum_grep(obj, pat)
     return ary;
 }
 
+static VALUE count_i _((VALUE, VALUE));
 static VALUE
-count_i(i, arg)
-     VALUE i;
-     VALUE *arg;
+count_i(i, memop)
+    VALUE i, memop;
 {
-    if (rb_equal(i, arg[0])) {
-	arg[1]++;
+    VALUE *memo = (VALUE*)memop;
+
+    if (rb_equal(i, memo[1])) {
+	memo[0]++;
     }
     return Qnil;
 }
 
+static VALUE count_iter_i _((VALUE, VALUE));
 static VALUE
-count_iter_i(i, n)
-     VALUE i;
-     long *n;
+count_iter_i(i, memop)
+    VALUE i, memop;
 {
+    VALUE *memo = (VALUE*)memop;
+
     if (RTEST(rb_yield(i))) {
-	(*n)++;
+	memo[0]++;
     }
     return Qnil;
 }
 
+static VALUE count_all_i _((VALUE, VALUE));
+static VALUE
+count_all_i(i, memop)
+    VALUE i, memop;
+{
+    VALUE *memo = (VALUE*)memop;
+
+    memo[0]++;
+    return Qnil;
+}
+
 /*
  *  call-seq:
+ *     enum.count                   =&gt; int
  *     enum.count(item)             =&gt; int
  *     enum.count {| obj | block }  =&gt; int
  *
- *  Returns the number of items in &lt;i&gt;enum&lt;/i&gt; for which equals to &lt;i&gt;item&lt;/i&gt;.
- *  If a block is given, counts the number of elements yielding a true value.
+ *  Returns the number of items in &lt;i&gt;enum&lt;/i&gt;, where #size is called
+ *  if it responds to it, otherwise the items are counted through
+ *  enumeration.  If an argument is given, counts the number of items
+ *  in &lt;i&gt;enum&lt;/i&gt;, for which equals to &lt;i&gt;item&lt;/i&gt;.  If a block is
+ *  given, counts the number of elements yielding a true value.
  *
  *     ary = [1, 2, 4, 2]
+ *     ary.count             # =&gt; 4
  *     ary.count(2)          # =&gt; 2
  *     ary.count{|x|x%2==0}  # =&gt; 3
  *
@@ -155,31 +175,31 @@ enum_count(argc, argv, obj)
     VALUE *argv;
     VALUE obj;
 {
-    if (argc == 1) {
-	VALUE item, args[2];
+    VALUE memo[2];	/* [count, condition value] */
+    rb_block_call_func *func;
 
+    if (argc == 0) {
 	if (rb_block_given_p()) {
-	    rb_warn(&quot;given block not used&quot;);
+	    func = count_iter_i;
+	}
+	else {
+	    if (rb_respond_to(obj, id_size)) {
+		return rb_funcall(obj, id_size, 0, 0);
+	    }
+	    func = count_all_i;
 	}
-	rb_scan_args(argc, argv, &quot;1&quot;, &amp;item);
-	args[0] = item;
-	args[1] = 0;
-	rb_block_call(obj, id_each, 0, 0, count_i, (VALUE)&amp;args);
-	return INT2NUM(args[1]);
-    }
-    else if (argc == 0) {
-	long n;
-
-	RETURN_ENUMERATOR(obj, 0, 0);
-	n = 0;
-	rb_block_call(obj, id_each, 0, 0, count_iter_i, (VALUE)&amp;n);
-	return INT2NUM(n);
     }
     else {
-        VALUE v;
-	rb_scan_args(argc, argv, &quot;1&quot;, &amp;v);
-        return Qnil; /* not reached */
+	rb_scan_args(argc, argv, &quot;1&quot;, &amp;memo[1]);
+	if (rb_block_given_p()) {
+	    rb_warn(&quot;given block not used&quot;);
+	}
+        func = count_i;
     }
+
+    memo[0] = 0;
+    rb_block_call(obj, id_each, 0, 0, func, (VALUE)&amp;memo);
+    return INT2NUM(memo[0]);
 }
 
 static VALUE
@@ -1866,5 +1886,6 @@ Init_Enumerable()
     id_eqq  = rb_intern(&quot;===&quot;);
     id_each = rb_intern(&quot;each&quot;);
     id_cmp  = rb_intern(&quot;&lt;=&gt;&quot;);
+    id_size = rb_intern(&quot;size&quot;);
 }
 </diff>
      <filename>enum.c</filename>
    </modified>
    <modified>
      <diff>@@ -29,7 +29,7 @@
 #define EXIT_SUCCESS 0
 #endif
 
-extern const char ruby_version[], ruby_release_date[], ruby_platform[];
+extern const char *ruby_description;
 
 int ruby_nerrs;
 
@@ -208,8 +208,7 @@ rb_bug(fmt, va_alist)
 	va_init_list(args, fmt);
 	vfprintf(out, fmt, args);
 	va_end(args);
-	fprintf(out, &quot;\nruby %s (%s) [%s]\n\n&quot;,
-		ruby_version, ruby_release_date, ruby_platform);
+	fprintf(out, &quot;\n%s\n\n&quot;, ruby_description);
     }
     abort();
 }
@@ -258,7 +257,7 @@ rb_check_type(x, t)
     if (TYPE(x) != t) {
 	while (type-&gt;type &gt;= 0) {
 	    if (type-&gt;type == t) {
-		char *etype;
+		const char *etype;
 
 		if (NIL_P(x)) {
 		    etype = &quot;nil&quot;;
@@ -499,7 +498,7 @@ rb_check_backtrace(bt)
     VALUE bt;
 {
     long i;
-    static char *err = &quot;backtrace must be Array of String&quot;;
+    static const char err[] = &quot;backtrace must be Array of String&quot;;
 
     if (!NIL_P(bt)) {
 	int t = TYPE(bt);
@@ -728,7 +727,7 @@ name_err_mesg_to_str(obj)
     mesg = ptr[0];
     if (NIL_P(mesg)) return Qnil;
     else {
-	char *desc = 0;
+	const char *desc = 0;
 	VALUE d = 0, args[3];
 
 	obj = ptr[1];
@@ -882,7 +881,7 @@ syserr_initialize(argc, argv, self)
 #if !defined(_WIN32) &amp;&amp; !defined(__VMS)
     char *strerror();
 #endif
-    char *err;
+    const char *err;
     VALUE mesg, error;
     VALUE klass = rb_obj_class(self);
 </diff>
      <filename>error.c</filename>
    </modified>
    <modified>
      <diff>@@ -1103,8 +1103,8 @@ static void scope_dup _((struct SCOPE *));
 } while (0)
 
 static VALUE rb_eval _((VALUE,NODE*));
-static VALUE eval _((VALUE,VALUE,VALUE,char*,int));
-static NODE *compile _((VALUE, char*, int));
+static VALUE eval _((VALUE,VALUE,VALUE,const char*,int));
+static NODE *compile _((VALUE, const char*, int));
 
 static VALUE rb_yield_0 _((VALUE, VALUE, VALUE, int, int));
 
@@ -1227,7 +1227,7 @@ error_print()
 {
     VALUE errat = Qnil;		/* OK */
     volatile VALUE eclass, e;
-    char *einfo;
+    const char *einfo;
     long elen;
 
     if (NIL_P(ruby_errinfo)) return;
@@ -2032,7 +2032,7 @@ void
 rb_frozen_class_p(klass)
     VALUE klass;
 {
-    char *desc = &quot;something(?!)&quot;;
+    const char *desc = &quot;something(?!)&quot;;
 
     if (OBJ_FROZEN(klass)) {
 	if (FL_TEST(klass, FL_SINGLETON))
@@ -2070,7 +2070,7 @@ rb_undef(klass, id)
     }
     body = search_method(klass, id, &amp;origin);
     if (!body || !body-&gt;nd_body) {
-	char *s0 = &quot; class&quot;;
+	const char *s0 = &quot; class&quot;;
 	VALUE c = klass;
 
 	if (FL_TEST(c, FL_SINGLETON)) {
@@ -2322,9 +2322,9 @@ rb_copy_node_scope(node, rval)
 
 #define MATCH_DATA *rb_svar(node-&gt;nd_cnt)
 
-static char* is_defined _((VALUE, NODE*, char*));
+static const char* is_defined _((VALUE, NODE*, char*));
 
-static char*
+static const char*
 arg_defined(self, node, buf, type)
     VALUE self;
     NODE *node;
@@ -2351,7 +2351,7 @@ arg_defined(self, node, buf, type)
     return type;
 }
 
-static char*
+static const char*
 is_defined(self, node, buf)
     VALUE self;
     NODE *node;			/* OK */
@@ -2671,27 +2671,27 @@ set_trace_func(obj, trace)
     return trace;
 }
 
-static char *
+static const char *
 get_event_name(rb_event_t event)
 {
     switch (event) {
-    case RUBY_EVENT_LINE:
+      case RUBY_EVENT_LINE:
 	return &quot;line&quot;;
-    case RUBY_EVENT_CLASS:
+      case RUBY_EVENT_CLASS:
 	return &quot;class&quot;;
-    case RUBY_EVENT_END:
+      case RUBY_EVENT_END:
 	return &quot;end&quot;;
-    case RUBY_EVENT_CALL:
+      case RUBY_EVENT_CALL:
 	return &quot;call&quot;;
-    case RUBY_EVENT_RETURN:
+      case RUBY_EVENT_RETURN:
 	return &quot;return&quot;;
-    case RUBY_EVENT_C_CALL:
+      case RUBY_EVENT_C_CALL:
 	return &quot;c-call&quot;;
-    case RUBY_EVENT_C_RETURN:
+      case RUBY_EVENT_C_RETURN:
 	return &quot;c-return&quot;;
-    case RUBY_EVENT_RAISE:
+      case RUBY_EVENT_RAISE:
 	return &quot;raise&quot;;
-    default:
+      default:
 	return &quot;unknown&quot;;
     }
 }
@@ -2708,7 +2708,7 @@ call_trace_func(event, node, self, id, klass)
     struct FRAME *prev;
     NODE *node_save;
     VALUE srcfile;
-    char *event_name;
+    const char *event_name;
 
     if (!trace_func) return;
     if (tracing) return;
@@ -4136,7 +4136,7 @@ rb_eval(self, n)
       case NODE_DEFINED:
 	{
 	    char buf[20];
-	    char *desc = is_defined(self, node-&gt;nd_head, buf);
+	    const char *desc = is_defined(self, node-&gt;nd_head, buf);
 
 	    if (desc) result = rb_str_new2(desc);
 	    else result = Qnil;
@@ -4804,7 +4804,7 @@ proc_jump_error(state, result)
     VALUE result;
 {
     char mesg[32];
-    char *statement;
+    const char *statement;
 
     switch (state) {
       case TAG_BREAK:
@@ -5638,7 +5638,7 @@ rb_method_missing(argc, argv, obj)
 {
     ID id;
     VALUE exc = rb_eNoMethodError;
-    char *format = 0;
+    const char *format = 0;
     NODE *cnode = ruby_current_node;
 
     if (argc == 0 || !SYMBOL_P(argv[0])) {
@@ -6448,7 +6448,7 @@ rb_frame_this_func()
 static NODE*
 compile(src, file, line)
     VALUE src;
-    char *file;
+    const char *file;
     int line;
 {
     NODE *node;
@@ -6468,7 +6468,7 @@ compile(src, file, line)
 static VALUE
 eval(self, src, scope, file, line)
     VALUE self, src, scope;
-    char *file;
+    const char *file;
     int line;
 {
     struct BLOCK *data = NULL;
@@ -6629,7 +6629,7 @@ rb_f_eval(argc, argv, self)
     VALUE self;
 {
     VALUE src, scope, vfile, vline;
-    char *file = &quot;(eval)&quot;;
+    const char *file = &quot;(eval)&quot;;
     int line = 1;
 
     rb_scan_args(argc, argv, &quot;13&quot;, &amp;src, &amp;scope, &amp;vfile, &amp;vline);
@@ -6783,7 +6783,7 @@ specific_eval(argc, argv, klass, self)
 	return yield_under(klass, self, Qundef);
     }
     else {
-	char *file = &quot;(eval)&quot;;
+	const char *file = &quot;(eval)&quot;;
 	int   line = 1;
 
 	if (argc == 0) {
@@ -9014,7 +9014,7 @@ proc_to_s(self)
 {
     struct BLOCK *data;
     NODE *node;
-    char *cname = rb_obj_classname(self);
+    const char *cname = rb_obj_classname(self);
     const int w = (sizeof(VALUE) * CHAR_BIT) / 4;
     long len = strlen(cname)+6+w; /* 6:tags 16:addr */
     VALUE str;
@@ -9748,7 +9748,7 @@ method_inspect(method)
     struct METHOD *data;
     VALUE str;
     const char *s;
-    char *sharp = &quot;#&quot;;
+    const char *sharp = &quot;#&quot;;
 
     Data_Get_Struct(method, struct METHOD, data);
     str = rb_str_buf_new2(&quot;#&lt;&quot;);
@@ -12923,7 +12923,7 @@ static VALUE
 rb_thread_inspect(thread)
     VALUE thread;
 {
-    char *cname = rb_obj_classname(thread);
+    const char *cname = rb_obj_classname(thread);
     rb_thread_t th = rb_thread_check(thread);
     const char *status = thread_status_name(th-&gt;status);
     VALUE str;</diff>
      <filename>eval.c</filename>
    </modified>
    <modified>
      <diff>@@ -515,7 +515,7 @@ BIGNUM_SELF_SHIFT(rshift);
 	    bottom = (odd == Qtrue) ? 1 : 0;			\
 	    /* FALLTHROUGH */					\
 	case 2:							\
-	    top = FIX2INT(fill);				\
+	    top = NUM2INT(fill);				\
 	}							\
 	b = NUM2INT(bits);					\
 	if (!(result = BN_new())) {				\</diff>
      <filename>ext/openssl/ossl_bn.c</filename>
    </modified>
    <modified>
      <diff>@@ -116,9 +116,9 @@ ossl_dh_s_generate(int argc, VALUE *argv, VALUE klass)
     VALUE size, gen, obj;
 	
     if (rb_scan_args(argc, argv, &quot;11&quot;, &amp;size, &amp;gen) == 2) {
-	g = FIX2INT(gen);
+	g = NUM2INT(gen);
     }
-    dh = dh_generate(FIX2INT(size), g);
+    dh = dh_generate(NUM2INT(size), g);
     obj = dh_instance(klass, dh);
     if (obj == Qfalse) {
 	DH_free(dh);
@@ -158,7 +158,7 @@ ossl_dh_initialize(int argc, VALUE *argv, VALUE self)
     }
     else if (FIXNUM_P(arg)) {
 	if (!NIL_P(gen)) {
-	    g = FIX2INT(gen);
+	    g = NUM2INT(gen);
 	}
 	if (!(dh = dh_generate(FIX2INT(arg), g))) {
 	    ossl_raise(eDHError, NULL);</diff>
      <filename>ext/openssl/ossl_pkey_dh.c</filename>
    </modified>
    <modified>
      <diff>@@ -110,7 +110,7 @@ dsa_generate(int size)
 static VALUE
 ossl_dsa_s_generate(VALUE klass, VALUE size)
 {
-    DSA *dsa = dsa_generate(FIX2INT(size)); /* err handled by dsa_instance */
+    DSA *dsa = dsa_generate(NUM2INT(size)); /* err handled by dsa_instance */
     VALUE obj = dsa_instance(klass, dsa);
 
     if (obj == Qfalse) {</diff>
      <filename>ext/openssl/ossl_pkey_dsa.c</filename>
    </modified>
    <modified>
      <diff>@@ -96,9 +96,10 @@ static VALUE
 ossl_rand_bytes(VALUE self, VALUE len)
 {
     VALUE str;
-	
-    str = rb_str_new(0, FIX2INT(len));
-    if (!RAND_bytes(RSTRING_PTR(str), FIX2INT(len))) {
+    int n = NUM2INT(len);
+
+    str = rb_str_new(0, n);
+    if (!RAND_bytes(RSTRING_PTR(str), n)) {
 	ossl_raise(eRandomError, NULL);
     }
 
@@ -114,9 +115,10 @@ static VALUE
 ossl_rand_pseudo_bytes(VALUE self, VALUE len)
 {
     VALUE str;
+    int n = NUM2INT(len);
 
-    str = rb_str_new(0, FIX2INT(len));
-    if (!RAND_pseudo_bytes(RSTRING_PTR(str), FIX2INT(len))) {
+    str = rb_str_new(0, n);
+    if (!RAND_pseudo_bytes(RSTRING_PTR(str), n)) {
 	ossl_raise(eRandomError, NULL);
     }
 
@@ -147,9 +149,11 @@ ossl_rand_egd(VALUE self, VALUE filename)
 static VALUE
 ossl_rand_egd_bytes(VALUE self, VALUE filename, VALUE len)
 {
+    long n = NUM2INT(len);
+
     SafeStringValue(filename);
 
-    if (!RAND_egd_bytes(RSTRING_PTR(filename), FIX2INT(len))) {
+    if (!RAND_egd_bytes(RSTRING_PTR(filename), n)) {
 	ossl_raise(eRandomError, NULL);
     }
     return Qtrue;</diff>
      <filename>ext/openssl/ossl_rand.c</filename>
    </modified>
    <modified>
      <diff>@@ -458,7 +458,7 @@ ossl_x509stctx_set_error(VALUE self, VALUE err)
     X509_STORE_CTX *ctx;
 
     GetX509StCtx(self, ctx);
-    X509_STORE_CTX_set_error(ctx, FIX2INT(err));
+    X509_STORE_CTX_set_error(ctx, NUM2INT(err));
 
     return err;
 }</diff>
      <filename>ext/openssl/ossl_x509store.c</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,10 @@
-if nul = $:.find_index {|path| /\A(?:\.\/)*-\z/ =~ path}
+nul = nil
+$:.each_with_index {|path, index|
+  if /\A(?:\.\/)*-\z/ =~ path
+    nul = index
+    break
+  end
+}
+if nul
   $:[nul..-1] = [&quot;.&quot;]
 end</diff>
      <filename>ext/purelib.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,11 +18,12 @@ $toolbar_demo = TkToplevel.new {|w|
 base_frame = Ttk::Frame.new($toolbar_demo).pack(:fill=&gt;:both, :expand=&gt;true)
 
 if Tk.windowingsystem != 'aqua'
-  msg = Ttk::Label.new(base_frame, :wraplength=&gt;'4i', :text=&gt;&lt;&lt;EOL)
+  msg = Ttk::Label.new(base_frame, :wraplength=&gt;'4i', 
+                       :text=&gt;Tk::UTF8_String.new(&lt;&lt;EOL))
 This is a demonstration of how to do \
 a toolbar that is styled correctly \
 and which can be torn off (this feature reqrires Tcl/Tk8.5). \
-The buttons are configured to be \u201Ctoolbar style\u201D buttons by \
+The buttons are configured to be \\u201Ctoolbar style\\u201D buttons by \
 telling them that they are to use the Toolbutton style. At the left \
 end of the toolbar is a simple marker that the cursor changes to a \
 movement icon over; drag that away from the toolbar to tear off the \
@@ -31,10 +32,11 @@ toolbar is no longer needed, just close it like any normal toplevel \
 and it will reattach to the window it was torn off from.
 EOL
 else
-  msg = Ttk::Label.new(base_frame, :wraplength=&gt;'4i', :text=&gt;&lt;&lt;EOL)
+  msg = Ttk::Label.new(base_frame, :wraplength=&gt;'4i', 
+                       :text=&gt;Tk::UTF8_String.new(&lt;&lt;EOL))
 This is a demonstration of how to do \
 a toolbar that is styled correctly. The buttons are configured to \
-be \u201Ctoolbar style\u201D buttons by telling them that they are \
+be \\u201Ctoolbar style\\u201D buttons by telling them that they are \
 to use the Toolbutton style.
 EOL
 end</diff>
      <filename>ext/tk/sample/demos-en/toolbar.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,11 +18,11 @@ $ttkprogress_demo = TkToplevel.new {|w|
 base_frame = TkFrame.new($ttkprogress_demo).pack(:fill=&gt;:both, :expand=&gt;true)
 
 Ttk::Label.new(base_frame, :font=&gt;$font, :wraplength=&gt;'4i', :justify=&gt;:left, 
-               :text=&gt;&lt;&lt;EOL).pack(:side=&gt;:top, :fill=&gt;:x)
+               :text=&gt;Tk::UTF8_String.new(&lt;&lt;EOL)).pack(:side=&gt;:top, :fill=&gt;:x)
 Below are two progress bars. \
-The top one is a \u201Cdeterminate\u201D progress bar, \
+The top one is a \\u201Cdeterminate\\u201D progress bar, \
 which is used for showing how far through a defined task the program has got. \
-The bottom one is an \u201Cindeterminate\u201D progress bar, \
+The bottom one is an \\u201Cindeterminate\\u201D progress bar, \
 which is used to show that the program is busy \
 but does not know how long for. Both are run here in self-animated mode, \
 which can be turned on and off using the buttons underneath.</diff>
      <filename>ext/tk/sample/demos-en/ttkprogress.rb</filename>
    </modified>
    <modified>
      <diff>@@ -775,6 +775,12 @@ def showCode1(demo)
     TkLabel.new(f,'text'=&gt;'  pos:').pack('side'=&gt;'left')
     posnum =TkLabel.new(f,'text'=&gt;'').pack('side'=&gt;'left')
 
+    $set_linenum = proc{|w|
+      line, pos = w.index('insert').split('.')
+      linenum.text = line
+      posnum.text  = pos
+    }
+
     f.pack('side'=&gt;'bottom', 'expand'=&gt;'true', 'fill'=&gt;'x')
 
     if $tk_version =~ /^4\.[01]/
@@ -820,10 +826,21 @@ def showCode1(demo)
         TkGrid.columnconfigure(f, 0, 'weight'=&gt;1, 'minsize'=&gt;0)
       }
     end
+
+    btag = TkBindTag.new
+
+    btag.bind('Key', $set_linenum, '%W')
+    btag.bind('Button', $set_linenum, '%W')
+
+    btags = $code_text.bindtags
+    btags.insert(btags.index($code_text.class) + 1, btag)
+    $code_text.bindtags = btags
+
   else
     $code_window.deiconify
     $code_window.raise
   end
+
   $code_window.title(&quot;Demo code: #{file}&quot;)
   $code_window.iconname(file)
 #  fid = open(file, 'r')
@@ -835,22 +852,7 @@ def showCode1(demo)
   #$code_text.set_insert('1.0')
   TkTextMarkInsert.new($code_text,'1.0')
 
-  btag = TkBindTag.new
-
-  set_linenum = proc{|w|
-    line, pos = w.index('insert').split('.')
-    linenum.text = line
-    posnum.text  = pos
-  }
-
-  btag.bind('Key', set_linenum, '%W')
-  btag.bind('Button', set_linenum, '%W')
-
-  btags = $code_text.bindtags
-  btags.insert(btags.index($code_text.class) + 1, btag)
-  $code_text.bindtags = btags
-
-  set_linenum.call($code_text)
+  $set_linenum.call($code_text)
 
   fid.close
 end
@@ -879,6 +881,12 @@ def showCode2(demo)
     TkLabel.new(lf, :text=&gt;'  pos:').pack(:side=&gt;:left)
     posnum =TkLabel.new(lf, :text=&gt;'').pack(:side=&gt;:left)
 
+    $set_linenum = proc{|w|
+      line, pos = w.index('insert').split('.')
+      linenum.text = line
+      posnum.text  = pos
+    }
+
     b_dis = TkButton.new(bf, :text=&gt;'Dismiss', :default=&gt;:active, 
                          :command=&gt;proc{
                            $code_window.destroy
@@ -909,6 +917,17 @@ def showCode2(demo)
     $code_window.bindinfo('Return').each{|cmd, arg|
       $code_window.bind_append('Escape', cmd, arg)
     }
+
+    btag = TkBindTag.new
+
+    btag.bind('Key', $set_linenum, '%W')
+    btag.bind('Button', $set_linenum, '%W')
+    btag.bind('Configure', $set_linenum, '%W')
+
+    btags = $code_text.bindtags
+    btags.insert(btags.index($code_text.class) + 1, btag)
+    $code_text.bindtags = btags
+
   else
     $code_window.deiconify
     $code_window.raise
@@ -921,22 +940,7 @@ def showCode2(demo)
   $code_text.insert('1.0', fid.read)
   TkTextMarkInsert.new($code_text,'1.0')
 
-  btag = TkBindTag.new
-
-  set_linenum = proc{|w|
-    line, pos = w.index('insert').split('.')
-    linenum.text = line
-    posnum.text  = pos
-  }
-
-  btag.bind('Key', set_linenum, '%W')
-  btag.bind('Button', set_linenum, '%W')
-
-  btags = $code_text.bindtags
-  btags.insert(btags.index($code_text.class) + 1, btag)
-  $code_text.bindtags = btags
-
-  set_linenum.call($code_text)
+  $set_linenum.call($code_text)
 
   fid.close
 end</diff>
      <filename>ext/tk/sample/demos-en/widget</filename>
    </modified>
    <modified>
      <diff>@@ -814,6 +814,12 @@ def showCode1(demo)
     TkLabel.new(f,'text'=&gt;'  pos:').pack('side'=&gt;'left')
     posnum =TkLabel.new(f,'text'=&gt;'').pack('side'=&gt;'left')
 
+    $set_linenum = proc{|w|
+      line, pos = w.index('insert').split('.')
+      linenum.text = line
+      posnum.text  = pos
+    }
+
     f.pack('side'=&gt;'bottom', 'expand'=&gt;'true', 'fill'=&gt;'x')
 
     if $tk_version =~ /^4\.[01]/
@@ -858,10 +864,21 @@ def showCode1(demo)
         TkGrid.columnconfigure(f, 0, 'weight'=&gt;1, 'minsize'=&gt;0)
       }
     end
+
+    btag = TkBindTag.new
+
+    btag.bind('Key', $set_linenum, '%W')
+    btag.bind('Button', $set_linenum, '%W')
+
+    btags = $code_text.bindtags
+    btags.insert(btags.index($code_text.class) + 1, btag)
+    $code_text.bindtags = btags
+
   else
     $code_window.deiconify
     $code_window.raise
   end
+
   $code_window.title(&quot;Demo code: #{file}&quot;)
   $code_window.iconname(file)
 #  fid = open(file, 'r')
@@ -873,22 +890,7 @@ def showCode1(demo)
   #$code_text.set_insert('1.0')
   TkTextMarkInsert.new($code_text,'1.0')
 
-  btag = TkBindTag.new
-
-  set_linenum = proc{|w|
-    line, pos = w.index('insert').split('.')
-    linenum.text = line
-    posnum.text  = pos
-  }
-
-  btag.bind('Key', set_linenum, '%W')
-  btag.bind('Button', set_linenum, '%W')
-
-  btags = $code_text.bindtags
-  btags.insert(btags.index($code_text.class) + 1, btag)
-  $code_text.bindtags = btags
-
-  set_linenum.call($code_text)
+  $set_linenum.call($code_text)
 
   fid.close
 end
@@ -917,6 +919,12 @@ def showCode2(demo)
     TkLabel.new(lf, :text=&gt;'  pos:').pack(:side=&gt;:left)
     posnum =TkLabel.new(lf, :text=&gt;'').pack(:side=&gt;:left)
 
+    $set_linenum = proc{|w|
+      line, pos = w.index('insert').split('.')
+      linenum.text = line
+      posnum.text  = pos
+    }
+
     #b_dis = TkButton.new(bf, :text=&gt;'&#206;&#187;&#178;&#242;', :default=&gt;:active, 
     b_dis = TkButton.new(bf, :text=&gt;'&#202;&#196;&#164;&#184;&#164;&#235;', :default=&gt;:active, 
                          :command=&gt;proc{
@@ -948,6 +956,16 @@ def showCode2(demo)
     $code_window.bindinfo('Return').each{|cmd, arg|
       $code_window.bind_append('Escape', cmd, arg)
     }
+
+    btag = TkBindTag.new
+
+    btag.bind('Key', $set_linenum, '%W')
+    btag.bind('Button', $set_linenum, '%W')
+
+    btags = $code_text.bindtags
+    btags.insert(btags.index($code_text.class) + 1, btag)
+    $code_text.bindtags = btags
+
   else
     $code_window.deiconify
     $code_window.raise
@@ -960,22 +978,7 @@ def showCode2(demo)
   $code_text.insert('1.0', fid.read)
   TkTextMarkInsert.new($code_text,'1.0')
 
-  btag = TkBindTag.new
-
-  set_linenum = proc{|w|
-    line, pos = w.index('insert').split('.')
-    linenum.text = line
-    posnum.text  = pos
-  }
-
-  btag.bind('Key', set_linenum, '%W')
-  btag.bind('Button', set_linenum, '%W')
-
-  btags = $code_text.bindtags
-  btags.insert(btags.index($code_text.class) + 1, btag)
-  $code_text.bindtags = btags
-
-  set_linenum.call($code_text)
+  $set_linenum.call($code_text)
 
   fid.close
 end</diff>
      <filename>ext/tk/sample/demos-jp/widget</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ require 'rbconfig'
 dir_config 'zlib'
 
 
-if %w'z libz zlib zdll'.find {|z| have_library(z, 'deflateReset')} and
+if %w'z libz zlib1 zlib zdll'.find {|z| have_library(z, 'deflateReset')} and
     have_header('zlib.h') then
 
   defines = []
@@ -22,7 +22,7 @@ if %w'z libz zlib zdll'.find {|z| have_library(z, 'deflateReset')} and
       os_code = 'AMIGA'
     when /\Aos2[\-_]emx\z/ then
       os_code = 'OS2'
-    when 'mswin32', 'mingw32', 'bccwin32' then
+    when /mswin|mingw|bccwin/ then
       # NOTE: cygwin should be regarded as Unix.
       os_code = 'WIN32'
     else</diff>
      <filename>ext/zlib/extconf.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1495,7 +1495,7 @@ static VALUE
 rb_file_ftype(st)
     struct stat *st;
 {
-    char *t;
+    const char *t;
 
     if (S_ISREG(st-&gt;st_mode)) {
 	t = &quot;file&quot;;</diff>
      <filename>file.c</filename>
    </modified>
    <modified>
      <diff>@@ -213,6 +213,8 @@ rubylibdir = CONFIG[&quot;rubylibdir&quot;]
 archlibdir = CONFIG[&quot;archdir&quot;]
 sitelibdir = CONFIG[&quot;sitelibdir&quot;]
 sitearchlibdir = CONFIG[&quot;sitearchdir&quot;]
+vendorlibdir = CONFIG[&quot;vendorlibdir&quot;]
+vendorarchlibdir = CONFIG[&quot;vendorarchdir&quot;]
 mandir = File.join(CONFIG[&quot;mandir&quot;], &quot;man&quot;)
 configure_args = Shellwords.shellwords(CONFIG[&quot;configure_args&quot;])
 enable_shared = CONFIG[&quot;ENABLE_SHARED&quot;] == 'yes'
@@ -253,7 +255,7 @@ if $extout
   extout = &quot;#$extout&quot;
   install?(:ext, :arch, :'ext-arch') do
     puts &quot;installing extension objects&quot;
-    makedirs [archlibdir, sitearchlibdir]
+    makedirs [archlibdir, sitearchlibdir, vendorarchlibdir]
     if noinst = CONFIG[&quot;no_install_files&quot;] and noinst.empty?
       noinst = nil
     end
@@ -261,7 +263,7 @@ if $extout
   end
   install?(:ext, :comm, :'ext-comm') do
     puts &quot;installing extension scripts&quot;
-    makedirs [rubylibdir, sitelibdir]
+    makedirs [rubylibdir, sitelibdir, vendorlibdir]
     install_recursive(&quot;#{extout}/common&quot;, rubylibdir, :mode =&gt; $data_mode)
   end
 end</diff>
      <filename>instruby.rb</filename>
    </modified>
    <modified>
      <diff>@@ -467,7 +467,7 @@ VALUE rb_struct_alloc _((VALUE, VALUE));
 VALUE rb_struct_aref _((VALUE, VALUE));
 VALUE rb_struct_aset _((VALUE, VALUE, VALUE));
 VALUE rb_struct_getmember _((VALUE, ID));
-VALUE rb_struct_iv_get _((VALUE, char*));
+VALUE rb_struct_iv_get _((VALUE, const char*));
 VALUE rb_struct_s_members _((VALUE));
 VALUE rb_struct_members _((VALUE));
 /* time.c */</diff>
      <filename>intern.h</filename>
    </modified>
    <modified>
      <diff>@@ -1000,7 +1000,8 @@ rb_io_inspect(obj)
     VALUE obj;
 {
     rb_io_t *fptr;
-    char *buf, *cname, *st = &quot;&quot;;
+    char *buf;
+    const char *cname, *st = &quot;&quot;;
     long len;
 
     fptr = RFILE(rb_io_taint_check(obj))-&gt;fptr;
@@ -1703,7 +1704,7 @@ rb_io_getline(rs, io)
     }
     else {
 	int c, newline;
-	char *rsptr;
+	const char *rsptr;
 	long rslen;
 	int rspara = 0;
 
@@ -2705,7 +2706,7 @@ rb_io_binmode(io)
     return io;
 }
 
-char*
+const char*
 rb_io_flags_mode(flags)
     int flags;
 {
@@ -2858,7 +2859,7 @@ rb_io_mode_modenum(mode)
 
 #define MODENUM_MAX 4
 
-static char*
+static const char*
 rb_io_modenum_mode(flags)
     int flags;
 {
@@ -3005,7 +3006,7 @@ rb_file_sysopen_internal(io, fname, flags, mode)
 {
     rb_io_t *fptr;
     int fd;
-    char *m;
+    const char *m;
 
     MakeOpenFile(io, fptr);
 
@@ -3123,12 +3124,12 @@ rb_io_unbuffered(fptr)
     rb_io_synchronized(fptr);
 }
 
-static VALUE pipe_open(VALUE pstr, char *pname, char *mode);
+static VALUE pipe_open(VALUE pstr, const char *pname, const char *mode);
 
 static VALUE
 pipe_open(pstr, pname, mode)
     VALUE pstr;
-    char *pname, *mode;
+    const char *pname, *mode;
 {
     int modef = rb_io_mode_flags(mode);
     rb_io_t *fptr;
@@ -3350,7 +3351,7 @@ rb_io_s_popen(argc, argv, klass)
     VALUE *argv;
     VALUE klass;
 {
-    char *mode;
+    const char *mode;
     VALUE pname, pmode, port;
 
     if (rb_scan_args(argc, argv, &quot;11&quot;, &amp;pname, &amp;pmode) == 1) {
@@ -3388,7 +3389,7 @@ rb_open_file(argc, argv, io)
     VALUE io;
 {
     VALUE fname, vmode, perm;
-    char *path, *mode;
+    const char *path, *mode;
     int flags, fmode;
 
     rb_scan_args(argc, argv, &quot;12&quot;, &amp;fname, &amp;vmode, &amp;perm);
@@ -3606,7 +3607,7 @@ rb_io_check_io(io)
     return rb_check_convert_type(io, T_FILE, &quot;IO&quot;, &quot;to_io&quot;);
 }
 
-static char*
+static const char*
 rb_io_mode_string(fptr)
     rb_io_t *fptr;
 {
@@ -3626,7 +3627,7 @@ io_reopen(io, nfile)
     VALUE io, nfile;
 {
     rb_io_t *fptr, *orig;
-    char *mode;
+    const char *mode;
     int fd, fd2;
     off_t pos = 0;
 
@@ -3742,7 +3743,7 @@ rb_io_reopen(argc, argv, file)
     VALUE file;
 {
     VALUE fname, nmode;
-    char *mode;
+    const char *mode;
     rb_io_t *fptr;
 
     rb_secure(4);
@@ -3805,7 +3806,7 @@ rb_io_init_copy(dest, io)
 {
     rb_io_t *fptr, *orig;
     int fd;
-    char *mode;
+    const char *mode;
 
     io = rb_io_get_io(io);
     if (dest == io) return dest;
@@ -4425,7 +4426,7 @@ rb_io_s_new(argc, argv, klass)
     VALUE klass;
 {
     if (rb_block_given_p()) {
-	char *cname = rb_class2name(klass);
+	const char *cname = rb_class2name(klass);
 
 	rb_warn(&quot;%s::new() does not take block; use %s::open() instead&quot;,
 		cname, cname);</diff>
      <filename>io.c</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-struct kwtable {char *name; int id[2]; enum lex_state state;};
+struct kwtable {const char *name; int id[2]; enum lex_state state;};
 %%
 __LINE__, {k__LINE__, k__LINE__}, EXPR_END
 __FILE__, {k__FILE__, k__FILE__}, EXPR_END</diff>
      <filename>keywords</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 /* C code produced by gperf version 2.7.2 */
 /* Command-line: gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' ./keywords  */
-struct kwtable {char *name; int id[2]; enum lex_state state;};
+struct kwtable {const char *name; int id[2]; enum lex_state state;};
 
 #define TOTAL_KEYWORDS 40
 #define MIN_WORD_LENGTH 2</diff>
      <filename>lex.c</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,9 @@ $archdir = CONFIG[&quot;archdir&quot;]
 $sitedir = CONFIG[&quot;sitedir&quot;]
 $sitelibdir = CONFIG[&quot;sitelibdir&quot;]
 $sitearchdir = CONFIG[&quot;sitearchdir&quot;]
+$vendordir = CONFIG[&quot;vendordir&quot;]
+$vendorlibdir = CONFIG[&quot;vendorlibdir&quot;]
+$vendorarchdir = CONFIG[&quot;vendorarchdir&quot;]
 
 $mswin = /mswin/ =~ RUBY_PLATFORM
 $bccwin = /bccwin/ =~ RUBY_PLATFORM
@@ -76,11 +79,14 @@ end
 INSTALL_DIRS = [
   [dir_re('commondir'), &quot;$(RUBYCOMMONDIR)&quot;],
   [dir_re('sitedir'), &quot;$(RUBYCOMMONDIR)&quot;],
+  [dir_re('vendordir'), &quot;$(RUBYCOMMONDIR)&quot;],
   [dir_re('rubylibdir'), &quot;$(RUBYLIBDIR)&quot;],
   [dir_re('archdir'), &quot;$(RUBYARCHDIR)&quot;],
   [dir_re('sitelibdir'), &quot;$(RUBYLIBDIR)&quot;],
+  [dir_re('vendorlibdir'), &quot;$(RUBYLIBDIR)&quot;],
   [dir_re('sitearchdir'), &quot;$(RUBYARCHDIR)&quot;],
   [dir_re('bindir'), &quot;$(BINDIR)&quot;],
+  [dir_re('vendorarchdir'), &quot;$(RUBYARCHDIR)&quot;],
 ]
 
 def install_dirs(target_prefix = nil)
@@ -100,6 +106,13 @@ def install_dirs(target_prefix = nil)
       ['RUBYLIBDIR',    '$(rubylibdir)$(target_prefix)'],
       ['RUBYARCHDIR',   '$(archdir)$(target_prefix)'],
     ]
+  elsif $configure_args.has_key?('--vendor')
+    dirs = [
+      ['BINDIR',        '$(bindir)'],
+      ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'],
+      ['RUBYLIBDIR',    '$(vendorlibdir)$(target_prefix)'],
+      ['RUBYARCHDIR',   '$(vendorarchdir)$(target_prefix)'],
+    ]
   else
     dirs = [
       ['BINDIR',        '$(bindir)'],</diff>
      <filename>lib/mkmf.rb</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,7 @@
 # *  Klass.new and Klass.allocate - as private
 #
 # Providing (or modifying) the class methods
-# *  Klass.inherited(sub_klass) and Klass.clone()  - 
+# *  Klass.inherited(sub_klass) and Klass.clone()  -
 #    to ensure that the Singleton pattern is properly
 #    inherited and cloned.
 #
@@ -70,10 +70,10 @@ module Singleton
   def dup
     raise TypeError, &quot;can't dup instance of singleton #{self.class}&quot;
   end
-  
-  private 
+
+  private
   #  default marshalling strategy
-  def _dump(depth=-1) 
+  def _dump(depth=-1)
     ''
   end
 end
@@ -104,7 +104,7 @@ class &lt;&lt; Singleton
         end
       end
     elsif  _instantiate?()
-      Thread.critical = false    
+      Thread.critical = false
     else
       @__instance__  = false
       Thread.critical = false
@@ -123,26 +123,26 @@ class &lt;&lt; Singleton
     end
     @__instance__
   end
-  
-  module SingletonClassMethods  
+
+  module SingletonClassMethods
     # properly clone the Singleton pattern - did you know
-    # that duping doesn't copy class methods?  
+    # that duping doesn't copy class methods?
     def clone
       Singleton.__init__(super)
     end
-    
+
+    def _load(str)
+      instance
+    end
+
     private
-    
-    #  ensure that the Singleton pattern is properly inherited   
+
+    #  ensure that the Singleton pattern is properly inherited
     def inherited(sub_klass)
       super
       Singleton.__init__(sub_klass)
     end
-    
-    def _load(str) 
-      instance 
-    end
-    
+
     # waiting-loop hook
     def _instantiate?()
       while false.equal?(@__instance__)
@@ -153,7 +153,7 @@ class &lt;&lt; Singleton
       @__instance__
     end
   end
-  
+
   def __init__(klass)
     klass.instance_eval { @__instance__ = nil }
     class &lt;&lt; klass
@@ -161,11 +161,11 @@ class &lt;&lt; Singleton
     end
     klass
   end
-  
+
   private
   #  extending an object with Singleton is a bad idea
   undef_method :extend_object
-  
+
   def append_features(mod)
     #  help out people counting on transitive mixins
     unless mod.instance_of?(Class)
@@ -173,7 +173,7 @@ class &lt;&lt; Singleton
     end
     super
   end
-  
+
   def included(klass)
     super
     klass.private_class_method  :new, :allocate
@@ -181,21 +181,21 @@ class &lt;&lt; Singleton
     Singleton.__init__(klass)
   end
 end
- 
+
 
 
 if __FILE__ == $0
 
 def num_of_instances(klass)
     &quot;#{ObjectSpace.each_object(klass){}} #{klass} instance(s)&quot;
-end 
+end
 
 # The basic and most important example.
 
 class SomeSingletonClass
   include Singleton
 end
-puts &quot;There are #{num_of_instances(SomeSingletonClass)}&quot; 
+puts &quot;There are #{num_of_instances(SomeSingletonClass)}&quot;
 
 a = SomeSingletonClass.instance
 b = SomeSingletonClass.instance # a and b are same object
@@ -218,23 +218,23 @@ class Ups &lt; SomeSingletonClass
     puts &quot;initialize called by thread ##{Thread.current[:i]}&quot;
   end
 end
-  
+
 class &lt;&lt; Ups
   def _instantiate?
     @enter.push Thread.current[:i]
     while false.equal?(@__instance__)
       Thread.critical = false
-      sleep 0.08 
+      sleep 0.08
       Thread.critical = true
     end
     @leave.push Thread.current[:i]
     @__instance__
   end
-  
+
   def __sleep
     sleep(rand(0.08))
   end
-  
+
   def new
     begin
       __sleep
@@ -246,12 +246,12 @@ class &lt;&lt; Ups
       end
     end
   end
-  
+
   def instantiate_all
     @enter = []
     @leave = []
-    1.upto(9) {|i|  
-      Thread.new { 
+    1.upto(9) {|i|
+      Thread.new {
         begin
           Thread.current[:i] = i
           __sleep
@@ -341,7 +341,7 @@ end
 class Down &lt; Middle; end
 
 puts  &quot;and basic \&quot;Down test\&quot; is #{Down.instance == Down.instance}\n
-Various exceptions&quot;  
+Various exceptions&quot;
 
 begin
   module AModule</diff>
      <filename>lib/singleton.rb</filename>
    </modified>
    <modified>
      <diff>@@ -85,6 +85,10 @@ module WEBrick
             res.status = $1.to_i
             header.delete('status')
           end
+          if header.has_key?('location')
+            # RFC 3875 6.2.3, 6.2.4
+            res.status = 302 unless (300...400) === res.status
+          end
           if header.has_key?('set-cookie')
             header['set-cookie'].each{|k|
               res.cookies &lt;&lt; Cookie.parse_set_cookie(k)</diff>
      <filename>lib/webrick/httpservlet/cgihandler.rb</filename>
    </modified>
    <modified>
      <diff>@@ -338,7 +338,7 @@ w_symbol(id, arg)
     ID id;
     struct dump_arg *arg;
 {
-    char *sym = rb_id2name(id);
+    const char *sym = rb_id2name(id);
     st_data_t num;
 
     if (st_lookup(arg-&gt;symbols, id, &amp;num)) {
@@ -381,7 +381,7 @@ w_extended(klass, arg, check)
     struct dump_arg *arg;
     int check;
 {
-    char *path;
+    const char *path;
 
     if (check &amp;&amp; FL_TEST(klass, FL_SINGLETON)) {
 	if (RCLASS(klass)-&gt;m_tbl-&gt;num_entries ||
@@ -511,7 +511,7 @@ w_object(obj, arg, limit)
 	if (OBJ_TAINTED(obj)) arg-&gt;taint = Qtrue;
 
 	st_add_direct(arg-&gt;data, obj, arg-&gt;data-&gt;num_entries);
-	if (rb_respond_to(obj, s_mdump)) {
+	if (rb_obj_respond_to(obj, s_mdump, Qtrue)) {
 	    volatile VALUE v;
 
 	    v = rb_funcall(obj, s_mdump, 0, 0);
@@ -521,7 +521,7 @@ w_object(obj, arg, limit)
 	    if (ivtbl) w_ivar(0, &amp;c_arg);
 	    return;
 	}
-	if (rb_respond_to(obj, s_dump)) {
+	if (rb_obj_respond_to(obj, s_dump, Qtrue)) {
 	    VALUE v;
 
 	    v = rb_funcall(obj, s_dump, 1, INT2NUM(limit));
@@ -664,7 +664,7 @@ w_object(obj, arg, limit)
 	    {
 		VALUE v;
 
-		if (!rb_respond_to(obj, s_dump_data)) {
+		if (!rb_obj_respond_to(obj, s_dump_data, Qtrue)) {
 		    rb_raise(rb_eTypeError,
 			     &quot;no marshal_dump is defined for class %s&quot;,
 			     rb_obj_classname(obj));
@@ -765,12 +765,12 @@ marshal_dump(argc, argv)
     arg.str = rb_str_buf_new(0);
     RBASIC(arg.str)-&gt;klass = 0;
     if (!NIL_P(port)) {
-	if (!rb_respond_to(port, s_write)) {
+	if (!rb_obj_respond_to(port, s_write, Qtrue)) {
 	  type_error:
 	    rb_raise(rb_eTypeError, &quot;instance of IO needed&quot;);
 	}
 	arg.dest = port;
-	if (rb_respond_to(port, s_binmode)) {
+	if (rb_obj_respond_to(port, s_binmode, Qtrue)) {
 	    rb_funcall2(port, s_binmode, 0, 0);
 	    reentrant_check(arg.str, s_dump_data);
 	}
@@ -948,7 +948,7 @@ r_symbol(arg)
     return r_symreal(arg);
 }
 
-static char*
+static const char*
 r_unique(arg)
     struct load_arg *arg;
 {
@@ -1245,7 +1245,7 @@ r_object0(arg, proc, ivp, extmod)
 	    VALUE klass = path2class(r_unique(arg));
 	    VALUE data;
 
-	    if (!rb_respond_to(klass, s_load)) {
+	    if (!rb_obj_respond_to(klass, s_load, Qtrue)) {
 		rb_raise(rb_eTypeError, &quot;class %s needs to have method `_load'&quot;,
 			 rb_class2name(klass));
 	    }
@@ -1272,7 +1272,7 @@ r_object0(arg, proc, ivp, extmod)
                     rb_extend_object(v, m);
                 }
             }
-	    if (!rb_respond_to(v, s_mload)) {
+	    if (!rb_obj_respond_to(v, s_mload, Qtrue)) {
 		rb_raise(rb_eTypeError, &quot;instance of %s needs to have method `marshal_load'&quot;,
 			 rb_class2name(klass));
 	    }
@@ -1299,7 +1299,7 @@ r_object0(arg, proc, ivp, extmod)
       case TYPE_DATA:
        {
            VALUE klass = path2class(r_unique(arg));
-           if (rb_respond_to(klass, s_alloc)) {
+           if (rb_obj_respond_to(klass, s_alloc, Qtrue)) {
 	       static int warn = Qtrue;
 	       if (warn) {
 		   rb_warn(&quot;define `allocate' instead of `_alloc'&quot;);
@@ -1315,7 +1315,7 @@ r_object0(arg, proc, ivp, extmod)
                rb_raise(rb_eArgError, &quot;dump format error&quot;);
            }
            r_entry(v, arg);
-           if (!rb_respond_to(v, s_load_data)) {
+           if (!rb_obj_respond_to(v, s_load_data, Qtrue)) {
                rb_raise(rb_eTypeError,
                         &quot;class %s needs to have instance method `_load_data'&quot;,
                         rb_class2name(klass));
@@ -1415,12 +1415,13 @@ marshal_load(argc, argv)
     struct load_arg arg;
 
     rb_scan_args(argc, argv, &quot;11&quot;, &amp;port, &amp;proc);
-    if (rb_respond_to(port, rb_intern(&quot;to_str&quot;))) {
+    v = rb_check_string_type(port);
+    if (!NIL_P(v)) {
 	arg.taint = OBJ_TAINTED(port); /* original taintedness */
-	StringValue(port);	       /* possible conversion */
+	port = v;
     }
-    else if (rb_respond_to(port, s_getc) &amp;&amp; rb_respond_to(port, s_read)) {
-	if (rb_respond_to(port, s_binmode)) {
+    else if (rb_obj_respond_to(port, s_getc, Qtrue) &amp;&amp; rb_obj_respond_to(port, s_read, Qtrue)) {
+	if (rb_obj_respond_to(port, s_binmode, Qtrue)) {
 	    rb_funcall2(port, s_binmode, 0, 0);
 	}
 	arg.taint = Qtrue;</diff>
      <filename>marshal.c</filename>
    </modified>
    <modified>
      <diff>@@ -144,6 +144,8 @@ print &lt;&lt;EOS
   CONFIG[&quot;archdir&quot;] = &quot;$(rubylibdir)/$(arch)&quot;
   CONFIG[&quot;sitelibdir&quot;] = &quot;$(sitedir)/$(ruby_version)&quot;
   CONFIG[&quot;sitearchdir&quot;] = &quot;$(sitelibdir)/$(sitearch)&quot;
+  CONFIG[&quot;vendorlibdir&quot;] = &quot;$(vendordir)/$(ruby_version)&quot;
+  CONFIG[&quot;vendorarchdir&quot;] = &quot;$(vendorlibdir)/$(sitearch)&quot;
   CONFIG[&quot;topdir&quot;] = File.dirname(__FILE__)
   MAKEFILE_CONFIG = {}
   CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}</diff>
      <filename>mkconfig.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2776,7 +2776,7 @@ static VALUE
 fix_id2name(fix)
     VALUE fix;
 {
-    char *name = rb_id2name(FIX2UINT(fix));
+    const char *name = rb_id2name(FIX2UINT(fix));
     if (name) return rb_str_new2(name);
     return Qnil;
 }</diff>
      <filename>numeric.c</filename>
    </modified>
    <modified>
      <diff>@@ -314,7 +314,7 @@ VALUE
 rb_any_to_s(obj)
     VALUE obj;
 {
-    char *cname = rb_obj_classname(obj);
+    const char *cname = rb_obj_classname(obj);
     size_t len;
     VALUE str;
 
@@ -341,7 +341,7 @@ inspect_i(id, value, str)
     VALUE str;
 {
     VALUE str2;
-    char *ivname;
+    const char *ivname;
 
     /* need not to show internal data */
     if (CLASS_OF(value) == 0) return ST_CONTINUE;
@@ -397,9 +397,8 @@ rb_obj_inspect(obj)
 	&amp;&amp; ROBJECT(obj)-&gt;iv_tbl-&gt;num_entries &gt; 0) {
 	VALUE str;
 	size_t len;
-	char *c;
+	const char *c = rb_obj_classname(obj);
 
-	c = rb_obj_classname(obj);
 	if (rb_inspecting_p(obj)) {
 	    len = strlen(c)+10+16+1;
 	    str = rb_str_new(0, len); /* 10:tags 16:addr 1:nul */
@@ -1161,7 +1160,7 @@ sym_inspect(sym)
     VALUE sym;
 {
     VALUE str;
-    char *name;
+    const char *name;
     ID id = SYM2ID(sym);
 
     name = rb_id2name(id);
@@ -2193,7 +2192,7 @@ convert_type(val, tname, method, raise)
     ID m;
 
     m = rb_intern(method);
-    if (!rb_respond_to(val, m)) {
+    if (!rb_obj_respond_to(val, m, Qtrue)) {
 	if (raise) {
 	    rb_raise(rb_eTypeError, &quot;can't convert %s into %s&quot;,
 		     NIL_P(val) ? &quot;nil&quot; :</diff>
      <filename>object.c</filename>
    </modified>
    <modified>
      <diff>@@ -366,7 +366,7 @@ num2i32(x)
 #endif
 static const char toofew[] = &quot;too few arguments&quot;;
 
-static void encodes _((VALUE,char*,long,int));
+static void encodes _((VALUE,const char*,long,int));
 static void qpencode _((VALUE,VALUE,long));
 
 static int uv_to_utf8 _((char*,unsigned long));
@@ -441,13 +441,13 @@ static VALUE
 pack_pack(ary, fmt)
     VALUE ary, fmt;
 {
-    static char *nul10 = &quot;\0\0\0\0\0\0\0\0\0\0&quot;;
-    static char *spc10 = &quot;          &quot;;
+    static const char nul10[] = &quot;\0\0\0\0\0\0\0\0\0\0&quot;;
+    static const char spc10[] = &quot;          &quot;;
     char *p, *pend;
     VALUE res, from, associates = 0;
     char type;
     long items, len, idx, plen;
-    char *ptr;
+    const char *ptr;
 #ifdef NATINT_PACK
     int natint;		/* native integer */
 #endif
@@ -1004,21 +1004,21 @@ pack_pack(ary, fmt)
     return res;
 }
 
-static char uu_table[] =
+static const char uu_table[] =
 &quot;`!\&quot;#$%&amp;'()*+,-./0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_&quot;;
-static char b64_table[] =
+static const char b64_table[] =
 &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&quot;;
 
 static void
 encodes(str, s, len, type)
     VALUE str;
-    char *s;
+    const char *s;
     long len;
     int type;
 {
     char *buff = ALLOCA_N(char, len * 4 / 3 + 6);
     long i = 0;
-    char *trans = type == 'u' ? uu_table : b64_table;
+    const char *trans = type == 'u' ? uu_table : b64_table;
     int padding;
 
     if (type == 'u') {
@@ -1304,7 +1304,7 @@ static VALUE
 pack_unpack(str, fmt)
     VALUE str, fmt;
 {
-    static char *hexdigits = &quot;0123456789abcdef0123456789ABCDEFx&quot;;
+    static const char hexdigits[] = &quot;0123456789abcdef0123456789ABCDEFx&quot;;
     char *s, *send;
     char *p, *pend;
     VALUE ary;
@@ -1338,7 +1338,7 @@ pack_unpack(str, fmt)
 	}
 	star = 0;
 	if (*p == '_' || *p == '!') {
-	    char *natstr = &quot;sSiIlL&quot;;
+	    static const char natstr[] = &quot;sSiIlL&quot;;
 
 	    if (strchr(natstr, type)) {
 #ifdef NATINT_PACK</diff>
      <filename>pack.c</filename>
    </modified>
    <modified>
      <diff>@@ -4524,7 +4524,7 @@ yylex()
 	    }
 
 	    if (lex_state != EXPR_DOT) {
-		struct kwtable *kw;
+		const struct kwtable *kw;
 
 		/* See if it is a reserved word.  */
 		kw = rb_reserved_word(tok(), toklen());
@@ -5178,7 +5178,7 @@ static void
 void_expr0(node)
     NODE *node;
 {
-    char *useless = 0;
+    const char *useless = 0;
 
     if (!RTEST(ruby_verbose)) return;
 
@@ -5945,7 +5945,7 @@ rb_parser_while_loop(chop, split)
 
 static struct {
     ID token;
-    char *name;
+    const char *name;
 } op_tbl[] = {
     {tDOT2,	&quot;..&quot;},
     {tDOT3,	&quot;...&quot;},
@@ -6193,11 +6193,11 @@ rb_intern(name)
     return id;
 }
 
-char *
+const char *
 rb_id2name(id)
     ID id;
 {
-    char *name;
+    const char *name;
     st_data_t data;
 
     if (id &lt; tLAST_TOKEN) {</diff>
      <filename>parse.y</filename>
    </modified>
    <modified>
      <diff>@@ -278,7 +278,7 @@ step_i(i, arg)
  *     rng.step(n=1) {| obj | block }    =&gt; rng
  *  
  *  Iterates over &lt;i&gt;rng&lt;/i&gt;, passing each &lt;i&gt;n&lt;/i&gt;th element to the block. If
- *  the range contains numbers or strings, natural ordering is used.  Otherwise
+ *  the range contains numbers, &lt;i&gt;n&lt;/i&gt; is added for each iteration.  Otherwise
  *  &lt;code&gt;step&lt;/code&gt; invokes &lt;code&gt;succ&lt;/code&gt; to iterate through range
  *  elements. The following code uses class &lt;code&gt;Xs&lt;/code&gt;, which is defined
  *  in the class-level documentation.
@@ -308,7 +308,6 @@ range_step(argc, argv, range)
     VALUE range;
 {
     VALUE b, e, step, tmp;
-    long unit;
 
     RETURN_ENUMERATOR(range, argc, argv);
 
@@ -316,49 +315,56 @@ range_step(argc, argv, range)
     e = rb_ivar_get(range, id_end);
     if (argc == 0) {
 	step = INT2FIX(1);
-	unit = 1;
     }
     else {
 	rb_scan_args(argc, argv, &quot;01&quot;, &amp;step);
-	tmp = rb_check_to_integer(step, &quot;to_int&quot;);
-	if (!NIL_P(tmp)) {
-	    step = tmp;
-	    unit = NUM2LONG(step);
+	if (!rb_obj_is_kind_of(step, rb_cNumeric)) {
+	    step = rb_to_int(step);
 	}
-	else {
-	    tmp = rb_funcall(rb_funcall(b, '+', 1, step), '-', 1, b);
-	    unit = rb_cmpint(tmp, step, INT2FIX(0));
+	if (rb_funcall(step, '&lt;', 1, INT2FIX(0))) {
+	    rb_raise(rb_eArgError, &quot;step can't be negative&quot;);
+	}
+	else if (!rb_funcall(step, '&gt;', 1, INT2FIX(0))) {
+	    rb_raise(rb_eArgError, &quot;step can't be 0&quot;);
 	}
     }
-    if (unit &lt; 0) {
-	rb_raise(rb_eArgError, &quot;step can't be negative&quot;);
-    }
-    if (unit == 0)
-	rb_raise(rb_eArgError, &quot;step can't be 0&quot;);
+
     if (FIXNUM_P(b) &amp;&amp; FIXNUM_P(e) &amp;&amp; FIXNUM_P(step)) { /* fixnums are special */
 	long end = FIX2LONG(e);
-	long i;
+	long i, unit = FIX2LONG(step);
 
-	if (unit == 0) rb_raise(rb_eArgError, &quot;step can't be 0&quot;);
-	if (!EXCL(range)) end += 1;
+	if (!EXCL(range))
+	    end += 1;
 	i = FIX2LONG(b);	
 	while (i &lt; end) {
 	    rb_yield(LONG2NUM(i));
 	    if (i + unit &lt; i) break;
 	    i += unit;
 	}
+
+    }
+    else if (rb_obj_is_kind_of(b, rb_cNumeric) ||
+	     !NIL_P(rb_check_to_integer(b, &quot;to_int&quot;)) ||
+	     !NIL_P(rb_check_to_integer(e, &quot;to_int&quot;))) {
+	ID op = EXCL(range) ? '&lt;' : rb_intern(&quot;&lt;=&quot;);
+
+	while (RTEST(rb_funcall(b, op, 1, e))) {
+	    rb_yield(b);
+	    b = rb_funcall(b, '+', 1, step);
+	}
     }
     else {
-	VALUE tmp = rb_check_string_type(b);
+	tmp = rb_check_string_type(b);
 
 	if (!NIL_P(tmp)) {
 	    VALUE args[5], iter[2];
 
 	    b = tmp;
-	    args[0] = b; args[1] = e; args[2] = range;
-	    iter[0] = INT2FIX(1); iter[1] = step;
-	    rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
-			(VALUE)iter);
+	    args[0] = e;
+	    args[1] = EXCL(range) ? Qtrue : Qfalse;
+	    iter[0] = INT2FIX(1);
+	    iter[1] = step;
+	    rb_block_call(b, rb_intern(&quot;upto&quot;), 2, args, step_i, (VALUE)iter);
 	}
 	else if (rb_obj_is_kind_of(b, rb_cNumeric) ||
 		 !NIL_P(rb_check_to_integer(b, &quot;to_int&quot;)) ||
@@ -377,7 +383,6 @@ range_step(argc, argv, range)
 		rb_raise(rb_eTypeError, &quot;can't iterate from %s&quot;,
 			 rb_obj_classname(b));
 	    }
-	
 	    args[0] = INT2FIX(1);
 	    args[1] = step;
 	    range_each_func(range, step_i, b, e, args);</diff>
      <filename>range.c</filename>
    </modified>
    <modified>
      <diff>@@ -595,7 +595,7 @@ static VALUE
 rb_reg_kcode_m(re)
     VALUE re;
 {
-    char *kcode;
+    const char *kcode;
 
     if (FL_TEST(re, KCODE_FIXED)) {
 	switch (RBASIC(re)-&gt;flags &amp; KCODE_MASK) {
@@ -1340,7 +1340,7 @@ match_string(match)
 static VALUE
 match_inspect(VALUE match)
 {
-    char *cname = rb_obj_classname(match);
+    const char *cname = rb_obj_classname(match);
     VALUE str;
     int i;
     struct re_registers *regs = RMATCH(match)-&gt;regs;
@@ -1477,8 +1477,9 @@ rb_reg_regcomp(str)
 
     case_cache = ruby_ignorecase;
     kcode_cache = reg_kcode;
-    return reg_cache = rb_reg_new(RSTRING(str)-&gt;ptr, RSTRING(str)-&gt;len,
-				  ruby_ignorecase);
+    reg_cache = rb_reg_new(RSTRING(str)-&gt;ptr, RSTRING(str)-&gt;len, ruby_ignorecase);
+    RB_GC_GUARD(save_str);
+    return reg_cache;
 }
 
 static int</diff>
      <filename>re.c</filename>
    </modified>
    <modified>
      <diff>@@ -65,7 +65,7 @@ static VALUE do_loop = Qfalse, do_print = Qfalse;
 static VALUE do_check = Qfalse, do_line = Qfalse;
 static VALUE do_split = Qfalse;
 
-static char *script;
+static const char *script;
 
 static int origargc;
 static char **origargv;
@@ -322,6 +322,13 @@ ruby_init_loadpath()
     incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
     incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
 
+    incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB2));
+#ifdef RUBY_VENDOR_THIN_ARCHLIB
+    incpush(RUBY_RELATIVE(RUBY_VENDOR_THIN_ARCHLIB));
+#endif
+    incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCHLIB));
+    incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB));
+
     incpush(RUBY_RELATIVE(RUBY_LIB));
 #ifdef RUBY_THIN_ARCHLIB
     incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));</diff>
      <filename>ruby.c</filename>
    </modified>
    <modified>
      <diff>@@ -538,11 +538,11 @@ void rb_gc_register_address _((VALUE*));
 void rb_gc_unregister_address _((VALUE*));
 
 ID rb_intern _((const char*));
-char *rb_id2name _((ID));
+const char *rb_id2name _((ID));
 ID rb_to_id _((VALUE));
 
-char *rb_class2name _((VALUE));
-char *rb_obj_classname _((VALUE));
+const char *rb_class2name _((VALUE));
+const char *rb_obj_classname _((VALUE));
 
 void rb_p _((VALUE));
 </diff>
      <filename>ruby.h</filename>
    </modified>
    <modified>
      <diff>@@ -36,7 +36,7 @@
 #endif
 
 static struct signals {
-    char *signm;
+    const char *signm;
     int  signo;
 } siglist [] = {
     {&quot;EXIT&quot;, 0},
@@ -186,7 +186,7 @@ signm2signo(nm)
     return 0;
 }
 
-static char*
+static const char*
 signo2signm(no)
     int no;
 {
@@ -327,7 +327,7 @@ rb_f_kill(argc, argv)
     int negative = 0;
     int sig;
     int i;
-    char *s;
+    const char *s;
 
     rb_secure(2);
     if (argc &lt; 2)
@@ -706,7 +706,7 @@ trap(arg)
     sighandler_t func, oldfunc;
     VALUE command, oldcmd;
     int sig = -1;
-    char *s;
+    const char *s;
 
     func = sighandler;
     command = arg-&gt;cmd;</diff>
      <filename>signal.c</filename>
    </modified>
    <modified>
      <diff>@@ -545,7 +545,8 @@ rb_str_associated(str)
     return Qfalse;
 }
 
-static char *null_str = &quot;&quot;;
+static const char null_str[] = &quot;&quot;;
+#define null_str ((char *)null_str)
 
 VALUE
 rb_string_value(ptr)
@@ -1492,12 +1493,13 @@ rb_str_upto(beg, end, excl)
 
 /*
  *  call-seq:
- *     str.upto(other_str) {|s| block }   =&gt; str
+ *     str.upto(other_str, exclusive=false) {|s| block }   =&gt; str
  *  
  *  Iterates through successive values, starting at &lt;i&gt;str&lt;/i&gt; and
  *  ending at &lt;i&gt;other_str&lt;/i&gt; inclusive, passing each value in turn to
  *  the block. The &lt;code&gt;String#succ&lt;/code&gt; method is used to generate
- *  each value.
+ *  each value.  If optional second argument exclusive is omitted or is &lt;code&gt;false&lt;/code&gt;,
+ *  the last value will be included; otherwise it will be excluded.
  *     
  *     &quot;a8&quot;.upto(&quot;b6&quot;) {|s| print s, ' ' }
  *     for s in &quot;a8&quot;..&quot;b6&quot;
@@ -1511,10 +1513,16 @@ rb_str_upto(beg, end, excl)
  */
 
 static VALUE
-rb_str_upto_m(beg, end)
-    VALUE beg, end;
+rb_str_upto_m(argc, argv, beg)
+    int argc;
+    VALUE *argv;
+    VALUE beg;
 {
-    return rb_str_upto(beg, end, Qfalse);
+    VALUE end, exclusive;
+
+    rb_scan_args(argc, argv, &quot;11&quot;, &amp;end, &amp;exclusive);
+
+    return rb_str_upto(beg, end, RTEST(exclusive));
 }
 
 static VALUE
@@ -4473,7 +4481,7 @@ rb_str_crypt(str, salt)
 {
     extern char *crypt();
     VALUE result;
-    char *s;
+    const char *s;
 
     StringValue(salt);
     if (RSTRING(salt)-&gt;len &lt; 2)
@@ -4600,7 +4608,8 @@ rb_str_justify(argc, argv, str, jflag)
     VALUE w;
     long width, flen = 0;
     VALUE res;
-    char *p, *pend, *f = &quot; &quot;;
+    char *p, *pend;
+    const char *f = &quot; &quot;;
     long n;
     VALUE pad;
 
@@ -4626,7 +4635,7 @@ rb_str_justify(argc, argv, str, jflag)
 	    }
 	}
 	else {
-	    char *q = f;
+	    const char *q = f;
 	    while (p + flen &lt;= pend) {
 		memcpy(p,f,flen);
 		p += flen;
@@ -4830,7 +4839,6 @@ rb_str_start_with(argc, argv, str)
     VALUE str;
 {
     int i;
-    long pos;
     VALUE pat;
 
     for (i=0; i&lt;argc; i++) {
@@ -4929,7 +4937,7 @@ Init_String()
     rb_define_method(rb_cString, &quot;succ!&quot;, rb_str_succ_bang, 0);
     rb_define_method(rb_cString, &quot;next&quot;, rb_str_succ, 0);
     rb_define_method(rb_cString, &quot;next!&quot;, rb_str_succ_bang, 0);
-    rb_define_method(rb_cString, &quot;upto&quot;, rb_str_upto_m, 1);
+    rb_define_method(rb_cString, &quot;upto&quot;, rb_str_upto_m, -1);
     rb_define_method(rb_cString, &quot;index&quot;, rb_str_index_m, -1);
     rb_define_method(rb_cString, &quot;rindex&quot;, rb_str_rindex_m, -1);
     rb_define_method(rb_cString, &quot;replace&quot;, rb_str_replace, 1);</diff>
      <filename>string.c</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@ static VALUE struct_alloc _((VALUE));
 VALUE
 rb_struct_iv_get(c, name)
     VALUE c;
-    char *name;
+    const char *name;
 {
     ID id;
 
@@ -470,7 +470,7 @@ static VALUE
 inspect_struct(s)
     VALUE s;
 {
-    char *cname = rb_class2name(rb_obj_class(s));
+    const char *cname = rb_class2name(rb_obj_class(s));
     VALUE str, members;
     long i;
 
@@ -481,7 +481,7 @@ inspect_struct(s)
     for (i=0; i&lt;RSTRUCT(s)-&gt;len; i++) {
 	VALUE slot;
 	ID id;
-	char *p;
+	const char *p;
 
 	if (i &gt; 0) {
 	    rb_str_cat2(str, &quot;, &quot;);
@@ -517,7 +517,7 @@ rb_struct_inspect(s)
     VALUE s;
 {
     if (rb_inspecting_p(s)) {
-	char *cname = rb_class2name(rb_obj_class(s));
+	const char *cname = rb_class2name(rb_obj_class(s));
 	size_t len = strlen(cname) + 14;
 	VALUE str = rb_str_new(0, len);
 </diff>
      <filename>struct.c</filename>
    </modified>
    <modified>
      <diff>@@ -530,6 +530,7 @@ class TestArray &lt; Test::Unit::TestCase
 
   def test_count
     a = @cls[1, 2, 3, 1, 2]
+    assert_equal(5, a.count)
     assert_equal(2, a.count(1))
     assert_equal(3, a.count {|x| x % 2 == 1 })
     assert_equal(2, a.count(1) {|x| x % 2 == 1 })</diff>
      <filename>test/ruby/test_array.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,6 +29,7 @@ class TestEnumerable &lt; Test::Unit::TestCase
   end
 
   def test_count
+    assert_equal(5, @obj.count)
     assert_equal(2, @obj.count(1))
     assert_equal(3, @obj.count {|x| x % 2 == 1 })
     assert_equal(2, @obj.count(1) {|x| x % 2 == 1 })</diff>
      <filename>test/ruby/test_enum.rb</filename>
    </modified>
    <modified>
      <diff>@@ -171,7 +171,7 @@ time_timeval(time, interval)
     int interval;
 {
     struct timeval t;
-    char *tstr = interval ? &quot;time interval&quot; : &quot;time&quot;;
+    const char *tstr = interval ? &quot;time interval&quot; : &quot;time&quot;;
 
 #ifndef NEGATIVE_TIME_T
     interval = 1;
@@ -279,7 +279,7 @@ time_s_at(argc, argv, klass)
     return t;
 }
 
-static char *months [12] = {
+static const char months[][4] = {
     &quot;jan&quot;, &quot;feb&quot;, &quot;mar&quot;, &quot;apr&quot;, &quot;may&quot;, &quot;jun&quot;,
     &quot;jul&quot;, &quot;aug&quot;, &quot;sep&quot;, &quot;oct&quot;, &quot;nov&quot;, &quot;dec&quot;,
 };</diff>
      <filename>time.c</filename>
    </modified>
    <modified>
      <diff>@@ -3100,7 +3100,7 @@ rv_alloc(int i)
 }
 
 static char *
-nrv_alloc(char *s, char **rve, int n)
+nrv_alloc(const char *s, char **rve, int n)
 {
     char *rv, *t;
 </diff>
      <filename>util.c</filename>
    </modified>
    <modified>
      <diff>@@ -195,7 +195,7 @@ rb_class_path(klass)
 	return path;
     }
     else {
-	char *s = &quot;Class&quot;;
+	const char *s = &quot;Class&quot;;
 	size_t len;
 
 	if (TYPE(klass) == T_MODULE) {
@@ -294,14 +294,14 @@ rb_class_name(klass)
     return rb_class_path(rb_class_real(klass));
 }
 
-char *
+const char *
 rb_class2name(klass)
     VALUE klass;
 {
     return RSTRING(rb_class_name(klass))-&gt;ptr;
 }
 
-char *
+const char *
 rb_obj_classname(obj)
     VALUE obj;
 {
@@ -789,7 +789,7 @@ rb_f_global_variables()
 {
     VALUE ary = rb_ary_new();
     char buf[4];
-    char *s = &quot;&amp;`'+123456789&quot;;
+    const char *s = &quot;&amp;`'+123456789&quot;;
 
     st_foreach(rb_global_tbl, gvar_i, ary);
     if (!NIL_P(rb_backref_get())) {
@@ -1653,7 +1653,7 @@ mod_av_set(klass, id, val, isconst)
     VALUE val;
     int isconst;
 {
-    char *dest = isconst ? &quot;constant&quot; : &quot;class variable&quot;;
+    const char *dest = isconst ? &quot;constant&quot; : &quot;class variable&quot;;
 
     if (!OBJ_TAINTED(klass) &amp;&amp; rb_safe_level() &gt;= 4)
 	rb_raise(rb_eSecurityError, &quot;Insecure: can't set %s&quot;, dest);</diff>
      <filename>variable.c</filename>
    </modified>
    <modified>
      <diff>@@ -14,23 +14,44 @@
 #include &quot;version.h&quot;
 #include &lt;stdio.h&gt;
 
+#define PRINT(type) puts(ruby_##type)
+#define MKSTR(type) rb_obj_freeze(rb_str_new(ruby_##type, sizeof(ruby_##type)-1))
+
 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;
+const char *ruby_description;
+const char *ruby_copyright;
 
 void
 Init_version()
 {
-    VALUE v = rb_obj_freeze(rb_str_new2(ruby_version));
-    VALUE d = rb_obj_freeze(rb_str_new2(ruby_release_date));
-    VALUE p = rb_obj_freeze(rb_str_new2(ruby_platform));
+    static char description[128];
+    static char copyright[128];
+    VALUE v = MKSTR(version);
+    VALUE d = MKSTR(release_date);
+    VALUE p = MKSTR(platform);
+    VALUE tmp;
 
     rb_define_global_const(&quot;RUBY_VERSION&quot;, v);
     rb_define_global_const(&quot;RUBY_RELEASE_DATE&quot;, d);
     rb_define_global_const(&quot;RUBY_PLATFORM&quot;, p);
     rb_define_global_const(&quot;RUBY_PATCHLEVEL&quot;, INT2FIX(RUBY_PATCHLEVEL));
 
+    snprintf(description, sizeof(description), &quot;ruby %s (%s %s %d) [%s]&quot;,
+             RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_RELEASE_STR,
+             RUBY_RELEASE_NUM, RUBY_PLATFORM);
+    ruby_description = description;
+    tmp = rb_obj_freeze(rb_str_new2(description));
+    rb_define_global_const(&quot;RUBY_DESCRIPTION&quot;, tmp);
+
+    snprintf(copyright, sizeof(copyright), &quot;ruby - Copyright (C) %d-%d %s&quot;,
+             RUBY_BIRTH_YEAR, RUBY_RELEASE_YEAR, RUBY_AUTHOR);
+    ruby_copyright = copyright;
+    tmp = rb_obj_freeze(rb_str_new2(copyright));
+    rb_define_global_const(&quot;RUBY_COPYRIGHT&quot;, tmp);
+
     /* obsolete constants */
     rb_define_global_const(&quot;VERSION&quot;, v);
     rb_define_global_const(&quot;RELEASE_DATE&quot;, d);
@@ -40,13 +61,13 @@ Init_version()
 void
 ruby_show_version()
 {
-    printf(&quot;ruby %s (%s patchlevel %d) [%s]\n&quot;, RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PATCHLEVEL, RUBY_PLATFORM);
+    PRINT(description);
     fflush(stdout);
 }
 
 void
 ruby_show_copyright()
 {
-    printf(&quot;ruby - Copyright (C) 1993-%d Yukihiro Matsumoto\n&quot;, RUBY_RELEASE_YEAR);
+    PRINT(copyright);
     exit(0);
 }</diff>
      <filename>version.c</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 #define RUBY_VERSION &quot;1.8.7&quot;
-#define RUBY_RELEASE_DATE &quot;2008-05-27&quot;
+#define RUBY_RELEASE_DATE &quot;2008-05-31&quot;
 #define RUBY_VERSION_CODE 187
-#define RUBY_RELEASE_CODE 20080527
+#define RUBY_RELEASE_CODE 20080531
 #define RUBY_PATCHLEVEL 0
 
 #define RUBY_VERSION_MAJOR 1
@@ -9,11 +9,21 @@
 #define RUBY_VERSION_TEENY 7
 #define RUBY_RELEASE_YEAR 2008
 #define RUBY_RELEASE_MONTH 5
-#define RUBY_RELEASE_DAY 27
+#define RUBY_RELEASE_DAY 31
 
 #ifdef RUBY_EXTERN
 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;
+RUBY_EXTERN const char *ruby_description;
+RUBY_EXTERN const char *ruby_copyright;
 #endif
+
+#define RUBY_AUTHOR &quot;Yukihiro Matsumoto&quot;
+#define RUBY_BIRTH_YEAR 1993
+#define RUBY_BIRTH_MONTH 2
+#define RUBY_BIRTH_DAY 24
+
+#define RUBY_RELEASE_STR &quot;patchlevel&quot;
+#define RUBY_RELEASE_NUM RUBY_PATCHLEVEL</diff>
      <filename>version.h</filename>
    </modified>
    <modified>
      <diff>@@ -396,9 +396,12 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
 #define RUBY_LIB &quot;/lib/ruby/$(MAJOR).$(MINOR)&quot;
 #define RUBY_SITE_LIB &quot;/lib/ruby/site_ruby&quot;
 #define RUBY_SITE_LIB2 &quot;/lib/ruby/site_ruby/$(MAJOR).$(MINOR)&quot;
+#define RUBY_VENDOR_LIB &quot;/lib/ruby/vendor_ruby&quot;
+#define RUBY_VENDOR_LIB2 &quot;/lib/ruby/vendor_ruby/$(MAJOR).$(MINOR)&quot;
 #define RUBY_PLATFORM &quot;$(arch)&quot;
 #define RUBY_ARCHLIB &quot;/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)&quot;
 #define RUBY_SITE_ARCHLIB &quot;/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(RT)&quot;
+#define RUBY_VENDOR_ARCHLIB &quot;/lib/ruby/vendor_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(RT)&quot;
 #define LIBRUBY_SO &quot;$(LIBRUBY_SO)&quot;
 #if 0
 $(BANG)if &quot;$(RUBY_SO_NAME)&quot;!=&quot;$$(RUBY_SO_NAME)&quot; || &quot;$(ARCH)-$(OS)&quot;!=&quot;$$(ARCH)-$$(OS)&quot;
@@ -546,6 +549,7 @@ s,@EXPORT_PREFIX@, ,;t t
 s,@arch@,$(ARCH)-$(OS),;t t
 s,@sitearch@,$(ARCH)-$(RT),;t t
 s,@sitedir@,$${prefix}/lib/ruby/site_ruby,;t t
+s,@vendordir@,$${prefix}/lib/ruby/vendor_ruby,;t t
 s,@configure_args@,--with-make-prog=nmake --enable-shared $(configure_args),;t t
 s,@configure_input@,$$configure_input,;t t
 s,@srcdir@,$(srcdir),;t t</diff>
      <filename>win32/Makefile.sub</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5b792fe9b18b59facf47b19b035ad53c63ab44c1</id>
    </parent>
  </parents>
  <author>
    <name>knu</name>
    <email>knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
  </author>
  <url>http://github.com/ice799/matzruby/commit/63055294bfa69855507e71143a1820bfdee3774b</url>
  <id>63055294bfa69855507e71143a1820bfdee3774b</id>
  <committed-date>2008-05-31T07:57:11-07:00</committed-date>
  <authored-date>2008-05-31T07:57:11-07:00</authored-date>
  <message>Tag for 1.8.7.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7@16730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e</message>
  <tree>c60bd25550143cdb22b2d0a9f925c318ed4ba07a</tree>
  <committer>
    <name>knu</name>
    <email>knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
  </committer>
</commit>
