<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 Ruby is copyrighted free software by Yukihiro Matsumoto &lt;matz@netlab.jp&gt;.
 You can redistribute it and/or modify it under either the terms of the GPL
-(see the file GPL), or the conditions below:
+version 2 (see the file GPL), or the conditions below:
 
   1. You may make and give away verbatim copies of the source form of the
      software without restriction, provided that you duplicate all of the</diff>
      <filename>COPYING</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,38 @@
+Fri Jun  9 09:56:32 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* sprintf.c (rb_str_format): allow %c to print one character
+	  string (e.g. ?x).
+
 Thu Jun  8 14:00:02 2006  NAKAMURA Usaku  &lt;usa@ruby-lang.org&gt;
 
 	* win32/win32.[ch] (rb_w32_read, rb_w32_write): new functions.
 	  use recv() and send() when fd is socket. fixed: [ruby-dev:28694]
 
+Wed Jun  7 16:22:51 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* lib/tempfile.rb (Tempfile::make_tmpname): put dot between
+	  basename and pid.  [ruby-talk:196272]
+
+Wed Jun  7 16:16:29 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* parse.y (do_block): remove -&gt; style block.
+
+	* parse.y (parser_yylex): remove tLAMBDA_ARG.
+
 Wed Jun  7 14:51:22 2006  NAKAMURA Usaku  &lt;usa@ruby-lang.org&gt;
 
 	* win32/win32.c (errmap): add some winsock errors.
 
+Wed Jun  7 09:14:44 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (rb_call0): binding for the return event hook should have
+	  consistent scope.  [ruby-core:07928]
+
+Tue Jun  6 23:25:49 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (proc_invoke): return behavior should depend whether it
+	  is surrounded by a lambda or a mere block.
+
 Mon Jun  5 18:12:12 2006  Tanaka Akira  &lt;akr@m17n.org&gt;
 
 	* ext/socket/socket.c (sock_s_unpack_sockaddr_in): reject
@@ -19,6 +45,20 @@ Sun Jun  4 20:40:19 2006  Tanaka Akira  &lt;akr@m17n.org&gt;
 	* ext/socket/socket.c: fix sockaddr_un handling.
 	  [ruby-dev:28677]
 
+Sat Jun  3 23:53:18 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (formal_assign): handles post splat arguments.
+
+	* eval.c (rb_call0): ditto.
+
+Sat Jun  3 13:10:41 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* st.c (strhash): use FNV-1a hash.
+
+Fri Jun  2 20:01:24 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* parse.y (parser_yylex): removed experimental ';;' terminator.
+
 Fri Jun  2 19:00:40 2006  GOTOU Yuuzou  &lt;gotoyuzo@notwork.org&gt;
 
 	* ext/openssl/extconf.rb: use create_header.
@@ -48,17 +88,67 @@ Thu Jun  1 19:12:37 2006  Nobuyoshi Nakada  &lt;nobu@ruby-lang.org&gt;
 	* win32/win32.c (rb_w32_cmdvector): backslashes inside single-quotes
 	  no longer has special meanings.  fixed: [ruby-list:42311]
 
+Thu Jun  1 17:55:42 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (rb_node_arity): should be aware of post splat arguments.
+
+	* eval.c (rb_proc_arity): ditto.
+
 Thu Jun  1 16:17:26 2006  NAKAMURA Usaku  &lt;usa@ruby-lang.org&gt;
 
 	* win32/win32.c (rb_w32_getcwd): runtime's getcwd() will not success
 	  if the length of the cwd is longer than MAX_PATH.
 	  fixed [ruby-list:42335]
 
+Thu Jun  1 16:07:48 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* parse.y (f_args): syntax rule enhanced to support arguments
+	  after the splat.
+
+	* parse.y (mlhs_basic): ditto for multiple assignments
+
+	* parse.y (block_param): ditto for block parameters.
+
+	* parse.y (f_post_arg): mandatory formal arguments after the splat
+	  argument.
+
+	* parse.y (new_args_gen): generate nodes for mandatory formal
+	  arguments after the splat argument.
+
+	* eval.c (rb_eval): dispatch mandatory formal arguments after the
+	  splat argument.
+
 Thu Jun  1 11:33:32 2006  NAKAMURA Usaku  &lt;usa@ruby-lang.org&gt;
 
 	* win32/win32.c (rb_w32_getcwd): set errno if not set.
 	  fixed [ruby-list:42346]
 
+Thu Jun  1 00:45:52 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* parse.y (args): allow more than one splat in the argument list.
+
+Wed May 31 18:38:11 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* parse.y (method_call): allow aref [] to accept all kind of
+	  method argument, including assocs, splat, and block argument.
+
+	* eval.c (SETUP_ARGS0): prepare block argument as well.
+
+Tue May 30 18:13:53 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931]
+
+Mon May 29 22:40:13 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (error_line): print receivers true/false/nil specially.
+
+	* eval.c (rb_proc_yield): handles parameters in yield semantics.
+
+	* eval.c (nil_yield): gives LocalJumpError to denote no block
+	  error.
+
+	* io.c (rb_io_getc): now takes one-character string.
+
 Sat May 27 22:46:38 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
 
 	* eval.c (proc_invoke): save and restore block in the current frame.
@@ -69,6 +159,11 @@ Sat May 27 11:29:46 2006  Nobuyoshi Nakada  &lt;nobu@ruby-lang.org&gt;
 	* ext/extmk.rb (extmake): remove extinit files if no statically linked
 	  extensions.
 
+Fri May 26 19:56:46 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo
+	  hashing algorithm.
+
 Fri May 26 09:05:11 2006  Nobuyoshi Nakada  &lt;nobu@ruby-lang.org&gt;
 
 	* ruby.h, lib/mkmf.rb (create_header): clear command line options for
@@ -103,7 +198,17 @@ Wed May 24 23:52:11 2006  Nobuyoshi Nakada  &lt;nobu@ruby-lang.org&gt;
 	* configure.in (ac_install_sh): ignore dummy install-sh.
 	  [ruby-talk:193876]
 
-Wed May 24 03:10:44 2006  GOTOU Yuuzou  &lt;gotoyuzo@notwork.org&gt;
+Wed May 24 17:55:13 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* string.c (rb_str_aref): str[0] now returns 1 character string,
+	  instead of a fixnum.	[Ruby2]
+
+	* parse.y (parser_yylex): ?c now returns 1 character string,
+	  instead of a fixnum.	[Ruby2]
+
+	* string.c (rb_str_aset): no longer support fixnum insertion.
+
+Wed May 24 03:10:44 2006  GOTOU Yuuzou	&lt;gotoyuzo@notwork.org&gt;
 
 	* ext/openssl/lib/openssl/ssl.rb
 	  (OpenSSL::SSL::SocketForwarder#setsockopt,getsockopt): typo fixed.
@@ -125,6 +230,16 @@ Mon May 22 16:32:03 2006  Tanaka Akira  &lt;akr@m17n.org&gt;
 
 	  [ruby-core:7917]
 
+Mon May 22 15:57:39 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (umethod_bind): should not update original class.
+	  [ruby-dev:28636]
+
+Mon May 22 13:38:57 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (ev_const_get): should support constant access from
+	  within instance_eval().  [ruby-dev:28327]
+
 Sun May 21 09:50:31 2006  K.Kosako  &lt;sndgk393 AT ybb.ne.jp&gt;
 
 	* regexec.c: add STK_NULL_CHECK_END to IS_TO_VOID_TARGET().
@@ -152,15 +267,55 @@ Thu May 18 22:37:20 2006  GOTOU Yuuzou  &lt;gotoyuzo@notwork.org&gt;
 
 	* test/webrick/test_utils.rb: test for WEBrick::Utils.timeout.
 
+Thu May 18 17:51:32 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* time.c (time_timeval): should round for usec floating
+	  number.  [ruby-core:07896]
+
+	* time.c (time_add): ditto.
+
 Thu May 18 00:42:12 2006  Nobuyoshi Nakada  &lt;nobu@ruby-lang.org&gt;
 
 	* ext/extmk.rb, lib/mkmf.rb: use BUILD_FILE_SEPARATOR in Makefiles.
 
+Wed May 17 17:55:26 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* dir.c (sys_warning): should not call a vararg function
+	  rb_sys_warning() indirectly.	[ruby-core:07886]
+
+Tue May 16 17:23:19 2006    &lt;sinara@blade.nagaokaut.ac.jp&gt;
+
+	* numeric.c (flo_divmod): the first element of Float#divmod should
+	  be an integer. [ruby-dev:28589]
+
+	* test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder.
+
+Tue May 16 15:34:18 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* re.c (rb_reg_initialize): should not allow modifying literal
+	  regexps.  frozen check moved from rb_reg_initialize_m as well.
+
+Tue May 16 09:20:16 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* re.c (rb_reg_initialize): should not modify untainted objects in
+	  safe levels higher than 3.
+
+	* re.c (rb_memcmp): type change from char* to const void*.
+
+	* dir.c (dir_close): should not close untainted dir stream.
+
+	* dir.c (GetDIR): add tainted/frozen check for each dir operation.
+
 Mon May 15 21:37:12 2006  K.Kosako  &lt;sndgk393 AT ybb.ne.jp&gt;
 
 	* re.c (rb_reg_prepare_re): don't use onig_recompile().
 
-Sat May 13 16:14:05 2006  Tanaka Akira  &lt;akr@m17n.org&gt;
+Mon May 15 17:42:39 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg):
+	  typo fixed.  a patch from Florian Gross &lt;florg at florg.net&gt;.
+
+Sat May 13 16:14:05 2006  Tanaka Akira	&lt;akr@m17n.org&gt;
 
 	* lib/pp.rb (PP.mcall): new method.
 	  (Struct#pretty_print): call Kernel#class and Struct#members even if
@@ -168,11 +323,27 @@ Sat May 13 16:14:05 2006  Tanaka Akira  &lt;akr@m17n.org&gt;
 	  (Struct#pretty_print_cycle): ditto.
 	  [ruby-core:7865]
 
-Thu May 11 18:30:11 2006  GOTOU Yuuzou  &lt;gotoyuzo@notwork.org&gt;
+Fri May 12 15:54:48 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
+	  event_hooks.	no guarantee for arbitrary hook deletion.
+	  [ruby-dev:28632]
+
+Thu May 11 19:57:00 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* util.c (ruby_strtod): differ addition to minimize error.
+	  [ruby-dev:28619]
+
+Thu May 11 18:30:11 2006  GOTOU Yuuzou	&lt;gotoyuzo@notwork.org&gt;
 
 	* ext/openssl/ossl_cipher.c (add_cipher_name_to_ary): should return
 	  value. [ruby-dev:28627]
 
+Thu May 11 18:10:43 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* util.c (ruby_strtod): should not raise ERANGE when the input
+	  string does not have any digits.  [ruby-dev:28629]
+
 Wed May 10 23:40:21 2006  K.Kosako  &lt;sndgk393 AT ybb.ne.jp&gt;
 
 	* oniguruma.h: Version 4.0.3
@@ -203,7 +374,46 @@ Sun May  7 03:09:51 2006  Stephan Maka  &lt;stephan@spaceboyz.net&gt;
 	* lib/resolv.rb (Resolv::DNS::Requester::ConnectedUDP#initialize):
 	  Use AF_INET6 for nameservers containing colons.
 
-Mon May  1 17:58:16 2006  Masaki Suketa  &lt;masaki.suketa@nifty.ne.jp&gt;
+Sat May	 6 23:40:03 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (proc_invoke): should restore old ruby_frame-&gt;block.
+	  thanks to ts &lt;decoux at moulon.inra.fr&gt;.  [ruby-core:07833]
+	  also fix [ruby-dev:28614] as well.
+
+Sat May	 6 00:38:42 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* signal.c (trap): sig should be less then NSIG.  Coverity found
+	  this bug.  a patch from Kevin Tew &lt;tewk at tewk.com&gt;.
+	  [ruby-core:07823]
+
+Thu May	 4 22:13:22 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* math.c (math_log2): add new method inspired by
+	  [ruby-talk:191237].
+
+	* math.c (math_log): add optional base argument to Math::log().
+	  [ruby-talk:191308]
+
+Thu May	 4 02:24:16 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
+	  uninitialized array element.	a patch from Pat Eyler
+	  &lt;rubypate at gmail.com&gt;.  [ruby-core:07809]
+
+	* array.c (rb_ary_fill): initialize local variables first.  a
+	  patch from Pat Eyler &lt;rubypate at gmail.com&gt;.	 [ruby-core:07810]
+
+	* ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free
+	  type_tag.  a patch from Pat Eyler &lt;rubypate at gmail.com&gt;.
+	  [ruby-core:07808]
+
+Wed May	 3 02:12:07 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* ext/socket/socket.c (make_hostent_internal): accept ai_family
+	  check from Sam Roberts &lt;sroberts at uniserve.com&gt;.
+	  [ruby-core:07691]
+
+Mon May	 1 17:58:16 2006  Masaki Suketa	 &lt;masaki.suketa@nifty.ne.jp&gt;
 
 	* ext/win32ole/win32ole.c (add_event_call_back): should not
 	  delete event handler when the event name is not entried.
@@ -218,16 +428,75 @@ Sat Apr 29 22:43:37 2006  GOTOU Yuuzou  &lt;gotoyuzo@notwork.org&gt;
 	* ext/openssl/ossl_asn1.c (ossl_asn1_decode0): should initialize
 	  flag. [ruby-core:07785]
 
+Fri Apr 28 10:53:16 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* util.c (ruby_strtod): should not cut off 18 digits for no
+	  reason.  [ruby-core:07796]
+
+Thu Apr 27 01:38:10 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* array.c (rb_ary_fill): internalize local variable &quot;beg&quot; to
+	  pacify Coverity.  [ruby-core:07770]
+
+Wed Apr 26 16:59:24 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* pack.c (pack_unpack): now supports CRLF newlines.  a patch from
+	  &lt;tommy at tmtm.org&gt;.	[ruby-dev:28601]
+
+Wed Apr 26 16:55:19 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* applied code clean-up patch from Stefan Huehner
+	  &lt;stefan at huehner.org&gt;.  [ruby-core:07764]
+
 Tue Apr 25 18:00:05 2006  Hidetoshi NAGAI  &lt;nagai@ai.kyutech.ac.jp&gt;
 
 	* ext/tk/tcltklib.c (delete_slaves): maybe increment the reference
 	  count of a NULL Tcl_Obj [ruby-core:07759].
 
+Tue Apr 25 07:55:31 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* lib/jcode.rb (String::tr_s): should have translated non
+	  squeezing character sequence (i.e. a character) as well.  thanks
+	  to Hiroshi Ichikawa &lt;gimite at gimite.ddo.jp&gt; [ruby-list:42090]
+
 Fri Apr 21 15:19:13 2006  Hidetoshi NAGAI  &lt;nagai@ai.kyutech.ac.jp&gt;
 
 	* ext/tk/tcltklib.c (lib_eventloop_ensure): refer freed pointer
 	  [ruby-core:07744] and memory leak.
 
+Fri Apr 21 12:14:52 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* ext/socket/socket.c: document update patch from Sam Roberts
+	  &lt;sroberts at uniserve.com&gt;.  [ruby-core:07701]
+
+Thu Apr 20 08:43:54 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* lib/mathn.rb (Integer): need not to remove gcd2.  a patch from
+	  NARUSE, Yui &lt;naruse at airemix.com&gt;.	[ruby-dev:28570]
+
+Wed Apr 19 13:55:27 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* parse.y (arg): too much NEW_LIST()
+
+	* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen.
+
+Wed Apr 19 11:57:04 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1.
+	  [ruby-dev:28585]
+
+	* parse.y (arg): use NODE_ARGSCAT for placeholder.
+
+Wed Apr 19 11:13:17 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* lib/getoptlong.rb (GetoptLong::get): RDoc update patch from
+	  mathew &lt;meta at pobox.com&gt;.  [ruby-core:07738]
+
+Wed Apr 19 10:13:27 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* variable.c (rb_const_set): raise error when no target klass is
+	  supplied.  [ruby-dev:28582]
+
 Tue Apr 18 17:40:37 2006  Hidetoshi NAGAI  &lt;nagai@ai.kyutech.ac.jp&gt;
 
 	* ext/tk/lib/multi-tk.rb: add a binding to a container for a slave IP.
@@ -238,7 +507,21 @@ Tue Apr 18 17:40:37 2006  Hidetoshi NAGAI  &lt;nagai@ai.kyutech.ac.jp&gt;
 
 	* ext/tk/stubs.c: fix potential bugs about handling rb_argv0.
 
-Sat Apr  8 18:06:28 2006  Masaki Suketa  &lt;masaki.suketa@nifty.ne.jp&gt;
+Mon Apr 10 01:03:10 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* prec.c (prec_prec_f): documentation patch from
+	  &lt;gerardo.santana at gmail.com&gt;.  [ruby-core:07689]
+
+Sat Apr	 8 02:34:34 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* bignum.c (rb_big_pow): second operand may be too big even if
+	  it's a Fixnum.  [ruby-talk:187984]
+
+Sat Apr	 8 02:12:38 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* README.EXT: update symbol description.  [ruby-talk:188104]
+
+Sat Apr	 8 18:06:28 2006  Masaki Suketa	 &lt;masaki.suketa@nifty.ne.jp&gt;
 
 	* ext/win32ole/win32ole.c: add WIN32OLE_METHOD#inspect,
 	  WIN32OLE_PARAM#inspect.
@@ -254,7 +537,11 @@ Fri Apr  7 22:11:30 2006  Masaki Suketa  &lt;masaki.suketa@nifty.ne.jp&gt;
 
 	* test/win32ole/test_win32ole_typelib.rb(test_initialize): ditto.
 
-Thu Apr  6 16:43:06 2006  Hidetoshi NAGAI  &lt;nagai@ai.kyutech.ac.jp&gt;
+Thu Apr	 6 23:28:47 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* COPYING: explicitly note GPLv2.  [ruby-talk:187922]
+
+Thu Apr	 6 16:43:06 2006  Hidetoshi NAGAI  &lt;nagai@ai.kyutech.ac.jp&gt;
 
 	* intern.h (rb_obj_instance_exec, rb_mod_module_exec): add declaration.
 
@@ -287,7 +574,12 @@ Wed Apr  5 00:22:54 2006  Tanaka Akira  &lt;akr@m17n.org&gt;
 	  methods take pathname argument.  suggested by Evan Phoenix.
 	  [ruby-core:7618]
 
-Sat Apr  1 15:11:27 2006  Masaki Suketa  &lt;masaki.suketa@nifty.ne.jp&gt;
+Tue Apr	 4 22:15:41 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* parse.y: remove some obsolete syntax rules (unparenthesized
+	  method calls in argument list).
+
+Sat Apr	 1 15:11:27 2006  Masaki Suketa	 &lt;masaki.suketa@nifty.ne.jp&gt;
 
 	* ext/win32ole/win32ole.c :add WIN32OLE_TYPE#inspect,
 	  WIN32OLE_VARIABLE#inspect
@@ -337,6 +629,14 @@ Mon Mar 27 22:45:37 2006  NARUSE, Yui  &lt;naruse@ruby-lang.org&gt;
 
 	* ext/nkf/nkf.c, ext/nkf/lib/kconv.rb: Add rdoc.
 
+Mon Mar 27 03:17:21 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (rb_call0): insecure calling should be checked for non
+	  NODE_SCOPE method invocations too.
+
+	* eval.c (rb_alias): should preserve the current safe level as
+	  well as method definition.
+
 Sun Mar 26 22:02:51 2006  K.Kosako  &lt;sndgk393 AT ybb.ne.jp&gt;
 
 	* re.c: refactoring for options.
@@ -351,6 +651,11 @@ Fri Mar 24 21:11:02 2006  K.Kosako  &lt;sndgk393 AT ybb.ne.jp&gt;
 
 	* string.c (rb_str_gsub): ditto.
 
+Fri Mar 24 17:20:03 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* process.c (rb_f_sleep): remove RDoc description about SIGALRM
+	  which is not valid on the current implementation. [ruby-dev:28464]
+
 Thu Mar 23 21:40:47 2006  K.Kosako  &lt;sndgk393 AT ybb.ne.jp&gt;
 
 	* re.c (rb_reg_regsub): prohibit \1, \2 ...\9 in replaced string
@@ -366,6 +671,12 @@ Thu Mar 23 21:06:23 2006  K.Kosako  &lt;sndgk393 AT ybb.ne.jp&gt;
 
 	* regerror.c: ditto.
 
+Thu Mar 23 10:47:03 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (method_missing): should support argument splat in
+	  super.  a bug in combination of super, splat and
+	  method_missing.  [ruby-talk:185438]
+
 Thu Mar 23 00:01:32 2006  K.Kosako  &lt;sndgk393 AT ybb.ne.jp&gt;
 
 	* re.c (rb_reg_regsub): add back reference by name \k&lt;name&gt; in
@@ -387,15 +698,25 @@ Tue Mar 21 22:14:01 2006  K.Kosako  &lt;sndgk393 AT ybb.ne.jp&gt;
 
 	* gc.c (gc_mark_children): add gc_mark() to regexp member.
 
+Mon Mar 20 12:05:18 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* configure.in: Solaris SunPro compiler -rapth patch from
+	  &lt;kuwa at labs.fujitsu.com&gt;.  [ruby-dev:28443]
+
 Mon Mar 20 11:12:38 2006  NAKAMURA Usaku  &lt;usa@ruby-lang.org&gt;
 
 	* ext/win32ole/win32ole.c (folevariant_value): could not compile
 	  with C90 compiler.
 
-Sun Mar 19 09:46:30 2006  Masaki Suketa  &lt;masaki.suketa@nifty.ne.jp&gt;
+Mon Mar 20 09:40:23 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* configure.in: remove enable_rpath=no for Solaris.
+	  [ruby-dev:28440]
+
+Sun Mar 19 09:46:30 2006  Masaki Suketa	 &lt;masaki.suketa@nifty.ne.jp&gt;
 
 	* ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior
-	  of converting  OLE Variant object with VT_ARRAY|VT_UI1 and Ruby
+	  of converting	 OLE Variant object with VT_ARRAY|VT_UI1 and Ruby
 	  String object.
 
 	* ext/win32ole/win32ole.c (folevariant_value): ditto.
@@ -421,7 +742,12 @@ Sun Mar 12 17:02:10 2006  Masaki Suketa  &lt;masaki.suketa@nifty.ne.jp&gt;
 	* ext/win32ole/tests/testOLEPARAM.rb: test method name should not be
 	  duplicated.
 
-Sun Mar  5 18:40:58 2006  Minero Aoki  &lt;aamine@loveruby.net&gt;
+Sat Mar 11 14:24:06 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* ruby.1: a clarification patch from David Lutterkort
+	  &lt;dlutter at redhat.com&gt;.  [ruby-core:7508]
+
+Sun Mar	 5 18:40:58 2006  Minero Aoki  &lt;aamine@loveruby.net&gt;
 
 	* lib/fileutils.rb: do not repeat command options.
 
@@ -434,16 +760,25 @@ Sat Mar  4 15:26:40 2006  Tanaka Akira  &lt;akr@m17n.org&gt;
 
 	* gc.c (id2ref): fix symbol test.
 
-Fri Mar  3 21:22:42 2006  Tanaka Akira  &lt;akr@m17n.org&gt;
+Sat Mar	 4 01:08:07 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems
+	  directories.	a patch from Eric Hodel &lt;drbrain at segment7.net&gt;.
+	  [ruby-core:07423]
+
+Fri Mar	 3 17:59:00 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (rb_clear_cache_by_class): clearing wrong cache.
+
+Fri Mar	 3 21:22:42 2006  Tanaka Akira	&lt;akr@m17n.org&gt;
 
 	* lib/fileutils.rb (FileUtils.cp_r): implement :remove_destination
 	  option.
 
 	* ext/extmk.rb: use :remove_destination to install extension libraries
-	  to avoid SEGV.
-	  [ruby-dev:28417]
+	  to avoid SEGV.  [ruby-dev:28417]
 
-Fri Mar  3 14:41:04 2006  Minero Aoki  &lt;aamine@loveruby.net&gt;
+Fri Mar	 3 14:41:04 2006  Minero Aoki  &lt;aamine@loveruby.net&gt;
 
 	* ext/dl/.cvsignore: ignore callback.h.
 
@@ -451,7 +786,40 @@ Fri Mar  3 14:41:04 2006  Minero Aoki  &lt;aamine@loveruby.net&gt;
 
 	* ext/socket/.cvsignore: ignore constants.h.
 
-Thu Mar  2 17:54:45 2006  Hirokazu Yamamoto  &lt;ocean@m2.ccsnet.ne.jp&gt;
+Thu Mar	 2 18:58:18 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (rb_thread_fd_writable): should not re-schedule output
+	  from KILLED thread (must be error printing).
+
+Thu Mar	 2 09:12:05 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* array.c (rb_ary_flatten_bang): allow specifying recursion
+	  level.  [ruby-talk:182170]
+
+	* array.c (rb_ary_flatten): ditto.
+
+Thu Mar	 2 08:02:42 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* gc.c (add_heap): a heap_slots may overflow.  a patch from Stefan
+	  Weil &lt;weil at mail.berlios.de&gt;.
+
+Wed Mar	 1 17:13:37 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (rb_call): use separate cache for fcall/vcall
+	  invocation.
+
+	* eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local
+	  functions.
+
+	* eval.c (rb_mod_local): a new method to specify newly added
+	  visibility &quot;local&quot;.
+
+	* eval.c (search_method): search for local methods which are
+	  visible only from the current class.
+
+	* class.c (rb_class_local_methods): a method to list local methods.
+
+Thu Mar	 2 17:54:45 2006  Hirokazu Yamamoto  &lt;ocean@m2.ccsnet.ne.jp&gt;
 
 	* gc.c: commited magic for reducing RVALUE size on windows. (24-&gt;20byte)
 	  [ruby-core:7474]
@@ -476,6 +844,16 @@ Wed Mar  1 00:15:51 2006  Hirokazu Yamamoto  &lt;ocean@m2.ccsnet.ne.jp&gt;
 	  merged Mr. Ishizuka's lib/irb/ruby-lex.rb 's patch rev 1.29.
 	  [ruby-talk:181631] [ruby-dev:28404]
 
+Tue Feb 28 19:32:14 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* object.c (Init_Object): add BasicObject class as a top level
+	  BlankSlate class.
+
+Mon Feb 27 00:19:16 2006  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* ruby.h (SYM2ID): should not cast to signed long.
+	  [ruby-core:07414]
+
 Fri Feb 24 20:21:38 2006  Masatoshi SEKI  &lt;m_seki@mva.biglobe.ne.jp&gt;
 
 	* test/drb/drbtest.rb (add_service_command): quote pathnames in the</diff>
      <filename>ChangeLog</filename>
    </modified>
    <modified>
      <diff>@@ -330,17 +330,30 @@ of the innermost method (which is defined by Ruby) can be accessed.
 
 2.2.2 ID or Symbol
 
-You can invoke methods directly, without parsing the string.  First I
-need to explain about symbols (whose data type is ID).  ID is the
-integer number to represent Ruby's identifiers such as variable names.
-It can be accessed from Ruby in the form:
+You can invoke methods directly, without parsing the string.  First I need
+to explain about ID.  ID is the integer number to represent Ruby's
+identifiers such as variable names.  The Ruby data type corresponding to ID
+is Symbol.  It can be accessed from Ruby in the form:
 
  :Identifier
 
-You can get the symbol value from a string within C code by using
+You can get the ID value from a string within C code by using
 
   rb_intern(const char *name)
 
+You can retrieve ID from Ruby object (Symbol or String) given as an
+argument by using
+
+  rb_to_id(VALUE symbol)
+
+You can convert C ID to Ruby Symbol by using
+
+  VALUE ID2SYM(ID id)
+
+and to convert Ruby Symbol object to ID, use
+
+  ID SYM2ID(VALUE symbol)
+
 2.2.3 Invoke Ruby method from C
 
 To invoke methods directly, you can use the function below</diff>
      <filename>README.EXT</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@
 #include &quot;st.h&quot;
 #include &quot;node.h&quot;
 
-VALUE rb_cArray, rb_cValues;
+VALUE rb_cArray;
 
 static ID id_cmp;
 
@@ -169,38 +169,6 @@ rb_ary_new4(long n, const VALUE *elts)
     return ary;
 }
 
-VALUE
-rb_values_new(long n, ...)
-{
-    va_list ar;
-    VALUE val;
-    long i;
-
-    val = ary_new(rb_cValues, n);
-    va_start(ar, n);
-    for (i=0; i&lt;n; i++) {
-	RARRAY(val)-&gt;ptr[i] = va_arg(ar, VALUE);
-    }
-    va_end(ar);
-    RARRAY(val)-&gt;len = n;
-
-    return val;
-}
-
-VALUE
-rb_values_new2(long n, const VALUE *elts)
-{
-    VALUE val;
-
-    val = ary_new(rb_cValues, n);
-    if (n &gt; 0 &amp;&amp; elts) {
-	RARRAY(val)-&gt;len = n;
-	MEMCPY(RARRAY(val)-&gt;ptr, elts, VALUE, n);
-    }
-
-    return val;
-}
-
 static VALUE
 ary_make_shared(VALUE ary)
 {
@@ -235,21 +203,9 @@ ary_shared_array(VALUE klass, VALUE ary)
 }
 
 VALUE
-rb_values_from_ary(VALUE ary)
-{
-    return ary_shared_array(rb_cValues, ary);
-}
-
-VALUE
-rb_ary_from_values(VALUE val)
-{
-    return ary_shared_array(rb_cArray, val);
-}
-
-VALUE
 rb_assoc_new(VALUE car, VALUE cdr)
 {
-    return rb_values_new(2, car, cdr);
+    return rb_ary_new3(2, car, cdr);
 }
 
 static VALUE
@@ -2099,7 +2055,7 @@ static VALUE
 rb_ary_fill(int argc, VALUE *argv, VALUE ary)
 {
     VALUE item, arg1, arg2;
-    long beg, end, len;
+    long beg = 0, end = 0, len = 0;
     VALUE *p, *pend;
     int block_p = Qfalse;
 
@@ -2739,27 +2695,30 @@ rb_ary_nitems(VALUE ary)
 }
 
 static long
-flatten(VALUE ary, long idx, VALUE ary2, VALUE memo)
+flatten(VALUE ary, long idx, VALUE ary2, VALUE memo, int level)
 {
     VALUE id;
     long i = idx;
     long n, lim = idx + RARRAY(ary2)-&gt;len;
 
+    level--;
     id = rb_obj_id(ary2);
     if (rb_ary_includes(memo, id)) {
 	rb_raise(rb_eArgError, &quot;tried to flatten recursive array&quot;);
     }
     rb_ary_push(memo, id);
     rb_ary_splice(ary, idx, 1, ary2);
-    while (i &lt; lim) {
-	VALUE tmp;
-
-	tmp = rb_check_array_type(rb_ary_elt(ary, i));
-	if (!NIL_P(tmp)) {
-	    n = flatten(ary, i, tmp, memo);
-	    i += n; lim += n;
+    if (level != 0) {
+	while (i &lt; lim) {
+	    VALUE tmp;
+
+	    tmp = rb_check_array_type(rb_ary_elt(ary, i));
+	    if (!NIL_P(tmp)) {
+		n = flatten(ary, i, tmp, memo, level);
+		i += n; lim += n;
+	    }
+	    i++;
 	}
-	i++;
     }
     rb_ary_pop(memo);
 
@@ -2768,25 +2727,34 @@ flatten(VALUE ary, long idx, VALUE ary2, VALUE memo)
 
 /*
  *  call-seq:
- *     array.flatten! -&gt; array or nil
+ *     array.flatten!        -&gt; array or nil
+ *     array.flatten!(level) -&gt; array or nil
  *  
  *  Flattens _self_ in place.
  *  Returns &lt;code&gt;nil&lt;/code&gt; if no modifications were made (i.e.,
- *  &lt;i&gt;array&lt;/i&gt; contains no subarrays.)
+ *  &lt;i&gt;array&lt;/i&gt; contains no subarrays.)  If the optional &lt;i&gt;level&lt;/i&gt;
+ *  argument determins the level of recursion to flatten.
  *     
  *     a = [ 1, 2, [3, [4, 5] ] ]
- *     a.flatten!   #=&gt; [1, 2, 3, 4, 5]
- *     a.flatten!   #=&gt; nil
- *     a            #=&gt; [1, 2, 3, 4, 5]
+ *     a.flatten!    #=&gt; [1, 2, 3, 4, 5]
+ *     a.flatten!    #=&gt; nil
+ *     a             #=&gt; [1, 2, 3, 4, 5]
+ *     a = [ 1, 2, [3, [4, 5] ] ]
+ *     a.flatten!(1) #=&gt; [1, 2, 3, [4, 5]]
  */
 
 static VALUE
-rb_ary_flatten_bang(VALUE ary)
+rb_ary_flatten_bang(int argc, VALUE *argv, VALUE ary)
 {
     long i = 0;
     int mod = 0;
+    int level = -1;
     VALUE memo = Qnil;
+    VALUE lv;
 
+    rb_scan_args(argc, argv, &quot;01&quot;, &amp;lv);
+    if (!NIL_P(lv)) level = FIX2INT(lv);
+    if (level == 0) return ary;
     while (i&lt;RARRAY(ary)-&gt;len) {
 	VALUE ary2 = RARRAY(ary)-&gt;ptr[i];
 	VALUE tmp;
@@ -2796,7 +2764,7 @@ rb_ary_flatten_bang(VALUE ary)
 	    if (NIL_P(memo)) {
 		memo = rb_ary_new();
 	    }
-	    i += flatten(ary, i, tmp, memo);
+	    i += flatten(ary, i, tmp, memo, level);
 	    mod = 1;
 	}
 	i++;
@@ -2808,22 +2776,26 @@ rb_ary_flatten_bang(VALUE ary)
 /*
  *  call-seq:
  *     array.flatten -&gt; an_array
+ *     array.flatten(level) -&gt; an_array
  *  
  *  Returns a new array that is a one-dimensional flattening of this
  *  array (recursively). That is, for every element that is an array,
- *  extract its elements into the new array.
+ *  extract its elements into the new array.  If the optional
+ *  &lt;i&gt;level&lt;/i&gt; argument determins the level of recursion to flatten.
  *     
  *     s = [ 1, 2, 3 ]           #=&gt; [1, 2, 3]
  *     t = [ 4, 5, 6, [7, 8] ]   #=&gt; [4, 5, 6, [7, 8]]
  *     a = [ s, t, 9, 10 ]       #=&gt; [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10]
  *     a.flatten                 #=&gt; [1, 2, 3, 4, 5, 6, 7, 8, 9, 10
+ *     a = [ 1, 2, [3, [4, 5] ] ]
+ *     a.flatten(1)              #=&gt; [1, 2, 3, [4, 5]]
  */
 
 static VALUE
-rb_ary_flatten(VALUE ary)
+rb_ary_flatten(int argc, VALUE *argv, VALUE ary)
 {
     ary = rb_ary_dup(ary);
-    rb_ary_flatten_bang(ary);
+    rb_ary_flatten_bang(argc, argv, ary);
     return ary;
 }
 
@@ -2918,11 +2890,9 @@ Init_Array(void)
     rb_define_method(rb_cArray, &quot;uniq!&quot;, rb_ary_uniq_bang, 0);
     rb_define_method(rb_cArray, &quot;compact&quot;, rb_ary_compact, 0);
     rb_define_method(rb_cArray, &quot;compact!&quot;, rb_ary_compact_bang, 0);
-    rb_define_method(rb_cArray, &quot;flatten&quot;, rb_ary_flatten, 0);
-    rb_define_method(rb_cArray, &quot;flatten!&quot;, rb_ary_flatten_bang, 0);
+    rb_define_method(rb_cArray, &quot;flatten&quot;, rb_ary_flatten, -1);
+    rb_define_method(rb_cArray, &quot;flatten!&quot;, rb_ary_flatten_bang, -1);
     rb_define_method(rb_cArray, &quot;nitems&quot;, rb_ary_nitems, 0);
 
     id_cmp = rb_intern(&quot;&lt;=&gt;&quot;);
-
-    rb_cValues  = rb_define_class(&quot;Values&quot;, rb_cArray);
 }</diff>
      <filename>array.c</filename>
    </modified>
    <modified>
      <diff>@@ -406,7 +406,7 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
     len *= strlen(str)*sizeof(char);
 
     if (len &lt;= (sizeof(VALUE)*CHAR_BIT)) {
-	unsigned long val = strtoul((char*)str, &amp;end, base);
+	unsigned long val = strtoul(str, &amp;end, base);
 
 	if (*end == '_') goto bigparse;
 	if (badcheck) {
@@ -516,7 +516,7 @@ rb_str_to_inum(VALUE str, int base, int badcheck)
 
 #if HAVE_LONG_LONG
 
-VALUE
+static VALUE
 rb_ull2big(unsigned LONG_LONG n)
 {
     BDIGIT_DBL num = n;
@@ -537,7 +537,7 @@ rb_ull2big(unsigned LONG_LONG n)
     return big;
 }
 
-VALUE
+static VALUE
 rb_ll2big(LONG_LONG n)
 {
     long neg = 0;
@@ -595,10 +595,10 @@ rb_big2str(VALUE x, int base)
     if (FIXNUM_P(x)) {
 	return rb_fix2str(x, base);
     }
-    i = RBIGNUM(x)-&gt;len;
     if (BIGZEROP(x)) {
 	return rb_str_new2(&quot;0&quot;);
     }
+    i = RBIGNUM(x)-&gt;len;
     j = SIZEOF_BDIGITS*CHAR_BIT*i;
     switch (base) {
       case 2: break;
@@ -1546,6 +1546,11 @@ rb_big_pow(VALUE x, VALUE y)
 	if (yy &gt; 0) {
 	    VALUE z = x;
 
+	    if (RBIGNUM(x)-&gt;len * SIZEOF_BDIGITS * yy &gt; 1024*1024) {
+		rb_warn(&quot;in a**b, b may be too big&quot;);
+		d = (double)yy;
+		break;
+	    }
 	    for (;;) {
 		yy -= 1;
 		if (yy == 0) break;</diff>
      <filename>bignum.c</filename>
    </modified>
    <modified>
      <diff>@@ -344,7 +344,7 @@ include_class_new(VALUE module, VALUE super)
 void
 rb_include_module(VALUE klass, VALUE module)
 {
-    VALUE p, c;
+    VALUE c;
     int changed = 0;
 
     rb_frozen_class_p(klass);
@@ -362,30 +362,11 @@ rb_include_module(VALUE klass, VALUE module)
     OBJ_INFECT(klass, module);
     c = klass;
     while (module) {
-	int superclass_seen = Qfalse;
-
 	if (RCLASS(klass)-&gt;m_tbl == RCLASS(module)-&gt;m_tbl)
 	    rb_raise(rb_eArgError, &quot;cyclic include detected&quot;);
-	/* ignore if the module included already in superclasses */
-	for (p = RCLASS(klass)-&gt;super; p; p = RCLASS(p)-&gt;super) {
-	    switch (BUILTIN_TYPE(p)) {
-	      case T_ICLASS:
-		if (RCLASS(p)-&gt;m_tbl == RCLASS(module)-&gt;m_tbl) {
-		    if (!superclass_seen) {
-			c = p;	/* move insertion point */
-		    }
-		    goto skip;
-		}
-		break;
-	      case T_CLASS:
-		superclass_seen = Qtrue;
-		break;
-	    }
-	}
 	RCLASS(c)-&gt;super = include_class_new(module, RCLASS(c)-&gt;super);
 	c = RCLASS(c)-&gt;super;
 	changed = 1;
-      skip:
 	module = RCLASS(module)-&gt;super;
     }
     if (changed) rb_clear_cache();
@@ -500,6 +481,7 @@ ins_methods_push(ID name, long type, VALUE ary, long visi)
       case NOEX_PRIVATE:
       case NOEX_PROTECTED:
       case NOEX_PUBLIC:
+      case NOEX_LOCAL:
 	visi = (type == visi);
 	break;
       default:
@@ -537,6 +519,12 @@ ins_methods_pub_i(ID name, long type, VALUE ary)
 }
 
 static int
+ins_methods_local_i(ID name, long type, VALUE ary)
+{
+    return ins_methods_push(name, type, ary, NOEX_LOCAL);
+}
+
+static int
 method_entry(ID key, NODE *body, st_table *list)
 {
     long type;
@@ -668,6 +656,19 @@ rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
 
 /*
  *  call-seq:
+ *     mod.local_methods   =&gt; array
+ *  
+ *  Returns a list of the local methods defined in &lt;i&gt;mod&lt;/i&gt;.
+ */
+
+VALUE
+rb_class_local_methods(VALUE mod)
+{
+    return class_instance_method_list(0, 0, mod, ins_methods_local_i);
+}
+
+/*
+ *  call-seq:
  *     obj.singleton_methods(all=true)    =&gt; array
  *  
  *  Returns an array of the names of singleton methods for &lt;i&gt;obj&lt;/i&gt;.</diff>
      <filename>class.c</filename>
    </modified>
    <modified>
      <diff>@@ -509,7 +509,7 @@ AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall chroot fsync getcwd
 	      getpgrp setpgrp getpgid setpgid initgroups getgroups setgroups\
 	      getpriority getrlimit setrlimit\
 	      dlopen sigprocmask sigaction _setjmp vsnprintf snprintf\
-	      setsid telldir seekdir fchmod mktime timegm cosh sinh tanh\
+	      setsid telldir seekdir fchmod mktime timegm cosh sinh tanh log2\
 	      setuid setgid daemon select_large_fdset setenv unsetenv)
 AC_ARG_ENABLE(setreuid,
        [  --enable-setreuid       use setreuid()/setregid() according to need even if obsolete.],
@@ -1265,8 +1265,6 @@ if test &quot;$enable_shared&quot; = 'yes'; then
 	LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY) lib$(RUBY_SO_NAME).so'
 	if test &quot;$GCC&quot; = yes; then
 	    LIBRUBY_DLDFLAGS=&quot;$DLDFLAGS &quot;'-Wl,-h,$(@F)'
-	else
-	    enable_rpath=no
 	fi
 	XLDFLAGS=&quot;$XLDFLAGS &quot;'-R${libdir}'
  	;;
@@ -1307,7 +1305,11 @@ if test &quot;$enable_shared&quot; = 'yes'; then
   esac
 fi
 if test &quot;$enable_rpath&quot; = yes; then
-    LIBRUBYARG_SHARED='-Wl,-R -Wl,$(libdir) -L$(libdir) -L. '&quot;$LIBRUBYARG_SHARED&quot;
+    if test &quot;$GCC&quot; = yes; then
+       LIBRUBYARG_SHARED='-Wl,-R -Wl,$(libdir) -L$(libdir) -L. '&quot;$LIBRUBYARG_SHARED&quot;
+    else
+       LIBRUBYARG_SHARED='-R $(libdir) -L$(libdir) -L. '&quot;$LIBRUBYARG_SHARED&quot;
+    fi
 fi
 
 XLDFLAGS=&quot;$XLDFLAGS -L.&quot;</diff>
      <filename>configure.in</filename>
    </modified>
    <modified>
      <diff>@@ -441,7 +441,16 @@ dir_closed(void)
     rb_raise(rb_eIOError, &quot;closed directory&quot;);
 }
 
+static void
+dir_check(VALUE dir)
+{
+    if (!OBJ_TAINTED(dir) &amp;&amp; rb_safe_level() &gt;= 4)
+	rb_raise(rb_eSecurityError, &quot;Insecure: operation on untainted Dir&quot;);
+    rb_check_frozen(dir);
+}
+
 #define GetDIR(obj, dirp) do {\
+    dir_check(dir);\
     Data_Get_Struct(obj, struct dir_data, dirp);\
     if (dirp-&gt;dir == NULL) dir_closed();\
 } while (0)
@@ -647,6 +656,9 @@ dir_rewind(VALUE dir)
 {
     struct dir_data *dirp;
 
+    if (rb_safe_level() &gt;= 4 &amp;&amp; !OBJ_TAINTED(dir)) {
+	rb_raise(rb_eSecurityError, &quot;Insecure: can't close&quot;);
+    }
     GetDIR(dir, dirp);
     rewinddir(dirp-&gt;dir);
     return dir;
@@ -903,9 +915,15 @@ dir_s_rmdir(VALUE obj, VALUE dir)
     return INT2FIX(0);
 }
 
+static void
+sys_warning_1(const char* mesg)
+{
+    rb_sys_warning(&quot;%s&quot;, mesg);
+}
+
 #define GLOB_VERBOSE	(1 &lt;&lt; (sizeof(int) * CHAR_BIT - 1))
 #define sys_warning(val) \
-    ((flags &amp; GLOB_VERBOSE) &amp;&amp; rb_protect((VALUE (*)(VALUE))rb_sys_warning, (VALUE)(val), 0))
+    ((flags &amp; GLOB_VERBOSE) &amp;&amp; rb_protect((VALUE (*)_((VALUE)))sys_warning_1, (VALUE)(val), 0))
 
 /* System call with warning */
 static int</diff>
      <filename>dir.c</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@ static VALUE
 proc_call(VALUE proc, VALUE args)
 {
     if (TYPE(args) != T_ARRAY) {
-	args = rb_values_new(1, args);
+	args = rb_ary_new3(1, args);
     }
     return rb_proc_call(proc, args);
 }</diff>
      <filename>enumerator.c</filename>
    </modified>
    <modified>
      <diff>@@ -209,7 +209,7 @@ rb_check_type(VALUE x, int 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;;
@@ -434,7 +434,7 @@ static VALUE
 check_backtrace(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);
@@ -683,7 +683,7 @@ name_err_mesg_to_str(VALUE 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];
@@ -828,7 +828,7 @@ syserr_initialize(int argc, VALUE *argv, VALUE 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>@@ -236,7 +236,7 @@ typedef jmp_buf rb_jmpbuf_t;
 
 VALUE rb_cProc;
 static VALUE rb_cBinding;
-static VALUE proc_invoke(VALUE,VALUE,VALUE,VALUE);
+static VALUE proc_invoke(VALUE,VALUE,VALUE,VALUE,int);
 static VALUE proc_lambda(void);
 static VALUE rb_f_binding(VALUE);
 static void rb_f_END(void);
@@ -253,7 +253,8 @@ static int vis_mode;
 #define VIS_PRIVATE   1
 #define VIS_PROTECTED 2
 #define VIS_MODFUNC   5
-#define VIS_MASK      7
+#define VIS_LOCAL     8
+#define VIS_MASK     16
 #define VIS_SET(f)  (vis_mode=(f))
 #define VIS_TEST(f) (vis_mode&amp;(f))
 #define VIS_MODE()  (vis_mode)
@@ -316,9 +317,9 @@ rb_check_safe_str(VALUE x)
     }
 }
 
-NORETURN(static void print_undef(VALUE, ID));
+NORETURN(static void raise_undef(VALUE, ID));
 static void
-print_undef(VALUE klass, ID id)
+raise_undef(VALUE klass, ID id)
 {
     rb_name_error(id, &quot;undefined method `%s' for %s `%s'&quot;,
 		  rb_id2name(id),
@@ -332,7 +333,7 @@ static ID removed, singleton_removed, undefined, singleton_undefined;
 #define CACHE_MASK 0x7ff
 #define EXPR1(c,m) ((((c)&gt;&gt;3)^(m))&amp;CACHE_MASK)
 
-struct cache_entry {		/* method hash table. */
+struct cache_entry {	        /* method hash table. */
     ID mid;			/* method's id */
     ID mid0;			/* method's original id */
     VALUE klass;		/* receiver's class */
@@ -341,64 +342,65 @@ struct cache_entry {		/* method hash table. */
     int noex;
 };
 
-static struct cache_entry cache[CACHE_SIZE];
+static struct cache_entry cache[2][CACHE_SIZE];
 static int ruby_running = 0;
 
 void
-rb_clear_cache(void)
+rb_clear_cache()
 {
-   struct cache_entry *ent, *end;
+    int i;
 
     if (!ruby_running) return;
-    ent = cache; end = ent + CACHE_SIZE;
-    while (ent &lt; end) {
-	ent-&gt;mid = 0;
-	ent++;
+    for (i=0; i&lt;CACHE_SIZE; i++) {
+	cache[0][i].mid = cache[1][i].mid = 0;
     }
 }
 
 static void
-rb_clear_cache_for_undef(VALUE klass, ID id)
+rb_clear_cache_for_remove(VALUE klass, ID id)
 {
-    struct cache_entry *ent, *end;
+    int i, j;
 
     if (!ruby_running) return;
-    ent = cache; end = ent + CACHE_SIZE;
-    while (ent &lt; end) {
-	if (ent-&gt;origin == klass &amp;&amp; ent-&gt;mid == id) {
-	    ent-&gt;mid = 0;
+    for (i=0; i&lt;CACHE_SIZE; i++) {
+	for (j=0; j&lt;2; j++) {
+	    struct cache_entry *ent = cache[j]+i;
+	    if (ent-&gt;origin == klass &amp;&amp; ent-&gt;mid == id) {
+		ent-&gt;mid = 0;
+	    }
 	}
-	ent++;
     }
 }
 
 static void
 rb_clear_cache_by_id(ID id)
 {
-    struct cache_entry *ent, *end;
+    int i, j;
 
     if (!ruby_running) return;
-    ent = cache; end = ent + CACHE_SIZE;
-    while (ent &lt; end) {
-	if (ent-&gt;mid == id) {
-	    ent-&gt;mid = 0;
+    for (i=0; i&lt;CACHE_SIZE; i++) {
+	for (j=0; j&lt;2; j++) {
+	    struct cache_entry *ent = cache[j]+i;
+	    if (ent-&gt;mid == id) {
+		ent-&gt;mid = 0;
+	    }
 	}
-	ent++;
     }
 }
 
 void
 rb_clear_cache_by_class(VALUE klass)
 {
-    struct cache_entry *ent, *end;
+    int i, j;
 
     if (!ruby_running) return;
-    ent = cache; end = ent + CACHE_SIZE;
-    while (ent &lt; end) {
-	if (ent-&gt;klass == klass || ent-&gt;origin == klass) {
-	    ent-&gt;mid = 0;
+    for (i=0; i&lt;CACHE_SIZE; i++) {
+	for (j=0; j&lt;2; j++) {
+	    struct cache_entry *ent = cache[j]+i;
+	    if (ent-&gt;klass == klass || ent-&gt;origin == klass) {
+		ent-&gt;mid = 0;
+	    }
 	}
-	ent++;
     }
 }
 
@@ -406,8 +408,8 @@ static ID init, eqq, each, aref, aset, match, missing;
 static ID added, singleton_added;
 static ID __id__, __send__, respond_to;
 
-#define NOEX_SAFE(n) ((n) &gt;&gt; 4)
-#define NOEX_WITH(n, v) ((n) | (v) &lt;&lt; 4)
+#define NOEX_SAFE(n) ((n) &gt;&gt; 5)
+#define NOEX_WITH(n, v) ((n) | (v) &lt;&lt; 5)
 #define NOEX_WITH_SAFE(n) NOEX_WITH(n, ruby_safe_level)
 
 void
@@ -458,19 +460,30 @@ rb_undef_alloc_func(VALUE klass)
     rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, 0, NOEX_UNDEF);
 }
 
+#define LOOKUP_NORMAL 0
+#define LOOKUP_FCALL  1
+#define LOOKUP_NOSKIP 2
+
 static NODE*
-search_method(VALUE klass, ID id, VALUE *origin)
+search_method(VALUE klass, ID id, VALUE *origin, int flag)
 {
     NODE *body;
 
-    if (!klass) return 0;
-    while (!st_lookup(RCLASS(klass)-&gt;m_tbl, id, (st_data_t *)&amp;body)) {
-	klass = RCLASS(klass)-&gt;super;
-	if (!klass) return 0;
+    if (flag == LOOKUP_FCALL &amp;&amp; ruby_frame-&gt;this_class) {
+	if (st_lookup(RCLASS(ruby_frame-&gt;this_class)-&gt;m_tbl, id, (st_data_t *)&amp;body) &amp;&amp;
+	    body-&gt;nd_noex == NOEX_LOCAL) {
+	    if (origin) *origin = ruby_frame-&gt;this_class;
+	    return body;
+	}
     }
-
-    if (origin) *origin = klass;
-    return body;
+    for (;klass; klass = RCLASS(klass)-&gt;super) {
+	if (st_lookup(RCLASS(klass)-&gt;m_tbl, id, (st_data_t *)&amp;body) &amp;&amp;
+	    (flag == LOOKUP_NOSKIP || body-&gt;nd_noex != NOEX_LOCAL)) {
+	    if (origin) *origin = klass;
+	    return body;
+	}
+    }
+    return 0;
 }
 
 static NODE*
@@ -481,10 +494,11 @@ rb_get_method_body(VALUE *klassp, ID *idp, int *noexp)
     VALUE origin;
     NODE * volatile body;
     struct cache_entry *ent;
+    int noex = *noexp;
 
-    if ((body = search_method(klass, id, &amp;origin)) == 0 || !body-&gt;nd_body) {
+    if ((body = search_method(klass, id, &amp;origin, noex)) == 0 || !body-&gt;nd_body) {
 	/* store empty info in cache */
-	ent = cache + EXPR1(klass, id);
+	ent = cache[noex] + EXPR1(klass, id);
 	ent-&gt;klass  = klass;
 	ent-&gt;origin = klass;
 	ent-&gt;mid = ent-&gt;mid0 = id;
@@ -496,9 +510,9 @@ rb_get_method_body(VALUE *klassp, ID *idp, int *noexp)
 
     if (ruby_running) {
 	/* store in cache */
-	ent = cache + EXPR1(klass, id);
-	ent-&gt;klass  = klass;
-	ent-&gt;noex   = body-&gt;nd_noex;
+	ent = cache[noex] + EXPR1(klass, id);
+	ent-&gt;klass = klass;
+	ent-&gt;noex = body-&gt;nd_noex;
 	if (noexp) *noexp = body-&gt;nd_noex;
 	body = body-&gt;nd_body;
 	if (nd_type(body) == NODE_FBODY) {
@@ -534,10 +548,10 @@ rb_get_method_body(VALUE *klassp, ID *idp, int *noexp)
 NODE*
 rb_method_node(VALUE klass, ID id)
 {
-    int noex;
+    int noex = 0;
     struct cache_entry *ent;
 
-    ent = cache + EXPR1(klass, id);
+    ent = cache[0] + EXPR1(klass, id);
     if (ent-&gt;mid == id &amp;&amp; ent-&gt;klass == klass &amp;&amp; ent-&gt;method){
 	return ent-&gt;method;
     }
@@ -565,7 +579,7 @@ remove_method(VALUE klass, ID mid)
 	rb_name_error(mid, &quot;method `%s' not defined in %s&quot;,
 		      rb_id2name(mid), rb_class2name(klass));
     }
-    rb_clear_cache_for_undef(klass, mid);
+    rb_clear_cache_for_remove(klass, mid);
     if (FL_TEST(klass, FL_SINGLETON)) {
 	rb_funcall(rb_iv_get(klass, &quot;__attached__&quot;), singleton_removed, 1, ID2SYM(mid));
     }
@@ -623,12 +637,12 @@ rb_export_method(VALUE klass, ID name, ID noex)
     if (klass == rb_cObject) {
 	rb_secure(4);
     }
-    body = search_method(klass, name, &amp;origin);
+    body = search_method(klass, name, &amp;origin, LOOKUP_NOSKIP);
     if (!body &amp;&amp; TYPE(klass) == T_MODULE) {
-	body = search_method(rb_cObject, name, &amp;origin);
+	body = search_method(rb_cObject, name, &amp;origin, LOOKUP_NOSKIP);
     }
     if (!body || !body-&gt;nd_body) {
-	print_undef(klass, name);
+	raise_undef(klass, name);
     }
     if (body-&gt;nd_noex != noex) {
 	if (klass == origin) {
@@ -640,38 +654,52 @@ rb_export_method(VALUE klass, ID name, ID noex)
     }
 }
 
-int
-rb_method_boundp(VALUE klass, ID id, int ex)
+static int
+method_exists(VALUE klass, ID id, int noex)
 {
     struct cache_entry *ent;
-    int noex;
+    int nx = noex;
 
-    /* is it in the method cache? */
-    ent = cache + EXPR1(klass, id);
-    if (ent-&gt;mid == id &amp;&amp; ent-&gt;klass == klass) {
-	if (ex &amp;&amp; (ent-&gt;noex &amp; NOEX_PRIVATE))
-	    return Qfalse;
-	if (!ent-&gt;method) return Qfalse;
-	return Qtrue;
-    }
-    if (rb_get_method_body(&amp;klass, &amp;id, &amp;noex)) {
-	if (ex &amp;&amp; (noex &amp; NOEX_PRIVATE))
-	    return Qfalse;
-	return Qtrue;
+    switch (noex) {
+      case LOOKUP_NORMAL:
+      case LOOKUP_FCALL:
+	/* is it in the method cache? */
+	ent = cache[noex] + EXPR1(klass, id);
+	if (ent-&gt;mid == id &amp;&amp; ent-&gt;klass == klass) {
+	    if (nx == LOOKUP_NORMAL) {
+		if (ent-&gt;noex == NOEX_PRIVATE) return Qfalse;
+	    }
+	    else if (ent-&gt;noex != NOEX_LOCAL) {
+		if (!ent-&gt;method) return Qfalse;
+		return Qtrue;
+	    }
+	}
+	/* fall through */
+      default:
+	if (rb_get_method_body(&amp;klass, &amp;id, &amp;noex)) {
+	    if (nx == LOOKUP_NORMAL &amp;&amp; noex == NOEX_PRIVATE)
+		return Qfalse;
+	    return Qtrue;
+	}
+	return Qfalse;
     }
-    return Qfalse;
+}
+
+int
+rb_method_boundp(VALUE klass, ID id, int pub)
+{
+    return method_exists(klass, id, pub ? LOOKUP_NORMAL : LOOKUP_FCALL);
 }
 
 void
-rb_attr(VALUE klass, ID id, int read, int write, int ex)
+rb_attr(VALUE klass, ID id, int read, int write, int noex)
 {
     const char *name;
     char *buf;
     ID attriv;
-    int noex;
     size_t len;
 
-    if (!ex) noex = NOEX_PUBLIC;
+    if (!noex) noex = NOEX_PUBLIC;
     else {
 	if (VIS_TEST(VIS_PRIVATE)) {
 	    noex = NOEX_PRIVATE;
@@ -1017,7 +1045,7 @@ static VALUE rb_eval(VALUE,NODE*);
 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);
+static VALUE rb_yield_0(VALUE, VALUE, VALUE, int);
 
 #define YIELD_LAMBDA_CALL 1
 #define YIELD_PROC_CALL   2
@@ -1027,12 +1055,13 @@ static VALUE rb_yield_0(VALUE, VALUE, VALUE, int, int);
 
 typedef enum calling_scope {
     CALLING_NORMAL,
+    CALLING_FUNCALL,
     CALLING_FCALL,
     CALLING_VCALL,
     CALLING_SUPER,
 } calling_scope_t;
 
-static VALUE rb_call(VALUE,VALUE,ID,int,const VALUE*,struct BLOCK*,calling_scope_t);
+static VALUE rb_call(VALUE,VALUE,ID,int,const VALUE*,struct BLOCK*,calling_scope_t,int);
 static VALUE module_setup(VALUE,NODE*);
 
 static VALUE massign(VALUE,NODE*,VALUE,int);
@@ -1049,11 +1078,16 @@ static rb_event_hook_t *event_hooks;
 
 #define EXEC_EVENT_HOOK(event, node, self, id, klass) \
     do { \
-	rb_event_hook_t *hook; \
+	rb_event_hook_t *hook = event_hooks; \
+        rb_event_hook_func_t hook_func; \
+        rb_event_t events; \
 	\
-	for (hook = event_hooks; hook; hook = hook-&gt;next) { \
-	    if (hook-&gt;events &amp; event) \
-		(*hook-&gt;func)(event, node, self, id, klass); \
+	while (hook) { \
+            hook_func = hook-&gt;func; \
+            events = hook-&gt;events; \
+            hook = hook-&gt;next; \
+	    if (events &amp; event) \
+		(*hook_func)(event, node, self, id, klass); \
 	} \
     } while (0)
 
@@ -1112,7 +1146,20 @@ error_line(struct FRAME *frame, NODE *node)
 	    }
 	    else {
 		VALUE oklass = frame-&gt;this_class;
-
+		char *rec = 0;
+
+		switch (TYPE(frame-&gt;self)) {
+		  case T_NIL:
+		    rec = &quot;nil&quot;; break;
+		  case T_TRUE:
+		    rec = &quot;true&quot;; break;
+		  case T_FALSE:
+		    rec = &quot;false&quot;; break;
+		}
+		if (rec) {
+		    return rb_sprintf(&quot;%s:%d:in `%s.%s'&quot;, file, line, rec,
+				      rb_id2name(frame-&gt;this_func));
+		}
 		if (TYPE(oklass) == T_ICLASS) {
 		    oklass = RBASIC(oklass)-&gt;klass;
 		}
@@ -1638,9 +1685,9 @@ rb_eval_string_wrap(const char *str, int *state)
     return val;
 }
 
-NORETURN(static void localjump_error(const char*, VALUE, int));
+NORETURN(static void localjump_error(const char*, VALUE, int, VALUE));
 static void
-localjump_error(const char *mesg, VALUE value, int reason)
+localjump_error(const char *mesg, VALUE value, int reason, VALUE bt)
 {
     VALUE exc = rb_exc_new2(rb_eLocalJumpError, mesg);
     ID id;
@@ -1658,9 +1705,10 @@ localjump_error(const char *mesg, VALUE value, int reason)
       case TAG_RETURN:
 	id = rb_intern(&quot;return&quot;); break;
       default:
-	id = rb_intern(&quot;noreason&quot;); break;
+	id = rb_intern(&quot;yield&quot;); break;
     }
     rb_iv_set(exc, &quot;@reason&quot;, ID2SYM(id));
+    if (bt) set_backtrace(exc, bt);
     rb_exc_raise(exc);
 }
 
@@ -1681,7 +1729,7 @@ localjump_xvalue(VALUE exc)
  *    local_jump_error.reason   =&gt; symbol
  *
  * The reason this block was terminated:
- * :break, :redo, :retry, :next, :return, or :noreason.
+ * :break, :redo, :retry, :next, :return, or :yield.
  */
 
 static VALUE
@@ -1700,19 +1748,19 @@ jump_tag_but_local_jump(int state, VALUE val)
       case 0:
 	break;
       case TAG_RETURN:
-	localjump_error(&quot;unexpected return&quot;, val, state);
+	localjump_error(&quot;unexpected return&quot;, val, state, 0);
 	break;
       case TAG_BREAK:
-	localjump_error(&quot;unexpected break&quot;, val, state);
+	localjump_error(&quot;unexpected break&quot;, val, state, 0);
 	break;
       case TAG_NEXT:
-	localjump_error(&quot;unexpected next&quot;, val, state);
+	localjump_error(&quot;unexpected next&quot;, val, state, 0);
 	break;
       case TAG_REDO:
-	localjump_error(&quot;unexpected redo&quot;, Qnil, state);
+	localjump_error(&quot;unexpected redo&quot;, Qnil, state, 0);
 	break;
       case TAG_RETRY:
-	localjump_error(&quot;retry outside of rescue clause&quot;, Qnil, state);
+	localjump_error(&quot;retry outside of rescue clause&quot;, Qnil, state, 0);
 	break;
       default:
 	break;
@@ -1735,7 +1783,8 @@ rb_eval_cmd(VALUE cmd, VALUE arg, int level)
 	PUSH_TAG(PROT_NONE);
 	ruby_safe_level = level;
 	if ((state = EXEC_TAG()) == 0) {
-	    val = rb_funcall2(cmd, rb_intern(&quot;call&quot;), RARRAY(arg)-&gt;len, RARRAY(arg)-&gt;ptr);
+	    val = rb_funcall2(cmd, rb_intern(&quot;yield&quot;),
+			      RARRAY(arg)-&gt;len, RARRAY(arg)-&gt;ptr);
 	}
 	ruby_safe_level = safe;
 	POP_TAG();
@@ -1776,13 +1825,17 @@ ruby_current_class_object()
 static VALUE
 ev_const_defined(ID id, VALUE self)
 {
-    return rb_const_defined_fallback(ruby_cbase, id, ruby_cref-&gt;nd_next);
+    VALUE cbase = ruby_cbase;
+    if (NIL_P(cbase)) cbase = rb_obj_class(self);
+    return rb_const_defined_fallback(cbase, id, ruby_cref-&gt;nd_next);
 }
 
 static VALUE
 ev_const_get(ID id, VALUE self)
 {
-    return rb_const_get_fallback(ruby_cbase, id, ruby_cref-&gt;nd_next);
+    VALUE cbase = ruby_cbase;
+    if (NIL_P(cbase)) cbase = rb_obj_class(self);
+    return rb_const_get_fallback(cbase, id, ruby_cref-&gt;nd_next);
 }
 
 static VALUE
@@ -1860,7 +1913,7 @@ rb_mod_s_constants(void)
 	cbase = cbase-&gt;nd_next;
     }
 
-    if (!NIL_P(ruby_cbase)) {
+    if (NIL_P(ruby_cbase)) {
 	data = rb_mod_const_of(ruby_cbase, data);
     }
     return rb_const_list(data);
@@ -1869,7 +1922,7 @@ rb_mod_s_constants(void)
 void
 rb_frozen_class_p(VALUE klass)
 {
-    char *desc = &quot;something(?!)&quot;;
+    const char *desc = &quot;something(?!)&quot;;
 
     if (OBJ_FROZEN(klass)) {
 	if (FL_TEST(klass, FL_SINGLETON))
@@ -1903,9 +1956,9 @@ rb_undef(VALUE klass, ID id)
     if (id == __id__ || id == __send__ || id == init) {
 	rb_warn(&quot;undefining `%s' may cause serious problem&quot;, rb_id2name(id));
     }
-    body = search_method(klass, id, &amp;origin);
+    body = search_method(klass, id, &amp;origin, LOOKUP_NOSKIP);
     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)) {
@@ -2000,14 +2053,14 @@ rb_alias(VALUE klass, ID name, ID def)
     if (klass == rb_cObject) {
 	rb_secure(4);
     }
-    orig = search_method(klass, def, &amp;origin);
+    orig = search_method(klass, def, &amp;origin, LOOKUP_NOSKIP);
     if (!orig || !orig-&gt;nd_body) {
 	if (TYPE(klass) == T_MODULE) {
-	    orig = search_method(rb_cObject, def, &amp;origin);
+	    orig = search_method(rb_cObject, def, &amp;origin, LOOKUP_NOSKIP);
 	}
     }
     if (!orig || !orig-&gt;nd_body) {
-	print_undef(klass, def);
+	raise_undef(klass, def);
     }
     if (FL_TEST(klass, FL_SINGLETON)) {
 	singleton = rb_iv_get(klass, &quot;__attached__&quot;);
@@ -2027,7 +2080,8 @@ rb_alias(VALUE klass, ID name, ID def)
 	}
     }
     st_insert(RCLASS(klass)-&gt;m_tbl, name,
-      (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin), orig-&gt;nd_noex));
+	      (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin),
+				    NOEX_WITH_SAFE(orig-&gt;nd_noex)));
     if (singleton) {
 	rb_funcall(singleton, singleton_added, 1, ID2SYM(name));
     }
@@ -2092,17 +2146,21 @@ copy_node_scope(NODE *node, NODE *rval)
 # define TMP_ALLOC(n) ALLOCA_N(VALUE,n)
 #endif
 
-#define SETUP_ARGS0(anode,alen,extra) do {\
-    NODE *n = anode;\
+#define CALLARGS int argc; VALUE *argv; struct BLOCK *block = 0, _block;
+#define SETUP_ARGS0(anode,extra) do {\
+    NODE *n = anode, *bpass = 0;\
+    if (n &amp;&amp; nd_type(n) == NODE_BLOCK_PASS) {\
+        bpass = n;\
+        n = n-&gt;nd_head;\
+    }\
     if (!n) {\
 	argc = 0;\
 	argv = 0;\
     }\
     else if (nd_type(n) == NODE_ARRAY) {\
-	argc=alen;\
+	argc=n-&gt;nd_alen;\
 	if (argc &gt; 0) {\
 	    int i;\
-	    n = anode;\
 	    argv = TMP_ALLOC(argc+extra);\
 	    for (i=0;i&lt;argc;i++) {\
 		argv[i] = rb_eval(self,n-&gt;nd_head);\
@@ -2122,9 +2180,12 @@ copy_node_scope(NODE *node, NODE *rval)
 	argv = TMP_ALLOC(argc+extra);\
 	MEMCPY(argv, RARRAY(args)-&gt;ptr, VALUE, argc);\
     }\
+    if (bpass) {\
+	block = passing_block(rb_eval(self, bpass-&gt;nd_body), &amp;_block);\
+    }\
 } while (0)
 
-#define SETUP_ARGS(anode) SETUP_ARGS0(anode,anode-&gt;nd_alen,0)
+#define SETUP_ARGS(anode) SETUP_ARGS0(anode,0)
 
 #define ZSUPER_ARGS() do {\
     argc = ruby_frame-&gt;argc;\
@@ -2172,7 +2233,7 @@ static const char*
 is_defined(VALUE self, NODE *node /* OK */, char *buf, int noeval)
 {
     VALUE val;			/* OK */
-    int state;
+    int state, noex;
     static const char *ex = &quot;expression&quot;;
 
     if (!node) return ex;
@@ -2182,7 +2243,7 @@ is_defined(VALUE self, NODE *node /* OK */, char *buf, int noeval)
 	if (ruby_frame-&gt;this_func == 0) return 0;
 	else if (ruby_frame-&gt;this_class == 0) return 0;
 	val = ruby_frame-&gt;this_class;
-	if (rb_method_boundp(RCLASS(val)-&gt;super, ruby_frame-&gt;this_func, 0)) {
+	if (method_exists(RCLASS(val)-&gt;super, ruby_frame-&gt;this_func, LOOKUP_FCALL)) {
 	    if (nd_type(node) == NODE_SUPER) {
 		return arg_defined(self, node-&gt;nd_args, buf, &quot;super&quot;);
 	    }
@@ -2193,6 +2254,7 @@ is_defined(VALUE self, NODE *node /* OK */, char *buf, int noeval)
       case NODE_VCALL:
       case NODE_FCALL:
 	val = self;
+	noex = LOOKUP_FCALL;
 	goto check_bound;
 
       case NODE_ATTRASGN:
@@ -2201,26 +2263,21 @@ is_defined(VALUE self, NODE *node /* OK */, char *buf, int noeval)
       case NODE_CALL:
 	if (!is_defined(self, node-&gt;nd_recv, buf, Qtrue)) return 0;
 	if (noeval) return ex;
+	noex = LOOKUP_NORMAL;
 	val = rb_eval(self, node-&gt;nd_recv);
       check_bound:
 	{
-	    int call = nd_type(node)==NODE_CALL;
+	    ID id = node-&gt;nd_mid;
 
 	    val = CLASS_OF(val);
-	    if (call) {
-		int noex;
-		ID id = node-&gt;nd_mid;
-
-		if (!rb_get_method_body(&amp;val, &amp;id, &amp;noex))
-		    break;
-		if ((noex &amp; NOEX_PRIVATE))
-		    break;
+	    if (!rb_get_method_body(&amp;val, &amp;id, &amp;noex))
+		return 0;
+	    if (nd_type(node) == NODE_CALL) {
+		if ((noex &amp; NOEX_PRIVATE)) return 0;
 		if ((noex &amp; NOEX_PROTECTED) &amp;&amp;
 		    !rb_obj_is_kind_of(self, rb_class_real(val)))
-		    break;
+		    return 0;
 	    }
-	    else if (!rb_method_boundp(val, node-&gt;nd_mid, call))
-		break;
 	    return arg_defined(self, node-&gt;nd_args, buf,
 			       nd_type(node) == NODE_ATTRASGN ?
 			       &quot;assignment&quot; : &quot;method&quot;);
@@ -2303,7 +2360,7 @@ is_defined(VALUE self, NODE *node /* OK */, char *buf, int noeval)
 		return &quot;constant&quot;;
 	    break;
 	  default:
-	    if (rb_method_boundp(CLASS_OF(val), node-&gt;nd_mid, 1)) {
+	    if (rb_method_boundp(CLASS_OF(val), node-&gt;nd_mid, Qtrue)) {
 		return &quot;method&quot;;
 	    }
 	}
@@ -2374,6 +2431,7 @@ rb_add_event_hook(rb_event_hook_func_t func, rb_event_t events)
 int
 rb_remove_event_hook(rb_event_hook_func_t func)
 {
+
     rb_event_hook_t *prev, *hook;
 
     prev = NULL;
@@ -2535,7 +2593,7 @@ call_trace_func(rb_event_t event, NODE *node, VALUE self, ID id, VALUE klass /*
 					    id?ID2SYM(id):Qnil,
 					    self ? rb_f_binding(self) : Qnil,
 					    klass?klass:Qnil),
-		    Qundef, 0);
+		    Qundef, 0, 1);
     }
     if (raised) thread_set_raised();
     POP_TAG();
@@ -2548,31 +2606,6 @@ call_trace_func(rb_event_t event, NODE *node, VALUE self, ID id, VALUE klass /*
 }
 
 static VALUE
-avalue_to_svalue(VALUE v)
-{
-    VALUE tmp, top;
-
-    tmp = rb_check_array_type(v);
-    if (NIL_P(tmp)) {
-	return v;
-    }
-    if (RARRAY(tmp)-&gt;len == 0) {
-	return Qundef;
-    }
-    if (RARRAY(tmp)-&gt;len == 1) {
-	top = rb_check_array_type(RARRAY(tmp)-&gt;ptr[0]);
-	if (NIL_P(top)) {
-	    return RARRAY(tmp)-&gt;ptr[0];
-	}
-	if (RARRAY(top)-&gt;len &gt; 1) {
-	    return v;
-	}
-	return top;
-    }
-    return tmp;
-}
-
-static VALUE
 svalue_to_avalue(VALUE v)
 {
     VALUE tmp, top;
@@ -2582,52 +2615,10 @@ svalue_to_avalue(VALUE v)
     if (NIL_P(tmp)) {
 	return rb_ary_new3(1, v);
     }
-    if (RARRAY(tmp)-&gt;len == 1) {
-	top = rb_check_array_type(RARRAY(tmp)-&gt;ptr[0]);
-	if (!NIL_P(top) &amp;&amp; RARRAY(top)-&gt;len &gt; 1) {
-	    return tmp;
-	}
-	return rb_ary_new3(1, v);
-    }
-    return tmp;
-}
-
-static VALUE
-svalue_to_mrhs(VALUE v, NODE *lhs)
-{
-    VALUE tmp;
-
-    if (v == Qundef) return rb_values_new2(0, 0);
-    tmp = rb_check_array_type(v);
-    if (NIL_P(tmp)) {
-	return rb_values_new(1, v);
-    }
-    /* no lhs means splat lhs only */
-    if (!lhs) {
-	return rb_values_new(1, v);
-    }
     return tmp;
 }
 
 static VALUE
-avalue_splat(VALUE v)
-{
-    if (RARRAY(v)-&gt;len == 0) {
-	return Qundef;
-    }
-    if (RARRAY(v)-&gt;len == 1) {
-	return RARRAY(v)-&gt;ptr[0];
-    }
-    return v;
-}
-
-static VALUE
-splat_value(VALUE v)
-{
-    return rb_values_from_ary(rb_Array(v));
-}
-
-static VALUE
 class_prefix(VALUE self, NODE *cpath)
 {
     if (!cpath) {
@@ -2691,6 +2682,7 @@ rb_eval(VALUE self, NODE *n)
     NODE * volatile node = n;
     int state;
     volatile VALUE result = Qnil;
+    VALUE pushed_block = 0;
 
 #define RETURN(v) do { \
     result = (v); \
@@ -2962,8 +2954,6 @@ rb_eval(VALUE self, NODE *n)
       case NODE_LAMBDA:
 	PUSH_TAG(PROT_LOOP);
 	PUSH_FRAME(Qtrue);
-	ruby_frame-&gt;this_func = 0;
-	ruby_frame-&gt;this_class = 0;
 	PUSH_BLOCK(ruby_frame-&gt;block, node-&gt;nd_var, node-&gt;nd_body);
 	state = EXEC_TAG();
 	result = proc_lambda();
@@ -2993,18 +2983,13 @@ rb_eval(VALUE self, NODE *n)
 	break;
 
       case NODE_SPLAT:
-	result = splat_value(rb_eval(self, node-&gt;nd_head));
+	result = svalue_to_avalue(rb_eval(self, node-&gt;nd_head));
 	break;
 
       case NODE_TO_ARY:
 	result = rb_ary_to_ary(rb_eval(self, node-&gt;nd_head));
 	break;
 
-      case NODE_SVALUE:
-	result = avalue_splat(rb_eval(self, node-&gt;nd_head));
-	if (result == Qundef) result = Qnil;
-	break;
-
       case NODE_YIELD:
 	if (node-&gt;nd_head) {
 	    result = rb_eval(self, node-&gt;nd_head);
@@ -3014,7 +2999,7 @@ rb_eval(VALUE self, NODE *n)
 	    result = Qundef;	/* no arg */
 	}
 	SET_CURRENT_SOURCE();
-	result = rb_yield_0(result, 0, 0, 0, node-&gt;nd_state);
+	result = rb_yield_0(result, 0, 0, 0);
 	break;
 
       case NODE_RESCUE:
@@ -3160,7 +3145,7 @@ rb_eval(VALUE self, NODE *n)
       case NODE_ARGSCAT:
 	{
 	    VALUE args = rb_eval(self, node-&gt;nd_head);
-	    result = rb_ary_concat(args, splat_value(rb_eval(self, node-&gt;nd_body)));
+	    result = rb_ary_concat(args, svalue_to_avalue(rb_eval(self, node-&gt;nd_body)));
 	}
 	break;
 
@@ -3174,8 +3159,8 @@ rb_eval(VALUE self, NODE *n)
       case NODE_ATTRASGN:
 	{
 	    VALUE recv;
-	    int argc; VALUE *argv; /* used in SETUP_ARGS */
 	    calling_scope_t scope;
+	    CALLARGS;
 	    TMP_PROTECT;
 
 	    if (node-&gt;nd_recv == (NODE *)1) {
@@ -3190,7 +3175,7 @@ rb_eval(VALUE self, NODE *n)
 
 	    ruby_current_node = node;
 	    SET_CURRENT_SOURCE();
-	    rb_call(CLASS_OF(recv),recv,node-&gt;nd_mid,argc,argv,0,scope);
+	    rb_call(CLASS_OF(recv),recv,node-&gt;nd_mid,argc,argv,block,scope,0);
 	    result = argv[argc-1];
 	}
 	break;
@@ -3210,7 +3195,7 @@ rb_eval(VALUE self, NODE *n)
 		recv = rb_eval(self, node-&gt;nd_iter);
 		ruby_current_node = node;
 		SET_CURRENT_SOURCE();
-		result = rb_call(CLASS_OF(recv),recv,each,0,0,block,CALLING_NORMAL);
+		result = rb_call(CLASS_OF(recv),recv,each,0,0,block,CALLING_NORMAL,1);
 	    }
 	    else if (state == TAG_BREAK &amp;&amp; TAG_DST()) {
 		result = prot_tag-&gt;retval;
@@ -3226,69 +3211,14 @@ rb_eval(VALUE self, NODE *n)
 	}
 	break;
 
-      case NODE_BLOCK_PASS:
-	{
-	    VALUE recv = self;
-	    calling_scope_t scope;
-	    NODE *bpass = node;
-
-	    PUSH_TAG(PROT_LOOP);
-	    node = node-&gt;nd_iter; /* should be NODE_CALL */
-	    switch (nd_type(node)) {
-	      case NODE_CALL:
-		scope = CALLING_NORMAL; break;
-	      case NODE_FCALL:
-		scope = CALLING_FCALL; break;
-	      case NODE_VCALL:
-		scope = CALLING_VCALL; break;
-	      case NODE_SUPER:
-		scope = CALLING_SUPER; break;
-	      default:
-		/* error! */
-		unknown_node(node);
-	    }
-	    state = EXEC_TAG();
-	    if (state == 0) {
-		struct BLOCK *block, _block;
-		int argc; VALUE *argv; /* used in SETUP_ARGS */
-		TMP_PROTECT;
-
-	      block_pass_retry:
-		if (scope == CALLING_NORMAL) {
-		    recv = rb_eval(self, node-&gt;nd_recv);
-		}
-		SETUP_ARGS(node-&gt;nd_args);
-		block = passing_block(rb_eval(self, bpass-&gt;nd_body), &amp;_block);
-		ruby_current_node = node;
-		SET_CURRENT_SOURCE();
-		if (scope == CALLING_SUPER) {
-		    result = call_super(argc, argv, block);
-		}
-		else {
-		    result = rb_call(CLASS_OF(recv),recv,node-&gt;nd_mid,argc,argv,block,scope);
-		}
-	    }
-	    else if (state == TAG_BREAK &amp;&amp; TAG_DST()) {
-		result = prot_tag-&gt;retval;
-		state = 0;
-	    }
-	    else if (state == TAG_RETRY) {
-		state = 0;
-		goto block_pass_retry;
-	    }
-	    POP_TAG();
-	    if (state) JUMP_TAG(state);
-	}
-	break;
-
       case NODE_ITER:
 	{
 	    VALUE recv = self;
 	    calling_scope_t scope;
-	    struct BLOCK *block;
+	    struct BLOCK *block_given;
 
 	    PUSH_TAG(PROT_LOOP);
-	    PUSH_BLOCK(block, node-&gt;nd_var, node-&gt;nd_body);
+	    PUSH_BLOCK(block_given, node-&gt;nd_var, node-&gt;nd_body);
 	    node = node-&gt;nd_iter; /* should be NODE_CALL */
 	    switch (nd_type(node)) {
 	      case NODE_CALL:
@@ -3306,7 +3236,7 @@ rb_eval(VALUE self, NODE *n)
 	    }
 	    state = EXEC_TAG();
 	    if (state == 0) {
-		int argc; VALUE *argv; /* used in SETUP_ARGS */
+		CALLARGS;
 		TMP_PROTECT;
 
 	      iter_retry:
@@ -3321,11 +3251,14 @@ rb_eval(VALUE self, NODE *n)
 		    ruby_current_node = node;
 		}
 		SET_CURRENT_SOURCE();
-		if (scope == CALLING_SUPER) {
-		    result = call_super(argc, argv, block);
-		}
-		else {
-		    result = rb_call(CLASS_OF(recv),recv,node-&gt;nd_mid,argc,argv,block,scope);
+		switch (scope) {
+		  case CALLING_SUPER:
+		    result = call_super(argc, argv, block_given);
+		    break;
+		  default:
+		    result = rb_call(CLASS_OF(recv),recv,node-&gt;nd_mid,
+				     argc,argv,block_given,scope,1);
+		    break;
 		}
 	    }
 	    else if (state == TAG_BREAK &amp;&amp; TAG_DST()) {
@@ -3345,7 +3278,7 @@ rb_eval(VALUE self, NODE *n)
       case NODE_CALL:
 	{
 	    VALUE recv;
-	    int argc; VALUE *argv; /* used in SETUP_ARGS */
+	    CALLARGS;
 	    TMP_PROTECT;
 
 	    recv = rb_eval(self, node-&gt;nd_recv);
@@ -3353,32 +3286,34 @@ rb_eval(VALUE self, NODE *n)
 
 	    ruby_current_node = node;
 	    SET_CURRENT_SOURCE();
-	    result = rb_call(CLASS_OF(recv),recv,node-&gt;nd_mid,argc,argv,0,CALLING_NORMAL);
+	    result = rb_call(CLASS_OF(recv),recv,node-&gt;nd_mid,argc,argv,
+			     block,CALLING_NORMAL,0);
 	}
 	break;
 
       case NODE_FCALL:
 	{
-	    int argc; VALUE *argv; /* used in SETUP_ARGS */
+	    CALLARGS;
 	    TMP_PROTECT;
 
 	    SETUP_ARGS(node-&gt;nd_args);
 
 	    ruby_current_node = node;
 	    SET_CURRENT_SOURCE();
-	    result = rb_call(CLASS_OF(self),self,node-&gt;nd_mid,argc,argv,0,CALLING_FCALL);
+	    result = rb_call(CLASS_OF(self),self,node-&gt;nd_mid,argc,argv,
+			     block,CALLING_FCALL,0);
 	}
 	break;
 
       case NODE_VCALL:
 	SET_CURRENT_SOURCE();
-	result = rb_call(CLASS_OF(self),self,node-&gt;nd_mid,0,0,0,CALLING_VCALL);
+	result = rb_call(CLASS_OF(self),self,node-&gt;nd_mid,0,0,0,CALLING_VCALL,0);
 	break;
 
       case NODE_SUPER:
       case NODE_ZSUPER:
 	{
-	    int argc; VALUE *argv; /* used in SETUP_ARGS */
+	    CALLARGS;
 	    TMP_PROTECT;
 
 	    if (ruby_frame-&gt;this_class == 0) {
@@ -3393,14 +3328,15 @@ rb_eval(VALUE self, NODE *n)
 	    }
 	    if (nd_type(node) == NODE_ZSUPER) {
 		ZSUPER_ARGS();
+		SET_CURRENT_SOURCE();
+		result = rb_call_super(argc, argv);
 	    }
 	    else {
 		SETUP_ARGS(node-&gt;nd_args);
 		ruby_current_node = node;
+		SET_CURRENT_SOURCE();
+		result = call_super(argc, argv, block);
 	    }
-
-	    SET_CURRENT_SOURCE();
-	    result = rb_call_super(argc, argv);
 	}
 	break;
 
@@ -3444,14 +3380,14 @@ rb_eval(VALUE self, NODE *n)
 
       case NODE_OP_ASGN1:
 	{
-	    int argc; VALUE *argv; /* used in SETUP_ARGS */
+	    CALLARGS;
 	    VALUE recv, val, tmp;
 	    NODE *rval;
 	    TMP_PROTECT;
 
 	    recv = rb_eval(self, node-&gt;nd_recv);
 	    rval = node-&gt;nd_args-&gt;nd_head;
-	    SETUP_ARGS0(node-&gt;nd_args-&gt;nd_next,node-&gt;nd_args-&gt;nd_alen-1,1);
+	    SETUP_ARGS0(node-&gt;nd_args-&gt;nd_body,1);
 	    val = rb_funcall3(recv, aref, argc, argv);
 	    switch (node-&gt;nd_mid) {
 	    case 0: /* OR */
@@ -3549,9 +3485,6 @@ rb_eval(VALUE self, NODE *n)
 	    rb_const_set(class_prefix(self, node-&gt;nd_else), node-&gt;nd_else-&gt;nd_mid, result);
 	}
 	else {
-	    if (NIL_P(ruby_cbase)) {
-		rb_raise(rb_eTypeError, &quot;no class/module to define constant&quot;);
-	    }
 	    rb_const_set(ruby_cbase, node-&gt;nd_vid, result);
 	}
 	break;
@@ -3704,7 +3637,7 @@ rb_eval(VALUE self, NODE *n)
 	    long i;
 
 	    i = node-&gt;nd_alen;
-	    val = rb_values_new2(i, 0);
+	    val = rb_ary_new4(i, 0);
 	    for (i=0;node;node=node-&gt;nd_next) {
 		RARRAY(val)-&gt;ptr[i++] = rb_eval(self, node-&gt;nd_head);
 		RARRAY(val)-&gt;len = i;
@@ -3799,9 +3732,10 @@ rb_eval(VALUE self, NODE *n)
 			rb_id2name(node-&gt;nd_mid));
 	    }
 	    rb_frozen_class_p(ruby_cbase);
-	    body = search_method(ruby_cbase, node-&gt;nd_mid, &amp;origin);
+	    body = search_method(ruby_cbase, node-&gt;nd_mid, &amp;origin, LOOKUP_NOSKIP);
 	    if (body){
-		if (RTEST(ruby_verbose) &amp;&amp; ruby_cbase == origin &amp;&amp; body-&gt;nd_cnt == 0 &amp;&amp; body-&gt;nd_body) {
+		if (RTEST(ruby_verbose) &amp;&amp; ruby_cbase == origin &amp;&amp;
+		    body-&gt;nd_cnt == 0 &amp;&amp; body-&gt;nd_body) {
 		    rb_warning(&quot;method redefined; discarding old %s&quot;, rb_id2name(node-&gt;nd_mid));
 		}
 	    }
@@ -3809,6 +3743,9 @@ rb_eval(VALUE self, NODE *n)
 	    if (VIS_TEST(VIS_PRIVATE) || node-&gt;nd_mid == init) {
 		noex = NOEX_PRIVATE;
 	    }
+	    else if (VIS_TEST(VIS_LOCAL)) {
+		noex = NOEX_LOCAL;
+	    }
 	    else if (VIS_TEST(VIS_PROTECTED)) {
 		noex = NOEX_PROTECTED;
 	    }
@@ -3964,12 +3901,12 @@ rb_eval(VALUE self, NODE *n)
 		module = rb_define_module_id(cname);
 		rb_set_class_path(module, cbase, rb_id2name(cname));
 		rb_const_set(cbase, cname, module);
+		rb_obj_call_init(module, 0, 0);
 	    }
 	    if (ruby_wrapper) {
 		rb_extend_object(module, ruby_wrapper);
 		rb_include_module(module, ruby_wrapper);
 	    }
-
 	    result = module_setup(module, node);
 	}
 	break;
@@ -4161,7 +4098,7 @@ rb_mod_method_defined(int argc, VALUE *argv, VALUE mod)
     if (!RTEST(recur)) {
 	return st_is_member(RCLASS(mod)-&gt;m_tbl, id) ? Qtrue : Qfalse;
     }
-    return rb_method_boundp(mod, id, 1);
+    return rb_method_boundp(mod, id, Qtrue);
 }
 
 #define VISI_CHECK(x,f) (((x)&amp;NOEX_MASK) == (f))
@@ -4196,7 +4133,7 @@ static VALUE
 rb_mod_public_method_defined(VALUE mod, VALUE mid)
 {
     ID id = rb_to_id(mid);
-    int noex;
+    int noex = 1;
 
     if (rb_get_method_body(&amp;mod, &amp;id, &amp;noex)) {
 	if (VISI_CHECK(noex, NOEX_PUBLIC))
@@ -4235,7 +4172,7 @@ static VALUE
 rb_mod_private_method_defined(VALUE mod, VALUE mid)
 {
     ID id = rb_to_id(mid);
-    int noex;
+    int noex = 0;
 
     if (rb_get_method_body(&amp;mod, &amp;id, &amp;noex)) {
 	if (VISI_CHECK(noex, NOEX_PRIVATE))
@@ -4274,7 +4211,7 @@ static VALUE
 rb_mod_protected_method_defined(VALUE mod, VALUE mid)
 {
     ID id = rb_to_id(mid);
-    int noex;
+    int noex = 1;
 
     if (rb_get_method_body(&amp;mod, &amp;id, &amp;noex)) {
 	if (VISI_CHECK(noex, NOEX_PROTECTED))
@@ -4653,7 +4590,7 @@ proc_jump_error(int state, VALUE result)
 	statement = &quot;local-jump&quot;; break; /* should not happen */
     }
     snprintf(mesg, sizeof mesg, &quot;%s from proc-closure&quot;, statement);
-    localjump_error(mesg, result, state);
+    localjump_error(mesg, result, state, 0);
 }
 
 NORETURN(static void return_jump(VALUE));
@@ -4671,7 +4608,7 @@ return_jump(VALUE retval)
 	}
 	if ((tt-&gt;tag == PROT_FUNC &amp;&amp; tt-&gt;frame-&gt;uniq == ruby_frame-&gt;uniq) ||
 	    (tt-&gt;tag == PROT_LAMBDA &amp;&amp; !yield))
-	{ 
+	{
 	    tt-&gt;dst = (VALUE)tt-&gt;frame-&gt;uniq;
 	    tt-&gt;retval = retval;
 	    JUMP_TAG(TAG_RETURN);
@@ -4681,7 +4618,7 @@ return_jump(VALUE retval)
 	}
 	tt = tt-&gt;prev;
     }
-    localjump_error(&quot;unexpected return&quot;, retval, TAG_RETURN);
+    localjump_error(&quot;unexpected return&quot;, retval, TAG_RETURN, 0);
 }
 
 static void
@@ -4708,7 +4645,7 @@ break_jump(VALUE retval)
 	}
 	tt = tt-&gt;prev;
     }
-    localjump_error(&quot;unexpected break&quot;, retval, TAG_BREAK);
+    localjump_error(&quot;unexpected break&quot;, retval, TAG_BREAK, 0);
 }
 
 static VALUE bmcall(VALUE, VALUE);
@@ -4718,12 +4655,12 @@ void
 rb_need_block(void)
 {
     if (!rb_block_given_p()) {
-	localjump_error(&quot;no block given&quot;, Qnil, 0);
+	localjump_error(&quot;no block given&quot;, Qnil, 0, 0);
     }
 }
 
 static VALUE
-rb_yield_0(VALUE val, VALUE self, VALUE klass /* OK */, int flags, int avalue)
+rb_yield_0(VALUE val, VALUE self, VALUE klass /* OK */, int flags)
 {
     NODE *node, *var;
     volatile VALUE result = Qnil;
@@ -4790,16 +4727,8 @@ rb_yield_0(VALUE val, VALUE self, VALUE klass /* OK */, int flags, int avalue)
 		var = var-&gt;nd_args;
 		goto block_var;
 	    }
-	    else if (nd_type(var) == NODE_MASGN) {
-		if (!avalue) {
-		    val = svalue_to_mrhs(val, var-&gt;nd_head);
-		}
-		massign(self, var, val, lambda);
-	    }
 	    else if (nd_type(var) == NODE_ARGS) {
-		if (!avalue) {
-		    val = svalue_to_mrhs(val, var-&gt;nd_head);
-		}
+		val = svalue_to_avalue(val);
 		formal_assign(self, var, RARRAY(val)-&gt;len, RARRAY(val)-&gt;ptr, 0);
 	    }
 	    else if (nd_type(var) == NODE_BLOCK) {
@@ -4809,31 +4738,10 @@ rb_yield_0(VALUE val, VALUE self, VALUE klass /* OK */, int flags, int avalue)
 		var = var-&gt;nd_head;
 		goto block_var;
 	    }
+	    else if (nd_type(var) == NODE_MASGN) {
+		massign(self, var, val, lambda);
+	    }
 	    else {
-		int len = 0;
-		if (avalue) {
-		    len = RARRAY(val)-&gt;len;
-		    if (len == 0) {
-			goto zero_arg;
-		    }
-		    if (len == 1) {
-			val = RARRAY(val)-&gt;ptr[0];
-		    }
-		    else {
-			goto multi_values;
-		    }
-		}
-		else if (val == Qundef) {
-		  zero_arg:
-		    val = Qnil;
-		  multi_values:
-		    {
-			ruby_current_node = var;
-			rb_warn(&quot;multiple values for a block parameter (%d for 1)\n\tfrom %s:%d&quot;,
-				len, cnode-&gt;nd_file, nd_line(cnode));
-			ruby_current_node = cnode;
-		    }
-		}
 		assign(self, var, val, lambda);
 	    }
 	    if (bvar) {
@@ -4865,14 +4773,9 @@ rb_yield_0(VALUE val, VALUE self, VALUE klass /* OK */, int flags, int avalue)
       redo:
 	if (nd_type(node) == NODE_CFUNC || nd_type(node) == NODE_IFUNC) {
 	    if (node-&gt;nd_state == YIELD_FUNC_AVALUE) {
-		if (!avalue) {
-		    val = svalue_to_avalue(val);
-		}
+		val = svalue_to_avalue(val);
 	    }
 	    else {
-		if (avalue) {
-		    val = avalue_to_svalue(val);
-		}
 		if (val == Qundef &amp;&amp; node-&gt;nd_state != YIELD_FUNC_SVALUE)
 		    val = Qnil;
 	    }
@@ -4967,7 +4870,7 @@ rb_yield_0(VALUE val, VALUE self, VALUE klass /* OK */, int flags, int avalue)
 VALUE
 rb_yield(VALUE val)
 {
-    return rb_yield_0(val, 0, 0, 0, Qfalse);
+    return rb_yield_0(val, 0, 0, 0);
 }
 
 VALUE
@@ -4978,32 +4881,16 @@ rb_yield_values(int n, ...)
     VALUE val;
 
     if (n == 0) {
-	return rb_yield_0(Qundef, 0, 0, 0, Qfalse);
+	return rb_yield_0(Qundef, 0, 0, 0);
     }
-    val = rb_values_new2(n, 0);
+    val = rb_ary_new4(n, 0);
     va_start(args, n);
     for (i=0; i&lt;n; i++) {
 	RARRAY(val)-&gt;ptr[i] = va_arg(args, VALUE);
     }
     RARRAY(val)-&gt;len = n;
     va_end(args);
-    return rb_yield_0(val, 0, 0, 0, Qtrue);
-}
-
-VALUE
-rb_yield_splat(VALUE values)
-{
-    int avalue = Qfalse;
-
-    if (TYPE(values) == T_ARRAY) {
-	if (RARRAY(values)-&gt;len == 0) {
-	    values = Qundef;
-	}
-	else {
-	    avalue = Qtrue;
-	}
-    }
-    return rb_yield_0(values, 0, 0, 0, avalue);
+    return rb_yield_0(val, 0, 0, 0);
 }
 
 /*
@@ -5024,7 +4911,7 @@ static VALUE
 rb_f_loop(void)
 {
     for (;;) {
-	rb_yield_0(Qundef, 0, 0, 0, Qfalse);
+	rb_yield_0(Qundef, 0, 0, 0);
 	CHECK_INTS;
     }
     return Qnil;		/* dummy */
@@ -5035,11 +4922,27 @@ massign(VALUE self, NODE *node, VALUE val, int pcall)
 {
     NODE *list;
     long i = 0, len;
+    volatile VALUE tmp;
+    VALUE *argv;
 
-    len = RARRAY(val)-&gt;len;
+    if (val == Qundef) {
+	argv = 0;
+	len = 0;
+    }
+    else {
+	tmp = rb_check_array_type(val);
+	if (NIL_P(tmp)) {
+	    argv = &amp;val;
+	    len = (val == Qundef) ? 0 : 1;
+	}
+	else {
+	    argv = RARRAY(tmp)-&gt;ptr;
+	    len = RARRAY(tmp)-&gt;len;
+	}
+    }
     list = node-&gt;nd_head;
     for (; list &amp;&amp; i&lt;len; i++) {
-	assign(self, list-&gt;nd_head, RARRAY(val)-&gt;ptr[i], pcall);
+	assign(self, list-&gt;nd_head, argv[i], pcall);
 	list = list-&gt;nd_next;
     }
     if (pcall &amp;&amp; list) goto arg_error;
@@ -5048,7 +4951,7 @@ massign(VALUE self, NODE *node, VALUE val, int pcall)
 	    /* no check for mere `*' */
 	}
 	else if (!list &amp;&amp; i&lt;len) {
-	    assign(self, node-&gt;nd_args, rb_ary_new4(len-i, RARRAY(val)-&gt;ptr+i), pcall);
+	    assign(self, node-&gt;nd_args, rb_ary_new4(len-i, argv+i), pcall);
 	}
 	else {
 	    assign(self, node-&gt;nd_args, rb_ary_new2(0), pcall);
@@ -5125,7 +5028,7 @@ assign(VALUE self, NODE *lhs, VALUE val, int pcall)
 	break;
 
       case NODE_MASGN:
-	massign(self, lhs, svalue_to_mrhs(val, lhs-&gt;nd_head), pcall);
+	massign(self, lhs, val, pcall);
 	break;
 
       case NODE_CALL:
@@ -5135,7 +5038,7 @@ assign(VALUE self, NODE *lhs, VALUE val, int pcall)
 	    calling_scope_t scope;
 	    if (lhs-&gt;nd_recv == (NODE *)1) {
 		recv = self;
-		scope = CALLING_FCALL;
+		scope = CALLING_FUNCALL;
 	    }
 	    else {
 		recv = rb_eval(self, lhs-&gt;nd_recv);
@@ -5145,7 +5048,7 @@ assign(VALUE self, NODE *lhs, VALUE val, int pcall)
 		/* attr set */
 		ruby_current_node = lhs;
 		SET_CURRENT_SOURCE();
-		rb_call(CLASS_OF(recv), recv, lhs-&gt;nd_mid, 1, &amp;val, 0, scope);
+		rb_call(CLASS_OF(recv), recv, lhs-&gt;nd_mid, 1, &amp;val, 0, scope,0);
 	    }
 	    else {
 		/* array set */
@@ -5156,7 +5059,40 @@ assign(VALUE self, NODE *lhs, VALUE val, int pcall)
 		ruby_current_node = lhs;
 		SET_CURRENT_SOURCE();
 		rb_call(CLASS_OF(recv), recv, lhs-&gt;nd_mid,
-			RARRAY(args)-&gt;len, RARRAY(args)-&gt;ptr, 0, scope);
+			RARRAY(args)-&gt;len, RARRAY(args)-&gt;ptr, 0, scope,0);
+	    }
+	}
+	break;
+
+      case NODE_POSTARG:
+	{
+	    NODE *v = lhs-&gt;nd_head;
+	    int cnt;
+	    VALUE *p;
+
+	    if ((long)(lhs-&gt;nd_args) != -1) {
+		assign(self, lhs-&gt;nd_args, val, 0);
+	    }
+	    cnt = lhs-&gt;nd_head-&gt;nd_alen;
+	    if (RARRAY(val)-&gt;len &lt; cnt) {
+		if (pcall) {
+		    rb_raise(rb_eArgError, &quot;wrong number of arguments&quot;);
+		}
+		else {
+		    while (RARRAY(val)-&gt;len &lt; cnt) {
+			v = v-&gt;nd_next;
+			cnt--;
+		    }
+		}
+	    }
+	    p = RARRAY(val)-&gt;ptr + RARRAY(val)-&gt;len - cnt;
+	    while (cnt--) {
+		assign(self, v-&gt;nd_head, *p++, 0);
+		v = v-&gt;nd_next;
+	    }
+	    cnt = lhs-&gt;nd_head-&gt;nd_alen;
+	    while (cnt--) {
+		rb_ary_pop(val);
 	    }
 	}
 	break;
@@ -5218,7 +5154,7 @@ iterate_method(VALUE obj)
 
     arg = (struct iter_method_arg*)obj;
     return rb_call(CLASS_OF(arg-&gt;obj), arg-&gt;obj, arg-&gt;mid, arg-&gt;argc, arg-&gt;argv,
-		   ruby_frame-&gt;block, CALLING_FCALL);
+		   ruby_frame-&gt;block, CALLING_FUNCALL,1);
 }
 
 VALUE
@@ -5237,13 +5173,13 @@ VALUE
 rb_each(VALUE obj)
 {
     return rb_call(CLASS_OF(obj), obj, rb_intern(&quot;each&quot;), 0, 0,
-		   ruby_frame-&gt;block, CALLING_FCALL);
+		   ruby_frame-&gt;block, CALLING_FUNCALL,1);
 }
 
 static int
 handle_rescue(VALUE self, NODE *node)
 {
-    int argc; VALUE *argv; /* used in SETUP_ARGS */
+    CALLARGS;
     TMP_PROTECT;
 
     if (!node-&gt;nd_args) {
@@ -5511,12 +5447,23 @@ method_missing(VALUE obj, ID id, int argc, const VALUE *argv,
     else if (id == ID_ALLOCATOR) {
 	rb_raise(rb_eTypeError, &quot;allocator undefined for %s&quot;, rb_class2name(obj));
     }
+    if (argc &lt; 0) {
+	VALUE tmp;
 
-    nargv = ALLOCA_N(VALUE, argc+1);
-    nargv[0] = ID2SYM(id);
-    MEMCPY(nargv+1, argv, VALUE, argc);
+	argc = -argc-1;
+	tmp = svalue_to_avalue(argv[argc]);
+	nargv = ALLOCA_N(VALUE, argc + RARRAY(tmp)-&gt;len + 1);
+	MEMCPY(nargv+1, argv, VALUE, argc);
+	MEMCPY(nargv+1+argc, RARRAY(tmp)-&gt;ptr, VALUE, RARRAY(tmp)-&gt;len);
+	argc += RARRAY(tmp)-&gt;len;
 
-    return rb_call(CLASS_OF(obj), obj, missing, argc+1, nargv, block, CALLING_FCALL);
+    }
+    else {
+	nargv = ALLOCA_N(VALUE, argc+1);
+	MEMCPY(nargv+1, argv, VALUE, argc);
+    }
+    nargv[0] = ID2SYM(id);
+    return rb_call(CLASS_OF(obj), obj, missing, argc+1, nargv, block, CALLING_FUNCALL, 0);
 }
 
 static inline VALUE
@@ -5664,8 +5611,12 @@ formal_assign(VALUE recv, NODE *node, int argc, const VALUE *argv, VALUE *local_
 	VALUE v;
 
 	if (argc &gt; 0) {
+	    int n = 1;
 	    v = rb_ary_new4(argc,argv);
-	    i = -i - 1;
+	    if (nd_type(node-&gt;nd_rest) == NODE_POSTARG) {
+		n += node-&gt;nd_rest-&gt;nd_head-&gt;nd_alen;
+	    }
+	    i += n*256;
 	}
 	else {
 	    v = rb_ary_new2(0);
@@ -5698,21 +5649,28 @@ rb_call0(VALUE klass, VALUE recv, ID id, ID oid,
     volatile int safe = -1;
     TMP_PROTECT;
 
+    if (NOEX_SAFE(flags) &gt; ruby_safe_level &amp;&amp;
+	ruby_safe_level == 0 &amp;&amp; NOEX_SAFE(flags) &gt; 2) {
+	rb_raise(rb_eSecurityError, &quot;calling insecure method: %s&quot;,
+		 rb_id2name(id));
+    }
     if ((++tick &amp; 0xff) == 0) {
 	CHECK_INTS;		/* better than nothing */
 	stack_check();
 	rb_gc_finalize_deferred();
     }
-    if (argc &lt; 0) {
+    if (argc &gt;= 256) {
 	VALUE tmp;
 	VALUE *nargv;
+	int n = argc / 256 - 1;
 
-	argc = -argc-1;
-	tmp = splat_value(argv[argc]);
-	nargv = TMP_ALLOC(argc + RARRAY(tmp)-&gt;len);
+	argc %= 256;
+	tmp = svalue_to_avalue(argv[argc]);
+	nargv = TMP_ALLOC(argc + RARRAY(tmp)-&gt;len + n);
 	MEMCPY(nargv, argv, VALUE, argc);
 	MEMCPY(nargv+argc, RARRAY(tmp)-&gt;ptr, VALUE, RARRAY(tmp)-&gt;len);
-	argc += RARRAY(tmp)-&gt;len;
+	MEMCPY(nargv + argc + RARRAY(tmp)-&gt;len, argv + argc + 1, VALUE, n);
+	argc += RARRAY(tmp)-&gt;len + n;
 	argv = nargv;
     }
     switch (nd_type(body)) {
@@ -5768,7 +5726,7 @@ rb_call0(VALUE klass, VALUE recv, ID id, ID oid,
       case NODE_BMETHOD:
 	PUSH_METHOD_FRAME();
 	ruby_frame-&gt;flags |= FRAME_DMETH;
-	result = proc_invoke(body-&gt;nd_cval, rb_ary_new4(argc, argv), recv, klass);
+	result = proc_invoke(body-&gt;nd_cval, rb_ary_new4(argc, argv), recv, klass, 1);
 	POP_FRAME();
 	break;
 
@@ -5798,10 +5756,6 @@ rb_call0(VALUE klass, VALUE recv, ID id, ID oid,
 	    b2 = body = body-&gt;nd_next;
 
 	    if (NOEX_SAFE(flags) &gt; ruby_safe_level) {
-		if (ruby_safe_level == 0 &amp;&amp; NOEX_SAFE(flags) &gt; 2) {
-		    rb_raise(rb_eSecurityError, &quot;calling insecure method: %s&quot;,
-			     rb_id2name(id));
-		}
 		safe = ruby_safe_level;
 		ruby_safe_level = NOEX_SAFE(flags);
 	    }
@@ -5819,7 +5773,8 @@ rb_call0(VALUE klass, VALUE recv, ID id, ID oid,
 		    body = body-&gt;nd_next;
 		}
 		if (node) {
-		    ruby_frame-&gt;argc = formal_assign(recv, node, argc, argv, local_vars);
+		    ruby_frame-&gt;argc =
+			formal_assign(recv, node, argc, argv, local_vars);
 		}
 
 		if (event_hooks) {
@@ -5832,13 +5787,13 @@ rb_call0(VALUE klass, VALUE recv, ID id, ID oid,
 		state = 0;
 	    }
 	    POP_TAG();
+	    if (event_hooks) {
+		EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass);
+	    }
 	    POP_VARS();
 	    POP_SCOPE();
 	    ruby_cref = saved_cref;
 	    if (safe &gt;= 0) ruby_safe_level = safe;
-	    if (event_hooks) {
-		EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass);
-	    }
 	    POP_FRAME();
 	    switch (state) {
 	      case 0:
@@ -5869,7 +5824,7 @@ rb_call0(VALUE klass, VALUE recv, ID id, ID oid,
 static VALUE
 rb_call(VALUE klass, VALUE recv, ID mid,
 	int argc /* OK */, const VALUE *argv /* OK */, struct BLOCK *block,
-	calling_scope_t scope)
+	calling_scope_t scope, int iter)
 {
     NODE  *body;		/* OK */
     int    noex;
@@ -5880,8 +5835,21 @@ rb_call(VALUE klass, VALUE recv, ID mid,
 	rb_raise(rb_eNotImpError, &quot;method `%s' called on terminated object (%p)&quot;,
 		 rb_id2name(mid), (void*)recv);
     }
+    switch (scope) {
+      case CALLING_FCALL:
+      case CALLING_VCALL:
+	if (recv == ruby_frame-&gt;self) {
+	    noex = LOOKUP_FCALL;
+	    break;
+	}
+	/* fall thtough */
+      default:
+	noex = LOOKUP_NORMAL;
+	break;
+    }
+
     /* is it in the method cache? */
-    ent = cache + EXPR1(klass, mid);
+    ent = cache[noex] + EXPR1(klass, mid);
     if (ent-&gt;mid == mid &amp;&amp; ent-&gt;klass == klass) {
 	if (!ent-&gt;method)
 	    return method_missing(recv, mid, argc, argv, block,
@@ -5917,7 +5885,28 @@ rb_call(VALUE klass, VALUE recv, ID mid,
     if (scope &gt; CALLING_NORMAL) { /* pass receiver info */
 	noex |= NOEX_RECV;
     }
-    return rb_call0(klass, recv, mid, id, argc, argv, block, body, noex);
+    if (block &amp;&amp; !iter) {
+	VALUE result;
+	int state;
+
+	PUSH_TAG(PROT_LOOP);
+	prot_tag-&gt;blkid = block-&gt;uniq;
+	state = EXEC_TAG();
+	if (state == 0) {
+	  retry:
+	    result = rb_call0(klass, recv, mid, id, argc, argv, block, body, noex);
+	}
+	else if (state == TAG_BREAK &amp;&amp; TAG_DST()) {
+	    result = prot_tag-&gt;retval;
+	    state = 0;
+	}
+	POP_TAG();
+	if (state) JUMP_TAG(state);
+	return result;
+    }
+    else {
+	return rb_call0(klass, recv, mid, id, argc, argv, block, body, noex);
+    }
 }
 
 VALUE
@@ -5929,7 +5918,7 @@ rb_apply(VALUE recv, ID mid, VALUE args)
     argc = RARRAY(args)-&gt;len; /* Assigns LONG, but argc is INT */
     argv = ALLOCA_N(VALUE, argc);
     MEMCPY(argv, RARRAY(args)-&gt;ptr, VALUE, argc);
-    return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 0, CALLING_FCALL);
+    return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 0, CALLING_FUNCALL, 0);
 }
 
 static VALUE
@@ -5941,7 +5930,7 @@ send_funcall(int argc, VALUE *argv, VALUE recv, calling_scope_t scope)
 
     vid = *argv++; argc--;
     vid = rb_call(CLASS_OF(recv), recv, rb_to_id(vid), argc, argv,
-		  ruby_frame-&gt;block, scope);
+		  ruby_frame-&gt;block, scope, 1);
 
     return vid;
 }
@@ -5998,7 +5987,7 @@ rb_f_send(int argc, VALUE *argv, VALUE recv)
 static VALUE
 rb_f_funcall(int argc, VALUE *argv, VALUE recv)
 {
-    return send_funcall(argc, argv, recv, CALLING_FCALL);
+    return send_funcall(argc, argv, recv, CALLING_FUNCALL);
 }
 
 VALUE
@@ -6022,19 +6011,19 @@ rb_funcall(VALUE recv, ID mid, int n, ...)
 	argv = 0;
     }
 
-    return rb_call(CLASS_OF(recv), recv, mid, n, argv, 0, CALLING_FCALL);
+    return rb_call(CLASS_OF(recv), recv, mid, n, argv, 0, CALLING_FUNCALL, 0);
 }
 
 VALUE
 rb_funcall2(VALUE recv, ID mid, int argc, const VALUE *argv)
 {
-    return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 0, CALLING_FCALL);
+    return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 0, CALLING_FUNCALL, 0);
 }
 
 VALUE
 rb_funcall3(VALUE recv, ID mid, int argc, const VALUE *argv)
 {
-    return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 0, CALLING_NORMAL);
+    return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 0, CALLING_NORMAL, 0);
 }
 
 static VALUE
@@ -6045,7 +6034,7 @@ call_super_0(VALUE klass, VALUE self, ID mid,
 	return method_missing(self, mid, argc, argv, block, CSTAT_SUPER);
     }
 
-    return rb_call(RCLASS(klass)-&gt;super, self, mid, argc, argv, block, CALLING_SUPER);
+    return rb_call(RCLASS(klass)-&gt;super, self, mid, argc, argv, block, CALLING_SUPER, 1);
 }
 
 static VALUE
@@ -6111,7 +6100,7 @@ backtrace(int lev)
  *  
  *  Returns the current execution stack---an array containing strings in
  *  the form ``&lt;em&gt;file:line&lt;/em&gt;'' or ``&lt;em&gt;file:line: in
- *  `method'&lt;/em&gt;''. The optional _start_ parameter
+ *  `method'&lt;/em&gt;''. The optional &lt;i&gt;start&lt;/i&gt;_ parameter
  *  determines the number of initial stack entries to omit from the
  *  result.
  *     
@@ -6326,7 +6315,7 @@ static VALUE
 rb_f_eval(int argc, VALUE *argv, 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);
@@ -6430,12 +6419,8 @@ static VALUE
 yield_under_i(VALUE arg)
 {
     VALUE *args = (VALUE *)arg;
-    int avalue = Qtrue;
 
-    if (args[0] == Qundef) {
-	avalue = Qfalse;
-    }
-    return rb_yield_0(args[0], args[1], ruby_cbase, YIELD_PUBLIC_DEF, avalue);
+    return rb_yield_0(args[0], args[1], ruby_cbase, YIELD_PUBLIC_DEF);
 }
 
 /* block eval under the class/module context */
@@ -6458,7 +6443,7 @@ specific_eval(int argc, VALUE *argv, VALUE klass, VALUE 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) {
@@ -6554,7 +6539,7 @@ rb_obj_instance_exec(int argc, VALUE *argv, VALUE self)
     else {
 	klass = rb_singleton_class(self);
     }
-    return yield_under(klass, self, rb_values_new2(argc, argv));
+    return yield_under(klass, self, rb_ary_new4(argc, argv));
 }
 
 /*
@@ -6610,7 +6595,7 @@ rb_mod_module_eval(int argc, VALUE *argv, VALUE mod)
 VALUE
 rb_mod_module_exec(int argc, VALUE *argv, VALUE mod)
 {
-    return yield_under(mod, mod, rb_values_new2(argc, argv));
+    return yield_under(mod, mod, rb_ary_new4(argc, argv));
 }
 
 VALUE rb_load_path;
@@ -7086,7 +7071,6 @@ set_method_visibility(VALUE self, int argc, VALUE *argv, ID ex)
     for (i=0; i&lt;argc; i++) {
 	rb_export_method(self, rb_to_id(argv[i]), ex);
     }
-    rb_clear_cache_by_class(self);
 }
 
 /*
@@ -7169,6 +7153,30 @@ rb_mod_private(int argc, VALUE *argv, VALUE module)
 
 /*
  *  call-seq:
+ *     local                 =&gt; self
+ *     local(symbol, ...)    =&gt; self
+ *  
+ *  With no arguments, sets the default visibility for subsequently
+ *  defined methods to local. With arguments, sets the named methods to
+ *  have local visibility.
+ */
+
+static VALUE
+rb_mod_local(int argc, VALUE *argv, VALUE module)
+{
+    secure_visibility(module);
+    if (argc == 0) {
+	VIS_SET(VIS_LOCAL);
+    }
+    else {
+	set_method_visibility(module, argc, argv, NOEX_LOCAL);
+	rb_clear_cache();
+    }
+    return module;
+}
+
+/*
+ *  call-seq:
  *     mod.public_class_method(symbol, ...)    =&gt; mod
  *  
  *  Makes a list of existing class methods public.
@@ -7220,6 +7228,16 @@ top_public(int argc, VALUE *argv)
     return rb_mod_public(argc, argv, rb_cObject);
 }
 
+/*
+ *  call-seq:
+ *     private                 =&gt; self
+ *     private(symbol, ...)    =&gt; self
+ *  
+ *  With no arguments, sets the default visibility for subsequently
+ *  defined methods to private. With arguments, sets the named methods
+ *  to have private visibility.
+ */
+
 static VALUE
 top_private(int argc, VALUE *argv)
 {
@@ -7285,9 +7303,9 @@ rb_mod_modfunc(int argc, VALUE *argv, VALUE module)
 
 	id = rb_to_id(argv[i]);
 	for (;;) {
-	    body = search_method(m, id, &amp;m);
+	    body = search_method(m, id, &amp;m, LOOKUP_NOSKIP);
 	    if (body == 0) {
-		body = search_method(rb_cObject, id, &amp;m);
+		body = search_method(rb_cObject, id, &amp;m, LOOKUP_NOSKIP);
 	    }
 	    if (body == 0 || body-&gt;nd_body == 0) {
 		rb_bug(&quot;undefined method `%s'; can't happen&quot;, rb_id2name(id));
@@ -7354,7 +7372,7 @@ rb_mod_include(int argc, VALUE *argv, VALUE module)
 void
 rb_obj_call_init(VALUE obj, int argc, VALUE *argv)
 {
-    rb_call(CLASS_OF(obj), obj, init, argc, argv, ruby_frame-&gt;block, CALLING_FCALL);
+    rb_call(CLASS_OF(obj), obj, init, argc, argv, ruby_frame-&gt;block, CALLING_FUNCALL, 1);
 }
 
 void
@@ -7581,7 +7599,7 @@ call_end_proc(VALUE data)
     PUSH_FRAME(Qfalse);
     ruby_frame-&gt;self = ruby_frame-&gt;prev-&gt;self;
     ruby_frame-&gt;node = 0;
-    proc_invoke(data, rb_ary_new2(0), Qundef, 0);
+    proc_invoke(data, rb_ary_new2(0), Qundef, 0, 1);
     POP_FRAME();
 }
 
@@ -7704,13 +7722,13 @@ Init_eval(void)
     rb_define_global_function(&quot;eval&quot;, rb_f_eval, -1);
     rb_define_global_function(&quot;iterator?&quot;, rb_f_block_given_p, 0);
     rb_define_global_function(&quot;block_given?&quot;, rb_f_block_given_p, 0);
-    rb_define_global_function(&quot;method_missing&quot;, rb_method_missing, -1);
     rb_define_global_function(&quot;loop&quot;, rb_f_loop, 0);
 
-    rb_define_method(rb_mKernel, &quot;respond_to?&quot;, obj_respond_to, -1);
+    rb_define_private_method(rb_cBasicObject, &quot;method_missing&quot;, rb_method_missing, -1);
+    rb_define_method(rb_cBasicObject, &quot;respond_to?&quot;, obj_respond_to, -1);
     respond_to   = rb_intern(&quot;respond_to?&quot;);
     rb_global_variable((VALUE*)&amp;basic_respond_to);
-    basic_respond_to = rb_method_node(rb_cObject, respond_to);
+    basic_respond_to = rb_method_node(rb_cBasicObject, respond_to);
     
     rb_define_global_function(&quot;raise&quot;, rb_f_raise, -1);
     rb_define_global_function(&quot;fail&quot;, rb_f_raise, -1);
@@ -7727,9 +7745,9 @@ Init_eval(void)
     rb_define_global_function(&quot;global_variables&quot;, rb_f_global_variables, 0); /* in variable.c */
     rb_define_global_function(&quot;local_variables&quot;, rb_f_local_variables, 0);
 
-    rb_define_method(rb_mKernel, &quot;send&quot;, rb_f_send, -1);
-    rb_define_method(rb_mKernel, &quot;__send__&quot;, rb_f_send, -1);
-    rb_define_method(rb_mKernel, &quot;funcall&quot;, rb_f_funcall, -1);
+    rb_define_method(rb_cBasicObject, &quot;send&quot;, rb_f_send, -1);
+    rb_define_method(rb_cBasicObject, &quot;__send__&quot;, rb_f_send, -1);
+    rb_define_method(rb_cBasicObject, &quot;funcall&quot;, rb_f_funcall, -1);
     rb_define_method(rb_mKernel, &quot;instance_eval&quot;, rb_obj_instance_eval, -1);
     rb_define_method(rb_mKernel, &quot;instance_exec&quot;, rb_obj_instance_exec, -1);
 
@@ -7739,6 +7757,7 @@ Init_eval(void)
     rb_define_private_method(rb_cModule, &quot;public&quot;, rb_mod_public, -1);
     rb_define_private_method(rb_cModule, &quot;protected&quot;, rb_mod_protected, -1);
     rb_define_private_method(rb_cModule, &quot;private&quot;, rb_mod_private, -1);
+    rb_define_private_method(rb_cModule, &quot;local&quot;, rb_mod_local, -1);
     rb_define_private_method(rb_cModule, &quot;module_function&quot;, rb_mod_modfunc, -1);
     rb_define_method(rb_cModule, &quot;method_defined?&quot;, rb_mod_method_defined, -1);
     rb_define_method(rb_cModule, &quot;public_method_defined?&quot;, rb_mod_public_method_defined, 1);
@@ -8147,26 +8166,19 @@ proc_alloc(VALUE klass, int lambda)
     struct FRAME *frame = ruby_frame;
     struct BLOCK *data;
 
-    if (!rb_block_given_p() &amp;&amp; (lambda || !rb_f_block_given_p())) {
-	rb_raise(rb_eArgError, &quot;tried to create Proc object without a block&quot;);
-    }
-    if (!lambda) {
-	if (!rb_block_given_p()) {
-	    frame = ruby_frame-&gt;prev;
-	}
-	else {
-	    if (frame-&gt;block-&gt;block_obj) {
-		VALUE obj = frame-&gt;block-&gt;block_obj;
-		if (CLASS_OF(obj) != klass) {
-		    obj = proc_clone(obj);
-		    RBASIC(obj)-&gt;klass = klass;
-		}
-		return obj;
-	    }
+    if (!rb_block_given_p()) {
+	if (lambda || !ruby_frame-&gt;prev || !ruby_frame-&gt;prev-&gt;block) {
+	    rb_raise(rb_eArgError, &quot;tried to create Proc object without a block&quot;);
 	}
+	frame = ruby_frame-&gt;prev;
     }
-    else if (!rb_block_given_p()) {
-	rb_warn(&quot;tried to create Proc object without a block&quot;);
+    else if (!lambda &amp;&amp; frame-&gt;block-&gt;block_obj) {
+	VALUE obj = frame-&gt;block-&gt;block_obj;
+	if (CLASS_OF(obj) != klass) {
+	    obj = proc_clone(obj);
+	    RBASIC(obj)-&gt;klass = klass;
+	}
+	return obj;
     }
     block = Data_Make_Struct(klass, struct BLOCK, blk_mark, blk_free, data);
     *data = *frame-&gt;block;
@@ -8179,7 +8191,7 @@ proc_alloc(VALUE klass, int lambda)
     scope_dup(data-&gt;scope);
     proc_save_safe_level(block);
     if (lambda) {
-	data-&gt;flags |= BLOCK_LAMBDA;
+        data-&gt;flags |= BLOCK_LAMBDA;
     }
     else {
 	frame-&gt;block-&gt;block_obj = block;
@@ -8261,7 +8273,7 @@ block_orphan(struct BLOCK *data)
 }
 
 static VALUE
-proc_invoke(VALUE proc, VALUE args /* OK */, VALUE self, VALUE klass)
+proc_invoke(VALUE proc, VALUE args /* OK */, VALUE self, VALUE klass, int call)
 {
     struct BLOCK _block;
     struct BLOCK *data, *volatile old_block;
@@ -8269,15 +8281,11 @@ proc_invoke(VALUE proc, VALUE args /* OK */, VALUE self, VALUE klass)
     int state;
     volatile int safe = ruby_safe_level;
     volatile VALUE old_wrapper = ruby_wrapper;
-    volatile int pcall, avalue = Qtrue;
-    VALUE bvar = Qnil, tmp = args;
+    volatile int pcall;
+    VALUE bvar = Qnil;
 
     Data_Get_Struct(proc, struct BLOCK, data);
-    pcall = (data-&gt;flags &amp; BLOCK_LAMBDA) ? YIELD_LAMBDA_CALL : 0;
-    if (!pcall &amp;&amp; RARRAY(args)-&gt;len == 1) {
-	avalue = Qfalse;
-	args = RARRAY(args)-&gt;ptr[0];
-    }
+    pcall = call ? YIELD_LAMBDA_CALL : 0;
     if (rb_block_given_p() &amp;&amp; ruby_frame-&gt;callee) {
 	if (klass != ruby_frame-&gt;this_class)
 	    klass = rb_obj_class(proc);
@@ -8292,11 +8300,11 @@ proc_invoke(VALUE proc, VALUE args /* OK */, VALUE self, VALUE klass)
     _block.block_obj = bvar;
     if (self != Qundef) _block.frame.self = self;
     if (klass) _block.frame.this_class = klass;
-    _block.frame.argc = RARRAY(tmp)-&gt;len;
+    _block.frame.argc = RARRAY(args)-&gt;len;
     _block.frame.flags = ruby_frame-&gt;flags;
     if (_block.frame.argc &amp;&amp; (ruby_frame-&gt;flags &amp; FRAME_DMETH)) {
         NEWOBJ(scope, struct SCOPE);
-        OBJSETUP(scope, tmp, T_SCOPE);
+        OBJSETUP(scope, args, T_SCOPE);
         scope-&gt;local_tbl = _block.scope-&gt;local_tbl;
         scope-&gt;local_vars = _block.scope-&gt;local_vars;
         _block.scope = scope;
@@ -8304,12 +8312,12 @@ proc_invoke(VALUE proc, VALUE args /* OK */, VALUE self, VALUE klass)
     /* modify current frame */
     old_block = ruby_frame-&gt;block;
     ruby_frame-&gt;block = &amp;_block;
-    PUSH_TAG((pcall&amp;YIELD_LAMBDA_CALL) ? PROT_LAMBDA : PROT_NONE);
+    PUSH_TAG((data-&gt;flags&amp;BLOCK_LAMBDA) ? PROT_LAMBDA : PROT_NONE);
     state = EXEC_TAG();
     if (state == 0) {
 	proc_set_safe_level(proc);
 	result = rb_yield_0(args, self, (self!=Qundef)?CLASS_OF(self):0,
-			    pcall | YIELD_PROC_CALL, avalue);
+			    pcall | YIELD_PROC_CALL);
     }
     else if (TAG_DST()) {
 	result = prot_tag-&gt;retval;
@@ -8380,7 +8388,37 @@ proc_invoke(VALUE proc, VALUE args /* OK */, VALUE self, VALUE klass)
 VALUE
 rb_proc_call(VALUE proc, VALUE args /* OK */)
 {
-    return proc_invoke(proc, args, Qundef, 0);
+    return proc_invoke(proc, args, Qundef, 0, 1);
+}
+
+/*
+ *  call-seq:
+ *     prc.yield(params,...)   =&gt; obj
+ *  
+ *  Invokes the block, setting the block's parameters to the values in
+ *  &lt;i&gt;params&lt;/i&gt; in the same manner the yield statement does.
+ *     
+ *     a_proc = Proc.new {|a, *b| b.collect {|i| i*a }}
+ *     a_proc.yield(9, 1, 2, 3)   #=&gt; [9, 18, 27]
+ *     a_proc.yield([9, 1, 2, 3]) #=&gt; [9, 18, 27]
+ *     a_proc = Proc.new {|a,b| a}
+ *     a_proc.yield(1,2,3)	  # =&gt; [1]
+ */
+
+VALUE
+rb_proc_yield(int argc, VALUE *argv, VALUE proc)
+{
+    if (argc == 1)
+	return proc_invoke(proc, svalue_to_avalue(argv[0]), Qundef, 0, 0);
+    else
+	return proc_invoke(proc, rb_ary_new4(argc, argv), Qundef, 0, 0);
+}
+
+static VALUE
+nil_yield(int argc, VALUE *argv)
+{
+    localjump_error(&quot;no block given&quot;, Qnil, 0, backtrace(0));
+    return Qnil;		/* not reached */
 }
 
 int
@@ -8393,7 +8431,8 @@ rb_proc_arity(VALUE proc)
     Data_Get_Struct(proc, struct BLOCK, data);
     var = data-&gt;var;
     if (var == 0) {
-	if (data-&gt;body &amp;&amp; nd_type(data-&gt;body) == NODE_IFUNC &amp;&amp;
+	if (!data-&gt;body) return 0;
+	if (nd_type(data-&gt;body) == NODE_IFUNC &amp;&amp;
 	    data-&gt;body-&gt;nd_cfnc == bmcall) {
 	    return method_arity(data-&gt;body-&gt;nd_tval);
 	}
@@ -8416,7 +8455,12 @@ rb_proc_arity(VALUE proc)
 	    n++;
 	    list = list-&gt;nd_next;
 	}
-	if (var-&gt;nd_args) return -n-1;
+	if (var-&gt;nd_args) {
+	    if (nd_type(var-&gt;nd_args) == NODE_POSTARG) {
+		return -n-1-var-&gt;nd_args-&gt;nd_head-&gt;nd_alen;
+	    }
+	    return -n-1;
+	}
 	return n;
     }
 }
@@ -8699,14 +8743,14 @@ mnew(VALUE klass, VALUE obj, ID id, VALUE mklass)
 {
     VALUE method;
     NODE *body;
-    int noex;
     struct METHOD *data;
     VALUE rklass = klass;
     ID oid = id;
+    int noex = LOOKUP_NORMAL;
 
   again:
     if ((body = rb_get_method_body(&amp;klass, &amp;id, &amp;noex)) == 0) {
-	print_undef(rklass, oid);
+	raise_undef(rklass, oid);
     }
 
     if (nd_type(body) == NODE_ZSUPER) {
@@ -8844,7 +8888,9 @@ method_unbind(VALUE obj)
  *  &lt;code&gt;Method&lt;/code&gt; object (or raising &lt;code&gt;NameError&lt;/code&gt;). The
  *  &lt;code&gt;Method&lt;/code&gt; object acts as a closure in &lt;i&gt;obj&lt;/i&gt;'s object
  *  instance, so instance variables and the value of &lt;code&gt;self&lt;/code&gt;
- *  remain available.
+ *  remain available.  Looks for private methods if optional second
+ *  argument is true.
+
  *     
  *     class Demo
  *       def initialize(n)
@@ -8874,8 +8920,8 @@ rb_obj_method(VALUE obj, VALUE vid)
  *  call-seq:
  *     mod.instance_method(symbol)   =&gt; unbound_method
  *  
- *  Returns an +UnboundMethod+ representing the given
- *  instance method in _mod_.
+ *  Returns an +UnboundMethod+ representing the given instance method
+ *  in _mod_.
  *     
  *     class Interpreter
  *       def do_a() print &quot;there, &quot;; end
@@ -9056,12 +9102,12 @@ static VALUE
 umethod_bind(VALUE method, VALUE recv)
 {
     struct METHOD *data, *bound;
-    VALUE rklass = CLASS_OF(recv), klass = rklass;
+    VALUE rklass = CLASS_OF(recv);
 
     Data_Get_Struct(method, struct METHOD, data);
     if (data-&gt;rklass != rklass) {
 	if (FL_TEST(data-&gt;rklass, FL_SINGLETON)) {
-	    rb_raise(rb_eTypeError, &quot;singleton method called for a different object&quot;);
+	    rb_raise(rb_eTypeError, &quot;singleton method bound for a different object&quot;);
 	}
 	if (TYPE(data-&gt;rklass) == T_MODULE) {
 	    st_table *m_tbl = RCLASS(data-&gt;rklass)-&gt;m_tbl;
@@ -9080,7 +9126,6 @@ umethod_bind(VALUE method, VALUE recv)
     method = Data_Make_Struct(rb_cMethod,struct METHOD,bm_mark,free,bound);
     *bound = *data;
     bound-&gt;recv = recv;
-    bound-&gt;klass = klass;
     bound-&gt;rklass = rklass;
 
     return method;
@@ -9109,8 +9154,14 @@ rb_node_arity(NODE *body)
 	    body = body-&gt;nd_head;
 	if (!body) return 0;
 	n = body-&gt;nd_frml ? RARRAY(body-&gt;nd_frml)-&gt;len : 0;
-	if (body-&gt;nd_opt || body-&gt;nd_rest)
+	if (body-&gt;nd_opt)
+	    return -n-1;
+	if (body-&gt;nd_rest) {
+	    if (nd_type(body-&gt;nd_rest) == NODE_POSTARG) {
+		return -n-1-body-&gt;nd_rest-&gt;nd_head-&gt;nd_alen;
+	    }
 	    n = -n-1;
+	}
 	return n;
       default:
 	rb_raise(rb_eArgError, &quot;invalid node 0x%x&quot;, nd_type(body));
@@ -9195,7 +9246,7 @@ method_inspect(VALUE 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;);
@@ -9451,6 +9502,7 @@ Init_Proc(void)
     rb_define_method(rb_cProc, &quot;clone&quot;, proc_clone, 0);
     rb_define_method(rb_cProc, &quot;dup&quot;, proc_dup, 0);
     rb_define_method(rb_cProc, &quot;call&quot;, rb_proc_call, -2);
+    rb_define_method(rb_cProc, &quot;yield&quot;, rb_proc_yield, -1);
     rb_define_method(rb_cProc, &quot;arity&quot;, proc_arity, 0);
     rb_define_method(rb_cProc, &quot;[]&quot;, rb_proc_call, -2);
     rb_define_method(rb_cProc, &quot;==&quot;, proc_eq, 1);
@@ -9463,6 +9515,8 @@ Init_Proc(void)
     rb_define_global_function(&quot;proc&quot;, rb_block_proc, 0);
     rb_define_global_function(&quot;lambda&quot;, proc_lambda, 0);
 
+    rb_define_method(rb_cNilClass, &quot;yield&quot;, nil_yield, -1);
+
     rb_cMethod = rb_define_class(&quot;Method&quot;, rb_cObject);
     rb_undef_alloc_func(rb_cMethod);
     rb_undef_method(CLASS_OF(rb_cMethod), &quot;new&quot;);
@@ -10790,6 +10844,7 @@ rb_thread_fd_writable(int fd)
     if (rb_thread_critical) return Qtrue;
     if (curr_thread == curr_thread-&gt;next) return Qtrue;
     if (curr_thread-&gt;status == THREAD_TO_KILL) return Qtrue;
+    if (curr_thread-&gt;status == THREAD_KILLED) return Qtrue;
 
     curr_thread-&gt;status = THREAD_STOPPED;
     FD_ZERO(&amp;curr_thread-&gt;readfds);
@@ -11838,7 +11893,7 @@ rb_thread_terminated(rb_thread_t th, int state, enum thread_status status)
 		rb_thread_main_jump(ruby_errinfo, RESTORE_RAISE);
 	    }
 	}
-	else if (th-&gt;safe &lt; 4 &amp;&amp; (ruby_thread_abort || th-&gt;abort || RTEST(ruby_debug))) {
+	else if (th-&gt;safe &lt; 4 &amp;&amp; (ruby_thread_abort||th-&gt;abort||RTEST(ruby_debug))) {
 	    /* exit on main_thread */
 	    error_print();
 	    rb_thread_main_jump(ruby_errinfo, RESTORE_EXIT);
@@ -11923,7 +11978,7 @@ rb_thread_yield(VALUE arg, rb_thread_t th)
     rb_dvar_push('~', Qnil);
     ruby_frame-&gt;block-&gt;dyna_vars = ruby_dyna_vars;
 
-    return rb_yield_0(arg, 0, 0, YIELD_LAMBDA_CALL, Qtrue);
+    return rb_yield_0(arg, 0, 0, YIELD_LAMBDA_CALL);
 }
 
 /*
@@ -12972,7 +13027,7 @@ rb_f_catch(VALUE dmy, VALUE tag)
     tag = ID2SYM(rb_to_id(tag));
     PUSH_TAG(tag);
     if ((state = EXEC_TAG()) == 0) {
-	val = rb_yield_0(tag, 0, 0, 0, Qfalse);
+	val = rb_yield_0(tag, 0, 0, 0);
     }
     else if (state == TAG_THROW &amp;&amp; tag == prot_tag-&gt;dst) {
 	val = prot_tag-&gt;retval;</diff>
      <filename>eval.c</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,8 @@
 iconv/iconv.c
 nkf/lib/kconv.rb
 nkf/nkf.c
+socket/socket.c
 stringio/stringio.c
 strscan/strscan.c
-zlib/zlib.c
 win32ole
+zlib/zlib.c</diff>
      <filename>ext/.document</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,6 @@
 #digest/sha1
 #digest/sha2
 #dl
-#enumerator
 #etc
 #fcntl
 #gdbm</diff>
      <filename>ext/Setup</filename>
    </modified>
    <modified>
      <diff>@@ -302,7 +302,7 @@ VpNewRbClass(U_LONG mx, char *str, VALUE klass)
 }
 
 VP_EXPORT Real *
-VpCreateRbObject(U_LONG mx, char *str)
+VpCreateRbObject(U_LONG mx, const char *str)
 {
     Real *pv = VpAlloc(mx,str);
     pv-&gt;obj = (VALUE)Data_Wrap_Struct(rb_cBigDecimal, 0, BigDecimal_delete, pv);
@@ -917,7 +917,7 @@ BigDecimal_round(int argc, VALUE *argv, VALUE self)
 {
     ENTER(5);
     Real   *c, *a;
-    int    iLoc;
+    int    iLoc = 0;
     U_LONG mx;
     VALUE  vLoc;
     VALUE  vRound;
@@ -1578,7 +1578,7 @@ VpIsNegDoubleZero(double v)
 }
 
 VP_EXPORT int
-VpException(unsigned short f,char *str,int always)
+VpException(unsigned short f, const char *str,int always)
 {
     VALUE exc;
     int   fatal=0;
@@ -1720,7 +1720,7 @@ NaN:
  *    returns number of chars needed to represent vp in specified format.
  */
 VP_EXPORT U_LONG
-VpNumOfChars(Real *vp,char *pszFmt)
+VpNumOfChars(Real *vp,const char *pszFmt)
 {
     S_INT  ex;
     U_LONG nc;
@@ -1873,7 +1873,7 @@ overflow:
  *   NULL be returned if memory allocation is failed,or any error.
  */
 VP_EXPORT Real *
-VpAlloc(U_LONG mx, char *szVal)
+VpAlloc(U_LONG mx, const char *szVal)
 {
     U_LONG i, ni, ipn, ipf, nf, ipe, ne, nalloc;
     char v,*psz;
@@ -3277,7 +3277,7 @@ VpToFString(Real *a,char *psz,int fFmt,int fPlus)
  *   ne   ... number of characters in exp_chr[],not including '+/-'.
  */
 VP_EXPORT int
-VpCtoV(Real *a, char *int_chr, U_LONG ni, char *frac, U_LONG nf, char *exp_chr, U_LONG ne)
+VpCtoV(Real *a, const char *int_chr, U_LONG ni, const char *frac, U_LONG nf, const char *exp_chr, U_LONG ne)
 {
     U_LONG i, j, ind_a, ma, mi, me;
     U_LONG loc;</diff>
      <filename>ext/bigdecimal/bigdecimal.c</filename>
    </modified>
    <modified>
      <diff>@@ -105,7 +105,7 @@ typedef struct {
 VP_EXPORT  Real *
 VpNewRbClass(U_LONG mx,char *str,VALUE klass);
 
-VP_EXPORT  Real *VpCreateRbObject(U_LONG mx,char *str);
+VP_EXPORT  Real *VpCreateRbObject(U_LONG mx,const char *str);
 
 VP_EXPORT U_LONG VpBaseFig(void);
 VP_EXPORT U_LONG VpDblFig(void);
@@ -126,13 +126,13 @@ VP_EXPORT int           VpIsRoundMode(unsigned long n);
 VP_EXPORT unsigned long VpGetRoundMode(void);
 VP_EXPORT unsigned long VpSetRoundMode(unsigned long n);
 
-VP_EXPORT int VpException(unsigned short f,char *str,int always);
+VP_EXPORT int VpException(unsigned short f,const char *str,int always);
 VP_EXPORT int VpIsNegDoubleZero(double v);
-VP_EXPORT U_LONG VpNumOfChars(Real *vp,char *pszFmt);
+VP_EXPORT U_LONG VpNumOfChars(Real *vp,const char *pszFmt);
 VP_EXPORT U_LONG VpInit(U_LONG BaseVal);
 VP_EXPORT void *VpMemAlloc(U_LONG mb);
 VP_EXPORT void VpFree(Real *pv);
-VP_EXPORT Real *VpAlloc(U_LONG mx, char *szVal);
+VP_EXPORT Real *VpAlloc(U_LONG mx, const char *szVal);
 VP_EXPORT int VpAsgn(Real *c,Real *a,int isw);
 VP_EXPORT int VpAddSub(Real *c,Real *a,Real *b,int operation);
 VP_EXPORT int VpMult(Real *c,Real *a,Real *b);
@@ -143,7 +143,7 @@ VP_EXPORT void VpSzMantissa(Real *a,char *psz);
 VP_EXPORT int VpToSpecialString(Real *a,char *psz,int fPlus);
 VP_EXPORT void VpToString(Real *a,char *psz,int fFmt,int fPlus);
 VP_EXPORT void VpToFString(Real *a,char *psz,int fFmt,int fPlus);
-VP_EXPORT int VpCtoV(Real *a,char *int_chr,U_LONG ni,char *frac,U_LONG nf,char *exp_chr,U_LONG ne);
+VP_EXPORT int VpCtoV(Real *a,const char *int_chr,U_LONG ni,const char *frac,U_LONG nf,const char *exp_chr,U_LONG ne);
 VP_EXPORT int VpVtoD(double *d,S_LONG *e,Real *m);
 VP_EXPORT void VpDtoV(Real *m,double d);
 VP_EXPORT void VpItoV(Real *m,S_INT ival);</diff>
      <filename>ext/bigdecimal/bigdecimal.h</filename>
    </modified>
    <modified>
      <diff>@@ -90,8 +90,7 @@ no_window()
 } while (0)
 
 static void
-free_window(winp)
-    struct windata *winp;
+free_window(struct windata *winp)
 {
     if (winp-&gt;window &amp;&amp; winp-&gt;window != stdscr) delwin(winp-&gt;window);
     winp-&gt;window = 0;
@@ -99,9 +98,7 @@ free_window(winp)
 }
 
 static VALUE
-prep_window(class, window)
-    VALUE class;
-    WINDOW *window;
+prep_window(VALUE class, WINDOW *window)
 {
     VALUE obj;
     struct windata *winp;
@@ -178,8 +175,7 @@ curses_closed()
 
 /* def clear */
 static VALUE
-curses_clear(obj)
-    VALUE obj;
+curses_clear(VALUE obj)
 {
     curses_stdscr();
     wclear(stdscr);
@@ -197,8 +193,7 @@ curses_clrtoeol()
 
 /* def refresh */
 static VALUE
-curses_refresh(obj)
-    VALUE obj;
+curses_refresh(VALUE obj)
 {
     curses_stdscr();
     refresh();
@@ -207,8 +202,7 @@ curses_refresh(obj)
 
 /* def doupdate */
 static VALUE
-curses_doupdate(obj)
-    VALUE obj;
+curses_doupdate(VALUE obj)
 {
     curses_stdscr();
 #ifdef HAVE_DOUPDATE
@@ -221,8 +215,7 @@ curses_doupdate(obj)
 
 /* def echo */
 static VALUE
-curses_echo(obj)
-    VALUE obj;
+curses_echo(VALUE obj)
 {
     curses_stdscr();
     echo();
@@ -231,8 +224,7 @@ curses_echo(obj)
 
 /* def noecho */
 static VALUE
-curses_noecho(obj)
-    VALUE obj;
+curses_noecho(VALUE obj)
 {
     curses_stdscr();
     noecho();
@@ -241,8 +233,7 @@ curses_noecho(obj)
 
 /* def raw */
 static VALUE
-curses_raw(obj)
-    VALUE obj;
+curses_raw(VALUE obj)
 {
     curses_stdscr();
     raw();
@@ -251,8 +242,7 @@ curses_raw(obj)
 
 /* def noraw */
 static VALUE
-curses_noraw(obj)
-    VALUE obj;
+curses_noraw(VALUE obj)
 {
     curses_stdscr();
     noraw();
@@ -261,8 +251,7 @@ curses_noraw(obj)
 
 /* def cbreak */
 static VALUE
-curses_cbreak(obj)
-    VALUE obj;
+curses_cbreak(VALUE obj)
 {
     curses_stdscr();
     cbreak();
@@ -271,8 +260,7 @@ curses_cbreak(obj)
 
 /* def nocbreak */
 static VALUE
-curses_nocbreak(obj)
-    VALUE obj;
+curses_nocbreak(VALUE obj)
 {
     curses_stdscr();
     nocbreak();
@@ -281,8 +269,7 @@ curses_nocbreak(obj)
 
 /* def nl */
 static VALUE
-curses_nl(obj)
-    VALUE obj;
+curses_nl(VALUE obj)
 {
     curses_stdscr();
     nl();
@@ -291,8 +278,7 @@ curses_nl(obj)
 
 /* def nonl */
 static VALUE
-curses_nonl(obj)
-    VALUE obj;
+curses_nonl(VALUE obj)
 {
     curses_stdscr();
     nonl();
@@ -301,8 +287,7 @@ curses_nonl(obj)
 
 /* def beep */
 static VALUE
-curses_beep(obj)
-    VALUE obj;
+curses_beep(VALUE obj)
 {
 #ifdef HAVE_BEEP
     curses_stdscr();
@@ -313,8 +298,7 @@ curses_beep(obj)
 
 /* def flash */
 static VALUE
-curses_flash(obj)
-    VALUE obj;
+curses_flash(VALUE obj)
 {
 #ifdef HAVE_FLASH
     curses_stdscr();
@@ -325,9 +309,7 @@ curses_flash(obj)
 
 /* def ungetch */
 static VALUE
-curses_ungetch(obj, ch)
-    VALUE obj;
-    VALUE ch;
+curses_ungetch(VALUE obj, VALUE ch)
 {
 #ifdef HAVE_UNGETCH
     curses_stdscr();
@@ -340,10 +322,7 @@ curses_ungetch(obj, ch)
 
 /* def setpos(y, x) */
 static VALUE
-curses_setpos(obj, y, x)
-    VALUE obj;
-    VALUE y;
-    VALUE x;
+curses_setpos(VALUE obj, VALUE y, VALUE x)
 {
     curses_stdscr();
     move(NUM2INT(y), NUM2INT(x));
@@ -352,8 +331,7 @@ curses_setpos(obj, y, x)
 
 /* def standout */
 static VALUE
-curses_standout(obj)
-    VALUE obj;
+curses_standout(VALUE obj)
 {
     standout();
     return Qnil;
@@ -361,8 +339,7 @@ curses_standout(obj)
 
 /* def standend */
 static VALUE
-curses_standend(obj)
-    VALUE obj;
+curses_standend(VALUE obj)
 {
     standend();
     return Qnil;
@@ -370,8 +347,7 @@ curses_standend(obj)
 
 /* def inch */
 static VALUE
-curses_inch(obj)
-    VALUE obj;
+curses_inch(VALUE obj)
 {
     curses_stdscr();
     return CH2FIX(inch());
@@ -379,9 +355,7 @@ curses_inch(obj)
 
 /* def addch(ch) */
 static VALUE
-curses_addch(obj, ch)
-    VALUE obj;
-    VALUE ch;
+curses_addch(VALUE obj, VALUE ch)
 {
     curses_stdscr();
     addch(NUM2CH(ch));
@@ -390,9 +364,7 @@ curses_addch(obj, ch)
 
 /* def insch(ch) */
 static VALUE
-curses_insch(obj, ch)
-    VALUE obj;
-    VALUE ch;
+curses_insch(VALUE obj, VALUE ch)
 {
     curses_stdscr();
     insch(NUM2CH(ch));
@@ -401,9 +373,7 @@ curses_insch(obj, ch)
 
 /* def addstr(str) */
 static VALUE
-curses_addstr(obj, str)
-    VALUE obj;
-    VALUE str;
+curses_addstr(VALUE obj, VALUE str)
 {
     curses_stdscr();
     if (!NIL_P(str)) {
@@ -414,8 +384,7 @@ curses_addstr(obj, str)
 
 /* def getch */
 static VALUE
-curses_getch(obj)
-    VALUE obj;
+curses_getch(VALUE obj)
 {
     rb_read_check(stdin);
     curses_stdscr();
@@ -424,8 +393,7 @@ curses_getch(obj)
 
 /* def getstr */
 static VALUE
-curses_getstr(obj)
-    VALUE obj;
+curses_getstr(VALUE obj)
 {
     char rtn[1024]; /* This should be big enough.. I hope */
 
@@ -440,8 +408,7 @@ curses_getstr(obj)
 
 /* def delch */
 static VALUE
-curses_delch(obj)
-    VALUE obj;
+curses_delch(VALUE obj)
 {
     delch();
     return Qnil;
@@ -449,8 +416,7 @@ curses_delch(obj)
 
 /* def delelteln */
 static VALUE
-curses_deleteln(obj)
-    VALUE obj;
+curses_deleteln(VALUE obj)
 {
 #if defined(HAVE_DELETELN) || defined(deleteln)
     deleteln();
@@ -460,8 +426,7 @@ curses_deleteln(obj)
 
 /* def insertln */
 static VALUE
-curses_insertln(obj)
-    VALUE obj;
+curses_insertln(VALUE obj)
 {
 #if defined(HAVE_INSERTLN) || defined(insertln)
     insertln();
@@ -471,9 +436,7 @@ curses_insertln(obj)
 
 /* def keyname */
 static VALUE
-curses_keyname(obj, c)
-    VALUE obj;
-    VALUE c;
+curses_keyname(VALUE obj, VALUE c)
 {
 #ifdef HAVE_KEYNAME
   const char *name;
@@ -768,12 +731,7 @@ window_s_allocate(VALUE class)
 
 /* def initialize(h, w, top, left) */
 static VALUE
-window_initialize(obj, h, w, top, left)
-    VALUE obj;
-    VALUE h;
-    VALUE w;
-    VALUE top;
-    VALUE left;
+window_initialize(VALUE obj, VALUE h, VALUE w, VALUE top, VALUE left)
 {
     struct windata *winp;
     WINDOW *window;
@@ -791,12 +749,7 @@ window_initialize(obj, h, w, top, left)
 
 /* def subwin(height, width, top, left) */
 static VALUE
-window_subwin(obj, height, width, top, left)
-    VALUE obj;
-    VALUE height;
-    VALUE width;
-    VALUE top;
-    VALUE left;
+window_subwin(VALUE obj, VALUE height, VALUE width, VALUE top, VALUE left)
 {
     struct windata *winp;
     WINDOW *window;
@@ -816,8 +769,7 @@ window_subwin(obj, height, width, top, left)
 
 /* def close */
 static VALUE
-window_close(obj)
-    VALUE obj;
+window_close(VALUE obj)
 {
     struct windata *winp;
     
@@ -830,8 +782,7 @@ window_close(obj)
 
 /* def clear */
 static VALUE
-window_clear(obj)
-    VALUE obj;
+window_clear(VALUE obj)
 {
     struct windata *winp;
     
@@ -843,8 +794,7 @@ window_clear(obj)
 
 /* def clrtoeol */
 static VALUE
-window_clrtoeol(obj)
-    VALUE obj;
+window_clrtoeol(VALUE obj)
 {
     struct windata *winp;
     
@@ -856,8 +806,7 @@ window_clrtoeol(obj)
 
 /* def refresh */
 static VALUE
-window_refresh(obj)
-    VALUE obj;
+window_refresh(VALUE obj)
 {
     struct windata *winp;
     
@@ -869,8 +818,7 @@ window_refresh(obj)
 
 /* def noutrefresh */
 static VALUE
-window_noutrefresh(obj)
-    VALUE obj;
+window_noutrefresh(VALUE obj)
 {
     struct windata *winp;
 
@@ -886,10 +834,7 @@ window_noutrefresh(obj)
 
 /* def move(y, x) */
 static VALUE
-window_move(obj, y, x)
-    VALUE obj;
-    VALUE y;
-    VALUE x;
+window_move(VALUE obj, VALUE y, VALUE x)
 {
     struct windata *winp;
     
@@ -901,10 +846,7 @@ window_move(obj, y, x)
 
 /* def setpos(y, x) */
 static VALUE
-window_setpos(obj, y, x)
-    VALUE obj;
-    VALUE y;
-    VALUE x;
+window_setpos(VALUE obj, VALUE y, VALUE x)
 {
     struct windata *winp;
     
@@ -915,8 +857,7 @@ window_setpos(obj, y, x)
 
 /* def cury */
 static VALUE
-window_cury(obj)
-    VALUE obj;
+window_cury(VALUE obj)
 {
     struct windata *winp;
     int x, y;
@@ -928,8 +869,7 @@ window_cury(obj)
 
 /* def curx */
 static VALUE
-window_curx(obj)
-    VALUE obj;
+window_curx(VALUE obj)
 {
     struct windata *winp;
     int x, y;
@@ -941,8 +881,7 @@ window_curx(obj)
 
 /* def maxy */
 static VALUE
-window_maxy(obj)
-    VALUE obj;
+window_maxy(VALUE obj)
 {
     struct windata *winp;
 
@@ -962,8 +901,7 @@ window_maxy(obj)
 
 /* def maxx */
 static VALUE
-window_maxx(obj)
-    VALUE obj;
+window_maxx(VALUE obj)
 {
     struct windata *winp;
 
@@ -983,8 +921,7 @@ window_maxx(obj)
 
 /* def begy */
 static VALUE
-window_begy(obj)
-    VALUE obj;
+window_begy(VALUE obj)
 {
     struct windata *winp;
     int x, y;
@@ -1000,8 +937,7 @@ window_begy(obj)
 
 /* def begx */
 static VALUE
-window_begx(obj)
-    VALUE obj;
+window_begx(VALUE obj)
 {
     struct windata *winp;
     int x, y;
@@ -1053,8 +989,7 @@ window_box(argc, argv, self)
 
 /* def standout */
 static VALUE
-window_standout(obj)
-    VALUE obj;
+window_standout(VALUE obj)
 {
     struct windata *winp;
     
@@ -1065,8 +1000,7 @@ window_standout(obj)
 
 /* def standend */
 static VALUE
-window_standend(obj)
-    VALUE obj;
+window_standend(VALUE obj)
 {
     struct windata *winp;
     
@@ -1077,8 +1011,7 @@ window_standend(obj)
 
 /* def inch */
 static VALUE
-window_inch(obj)
-    VALUE obj;
+window_inch(VALUE obj)
 {
     struct windata *winp;
     
@@ -1088,9 +1021,7 @@ window_inch(obj)
 
 /* def addch(ch) */
 static VALUE
-window_addch(obj, ch)
-    VALUE obj;
-    VALUE ch;
+window_addch(VALUE obj, VALUE ch)
 {
     struct windata *winp;
     
@@ -1102,9 +1033,7 @@ window_addch(obj, ch)
 
 /* def insch(ch) */
 static VALUE
-window_insch(obj, ch)
-    VALUE obj;
-    VALUE ch;
+window_insch(VALUE obj, VALUE ch)
 {
     struct windata *winp;
     
@@ -1116,9 +1045,7 @@ window_insch(obj, ch)
 
 /* def addstr(str) */
 static VALUE
-window_addstr(obj, str)
-    VALUE obj;
-    VALUE str;
+window_addstr(VALUE obj, VALUE str)
 {
     if (!NIL_P(str)) {
 	struct windata *winp;
@@ -1131,9 +1058,7 @@ window_addstr(obj, str)
 
 /* def &lt;&lt;(str) */
 static VALUE
-window_addstr2(obj, str)
-    VALUE obj;
-    VALUE str;
+window_addstr2(VALUE obj, VALUE str)
 {
     window_addstr(obj, str);
     return obj;
@@ -1141,8 +1066,7 @@ window_addstr2(obj, str)
 
 /* def getch */
 static VALUE
-window_getch(obj)
-    VALUE obj;
+window_getch(VALUE obj)
 {
     struct windata *winp;
     
@@ -1153,8 +1077,7 @@ window_getch(obj)
 
 /* def getstr */
 static VALUE
-window_getstr(obj)
-    VALUE obj;
+window_getstr(VALUE obj)
 {
     struct windata *winp;
     char rtn[1024]; /* This should be big enough.. I hope */
@@ -1171,8 +1094,7 @@ window_getstr(obj)
 
 /* def delch */
 static VALUE
-window_delch(obj)
-    VALUE obj;
+window_delch(VALUE obj)
 {
     struct windata *winp;
     
@@ -1183,8 +1105,7 @@ window_delch(obj)
 
 /* def delelteln */
 static VALUE
-window_deleteln(obj)
-    VALUE obj;
+window_deleteln(VALUE obj)
 {
 #if defined(HAVE_WDELETELN) || defined(wdeleteln)
     struct windata *winp;
@@ -1197,8 +1118,7 @@ window_deleteln(obj)
 
 /* def insertln */
 static VALUE
-window_insertln(obj)
-    VALUE obj;
+window_insertln(VALUE obj)
 {
 #if defined(HAVE_WINSERTLN) || defined(winsertln)
     struct windata *winp;</diff>
      <filename>ext/curses/curses.c</filename>
    </modified>
    <modified>
      <diff>@@ -70,8 +70,7 @@ safe_setup_str(str)
 
 #ifdef HAVE_GETPWENT
 static VALUE
-setup_passwd(pwd)
-    struct passwd *pwd;
+setup_passwd(struct passwd *pwd)
 {
     if (pwd == 0) rb_sys_fail(&quot;/etc/passwd&quot;);
     return rb_struct_new(sPasswd,
@@ -119,10 +118,7 @@ setup_passwd(pwd)
  * passwd=&quot;x&quot;, uid=0, gid=0, gecos=&quot;root&quot;,dir=&quot;/root&quot;, shell=&quot;/bin/bash&quot;&gt;
  */
 static VALUE
-etc_getpwuid(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+etc_getpwuid(int argc, VALUE *argv, VALUE obj)
 {
 #if defined(HAVE_GETPWENT)
     VALUE id;
@@ -153,8 +149,7 @@ etc_getpwuid(argc, argv, obj)
  * passwd=&quot;x&quot;, uid=0, gid=0, gecos=&quot;root&quot;,dir=&quot;/root&quot;, shell=&quot;/bin/bash&quot;&gt;
  */
 static VALUE
-etc_getpwnam(obj, nam)
-    VALUE obj, nam;
+etc_getpwnam(VALUE obj, VALUE nam)
 {
 #ifdef HAVE_GETPWENT
     struct passwd *pwd;
@@ -207,8 +202,7 @@ passwd_iterate()
  *
  */
 static VALUE
-etc_passwd(obj)
-    VALUE obj;
+etc_passwd(VALUE obj)
 {
 #ifdef HAVE_GETPWENT
     struct passwd *pw;
@@ -232,8 +226,7 @@ etc_passwd(obj)
  * to getpwent will return the first entry again.
  */
 static VALUE
-etc_setpwent(obj)
-    VALUE obj;
+etc_setpwent(VALUE obj)
 {
 #ifdef HAVE_GETPWENT
     setpwent();
@@ -245,8 +238,7 @@ etc_setpwent(obj)
  * getpwent, and closes the file.
  */
 static VALUE
-etc_endpwent(obj)
-    VALUE obj;
+etc_endpwent(VALUE obj)
 {
 #ifdef HAVE_GETPWENT
     endpwent();
@@ -281,8 +273,7 @@ etc_endpwent(obj)
  * - Passwd#shell contains the path to the login shell of the user as a String.
  */
 static VALUE
-etc_getpwent(obj)
-    VALUE obj;
+etc_getpwent(VALUE obj)
 {
 #ifdef HAVE_GETPWENT
     struct passwd *pw;
@@ -296,8 +287,7 @@ etc_getpwent(obj)
 
 #ifdef HAVE_GETGRENT
 static VALUE
-setup_group(grp)
-    struct group *grp;
+setup_group(struct group *grp)
 {
     VALUE mem;
     char **tbl;
@@ -329,8 +319,7 @@ setup_group(grp)
  *
  */
 static VALUE
-etc_getgrgid(obj, id)
-    VALUE obj, id;
+etc_getgrgid(VALUE obj, VALUE id)
 {
 #ifdef HAVE_GETGRENT
     int gid;
@@ -357,8 +346,7 @@ etc_getgrgid(obj, id)
  *
  */
 static VALUE
-etc_getgrnam(obj, nam)
-    VALUE obj, nam;
+etc_getgrnam(VALUE obj, VALUE nam)
 {
 #ifdef HAVE_GETGRENT
     struct group *grp;
@@ -412,8 +400,7 @@ group_iterate()
  *
  */
 static VALUE
-etc_group(obj)
-    VALUE obj;
+etc_group(VALUE obj)
 {
 #ifdef HAVE_GETGRENT
     struct group *grp;
@@ -437,8 +424,7 @@ etc_group(obj)
  * to getgrent will return the first entry again.
  */
 static VALUE
-etc_setgrent(obj)
-    VALUE obj;
+etc_setgrent(VALUE obj)
 {
 #ifdef HAVE_GETGRENT
     setgrent();
@@ -450,8 +436,7 @@ etc_setgrent(obj)
  * getgrent, and closes the file.
  */
 static VALUE
-etc_endgrent(obj)
-    VALUE obj;
+etc_endgrent(VALUE obj)
 {
 #ifdef HAVE_GETGRENT
     endgrent();
@@ -480,8 +465,7 @@ etc_endgrent(obj)
  *   members of the group.
  */
 static VALUE
-etc_getgrent(obj)
-    VALUE obj;
+etc_getgrent(VALUE obj)
 {
 #ifdef HAVE_GETGRENT
     struct group *gr;</diff>
      <filename>ext/etc/etc.c</filename>
    </modified>
    <modified>
      <diff>@@ -233,7 +233,7 @@ def parse_args()
     opts.on('--make=MAKE') do |v|
       $make = v || 'make'
     end
-    opts.on('--make-flags=FLAGS', '--mflags', Shellwords) do |v|
+    opts.on('--make-flags=FLAGS', '--mflags', Shellwords) do |*v|
       v.grep(/\A([-\w]+)=(.*)/) {$configure_args[&quot;--#{$1}&quot;] = $2}
       if arg = v.first
         arg.insert(0, '-') if /\A[^-][^=]*\Z/ =~ arg
@@ -258,7 +258,7 @@ def parse_args()
   $mflags.unshift(*rest) unless rest.empty?
 
   def $mflags.set?(flag)
-    grep(/\A-(?!-).*#{'%c' % flag}/i) { return true }
+    grep(/\A-(?!-).*#{'%s' % flag}/i) { return true }
     false
   end
   def $mflags.defined?(var)</diff>
      <filename>ext/extmk.rb</filename>
    </modified>
    <modified>
      <diff>@@ -166,7 +166,7 @@ iconv_create(VALUE to, VALUE from, struct rb_iconv_opt_t *opt)
 	}
 	if (cd == (iconv_t)-1) {
 	    int inval = errno == EINVAL;
-	    char *s = inval ? &quot;invalid encoding &quot; : &quot;iconv&quot;;
+	    const char *s = inval ? &quot;invalid encoding &quot; : &quot;iconv&quot;;
 	    volatile VALUE msg = rb_str_new(0, strlen(s) + RSTRING(to)-&gt;len +
 					    RSTRING(from)-&gt;len + 8);
 </diff>
      <filename>ext/iconv/iconv.c</filename>
    </modified>
    <modified>
      <diff>@@ -75,8 +75,7 @@ struct wait_readable_arg {
 
 #ifdef HAVE_RB_FD_INIT
 static VALUE
-wait_readable(p)
-    VALUE p;
+wait_readable(VALUE p)
 {
     struct wait_readable_arg *arg = (struct wait_readable_arg *)p;
     rb_fdset_t *fds = &amp;arg-&gt;fds;</diff>
      <filename>ext/io/wait/wait.c</filename>
    </modified>
    <modified>
      <diff>@@ -1902,18 +1902,14 @@ const int score_table_F0[] = {
     SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST, SCORE_ERROR,
 };
 
-void set_code_score(ptr, score)
-     struct input_code *ptr;
-     int score;
+void set_code_score(struct input_code *ptr, int score)
 {
     if (ptr){
         ptr-&gt;score |= score;
     }
 }
 
-void clr_code_score(ptr, score)
-     struct input_code *ptr;
-     int score;
+void clr_code_score(struct input_code *ptr, int score)
 {
     if (ptr){
         ptr-&gt;score &amp;= ~score;
@@ -1944,8 +1940,7 @@ void code_score(ptr)
     }
 }
 
-void status_disable(ptr)
-struct input_code *ptr;
+void status_disable(struct input_code *ptr)
 {
     ptr-&gt;stat = -1;
     ptr-&gt;buf[0] = -1;
@@ -1953,46 +1948,37 @@ struct input_code *ptr;
     if (iconv == ptr-&gt;iconv_func) set_iconv(FALSE, 0);
 }
 
-void status_push_ch(ptr, c)
-     struct input_code *ptr;
-     int c;
+void status_push_ch(struct input_code *ptr, int c)
 {
     ptr-&gt;buf[ptr-&gt;index++] = c;
 }
 
-void status_clear(ptr)
-     struct input_code *ptr;
+void status_clear(struct input_code *ptr)
 {
     ptr-&gt;stat = 0;
     ptr-&gt;index = 0;
 }
 
-void status_reset(ptr)
-     struct input_code *ptr;
+void status_reset(struct input_code *ptr)
 {
     status_clear(ptr);
     ptr-&gt;score = SCORE_INIT;
 }
 
-void status_reinit(ptr)
-     struct input_code *ptr;
+void status_reinit(struct input_code *ptr)
 {
     status_reset(ptr);
     ptr-&gt;_file_stat = 0;
 }
 
-void status_check(ptr, c)
-     struct input_code *ptr;
-     int c;
+void status_check(struct input_code *ptr, int c)
 {
     if (c &lt;= DEL &amp;&amp; estab_f){
         status_reset(ptr);
     }
 }
 
-void s_status(ptr, c)
-     struct input_code *ptr;
-     int c;
+void s_status(struct input_code *ptr, int c)
 {
     switch(ptr-&gt;stat){
       case -1:
@@ -3062,9 +3048,7 @@ w_iconv(c2, c1, c0)
 
 #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
 void
-w16w_conv(val, p2, p1, p0)
-     unsigned short val;
-     int *p2, *p1, *p0;
+w16w_conv(unsigned short val, int *p2, int *p1, int *p0)
 {
     if (val &lt; 0x80){
         *p2 = val;
@@ -3771,9 +3755,7 @@ s_oconv(c2, c1)
 }
 
 void
-j_oconv(c2, c1)
-    int    c2,
-                    c1;
+j_oconv(int c2, int c1)
 {
 #ifdef NUMCHAR_OPTION
     if (c2 == 0 &amp;&amp; (c1 &amp; CLASS_MASK) == CLASS_UTF16){
@@ -3858,9 +3840,7 @@ j_oconv(c2, c1)
 }
 
 void
-base64_conv(c2, c1)
-    int    c2,
-                    c1;
+base64_conv(int c2, int c1)
 {
     mime_prechar(c2, c1);
     (*o_base64conv)(c2,c1);
@@ -3871,8 +3851,7 @@ STATIC int broken_buf[3];
 STATIC int broken_counter = 0;
 STATIC int broken_last = 0;
 int
-broken_getc(f)
-FILE *f;
+broken_getc(FILE *f)
 {
     int c,c1;
 
@@ -3911,9 +3890,7 @@ FILE *f;
 }
 
 int
-broken_ungetc(c,f)
-int c;
-FILE *f;
+broken_ungetc(int c, FILE *f)
 {
     if (broken_counter&lt;2)
 	broken_buf[broken_counter++]=c;
@@ -3923,8 +3900,7 @@ FILE *f;
 STATIC int prev_cr = 0;
 
 void
-cr_conv(c2,c1) 
-int c2,c1;
+cr_conv(int c2, int c1)
 {
     if (prev_cr) {
 	prev_cr = 0;
@@ -3972,8 +3948,7 @@ int c2,c1;
 #define char_size(c2,c1) (c2?2:1)
 
 void
-fold_conv(c2,c1) 
-int c2,c1;
+fold_conv(int c2, int c1)
 { 
     int prev0;
     int fold_state=0;
@@ -4146,8 +4121,7 @@ int c2,c1;
 int z_prev2=0,z_prev1=0;
 
 void
-z_conv(c2,c1)
-int c2,c1;
+z_conv(int c2, int c1)
 {
 
     /* if (c2) c1 &amp;= 0x7f; assertion */
@@ -4237,8 +4211,7 @@ int c2,c1;
 )
 
 void
-rot_conv(c2,c1)
-int c2,c1;
+rot_conv(int c2, int c1)
 {
     if (c2==0 || c2==X0201 || c2==ISO8859_1) {
 	c1 = rot13(c1);
@@ -4250,8 +4223,7 @@ int c2,c1;
 }
 
 void
-hira_conv(c2,c1)
-int c2,c1;
+hira_conv(int c2, int c1)
 {
     if ((hira_f &amp; 1) &amp;&amp; c2==0x25 &amp;&amp; 0x20&lt;c1 &amp;&amp; c1&lt;0x74) {
 	c2 = 0x24;
@@ -4263,8 +4235,7 @@ int c2,c1;
 
 
 void
-iso2022jp_check_conv(c2,c1)
-int    c2, c1;
+iso2022jp_check_conv(int c2, int c1)
 {
     STATIC const int range[RANGE_NUM_MAX][2] = {
         {0x222f, 0x2239,},
@@ -4386,8 +4357,7 @@ unswitch_mime_getc()
 }
 
 int
-mime_begin_strict(f)
-FILE *f;
+mime_begin_strict(FILE *f)
 {
     int c1 = 0;
     int i,j,k;
@@ -4437,8 +4407,7 @@ FILE *f;
 }
 
 int
-mime_getc_buf(f) 
-FILE *f;
+mime_getc_buf(FILE *f)
 {
     /* we don't keep eof of Fifo, becase it contains ?= as
        a terminator. It was checked in mime_integrity. */
@@ -4447,9 +4416,7 @@ FILE *f;
 }
 
 int
-mime_ungetc_buf(c,f) 
-FILE *f;
-int c;
+mime_ungetc_buf(int c, FILE *f) 
 {
     if (mimebuf_f)
 	(*i_mungetc_buf)(c,f);
@@ -4459,8 +4426,7 @@ int c;
 }
 
 int
-mime_begin(f)
-FILE *f;
+mime_begin(FILE *f)
 {
     int c1;
     int i,k;
@@ -4518,8 +4484,7 @@ FILE *f;
 
 #ifdef CHECK_OPTION
 void
-no_putc(c)
-     int c;
+no_putc(int c)
 {
     ;
 }
@@ -4534,8 +4499,7 @@ void debug(str)
 #endif
 
 void
-set_input_codename (codename)
-    char *codename;
+set_input_codename (char *codename)
 {
     if (guess_f &amp;&amp; 
         is_inputcode_set &amp;&amp;
@@ -4550,8 +4514,7 @@ set_input_codename (codename)
 
 #if !defined(PERL_XS) &amp;&amp; !defined(WIN32DLL)
 void
-print_guessed_code (filename)
-    char *filename;
+print_guessed_code (char *filename)
 {
     char *codename = &quot;BINARY&quot;;
     if (!is_inputcode_mixed) {
@@ -4599,31 +4562,25 @@ hex_getc(ch, f, g, u)
 }
 
 int
-cap_getc(f)
-     FILE *f;
+cap_getc(FILE *f)
 {
     return hex_getc(':', f, i_cgetc, i_cungetc);
 }
 
 int
-cap_ungetc(c, f)
-     int c;
-     FILE *f;
+cap_ungetc(int c, FILE *f)
 {
     return (*i_cungetc)(c, f);
 }
 
 int
-url_getc(f)
-     FILE *f;
+url_getc(FILE *f)
 {
     return hex_getc('%', f, i_ugetc, i_uungetc);
 }
 
 int
-url_ungetc(c, f)
-     int c;
-     FILE *f;
+url_ungetc(int c, FILE *f)
 {
     return (*i_uungetc)(c, f);
 }
@@ -4631,8 +4588,7 @@ url_ungetc(c, f)
 
 #ifdef NUMCHAR_OPTION
 int
-numchar_getc(f)
-     FILE *f;
+numchar_getc(FILE *f)
 {
     int (*g)() = i_ngetc;
     int (*u)() = i_nungetc;
@@ -4698,8 +4654,7 @@ numchar_ungetc(c, f)
 
 /* Normalization Form C */
 int
-nfc_getc(f)
-     FILE *f;
+nfc_getc(FILE *f)
 {
     int (*g)() = i_nfc_getc;
     int (*u)() = i_nfc_ungetc;
@@ -5185,8 +5140,7 @@ eof_mime()
 }
 
 void
-mimeout_addchar(c)
-    int            c;
+mimeout_addchar(int c)
 {
     switch(mimeout_mode) {
     case 'Q':</diff>
      <filename>ext/nkf/nkf-utf8/nkf.c</filename>
    </modified>
    <modified>
      <diff>@@ -56,8 +56,7 @@ static int incsize;
 static VALUE result;
 
 static int
-rb_nkf_putchar(c)
-  unsigned int c;
+rb_nkf_putchar(unsigned int c)
 {
   if (output_ctr &gt;= o_len) {
     o_len += incsize;
@@ -78,8 +77,7 @@ rb_nkf_putchar(c)
 #include &quot;nkf-utf8/utf8tbl.c&quot;
 #include &quot;nkf-utf8/nkf.c&quot;
 
-int nkf_split_options(arg)
-    const char* arg;
+int nkf_split_options(const char *arg)
 {
     int count = 0;
     char option[256];
@@ -142,8 +140,7 @@ int nkf_split_options(arg)
  */
 
 static VALUE
-rb_nkf_kconv(obj, opt, src)
-  VALUE obj, opt, src;
+rb_nkf_kconv(VALUE obj, VALUE opt, VALUE src)
 {
   char *opt_ptr, *opt_end;
   volatile VALUE v;
@@ -205,8 +202,7 @@ rb_nkf_kconv(obj, opt, src)
  */
 
 static VALUE
-rb_nkf_guess1(obj, src)
-  VALUE obj, src;
+rb_nkf_guess1(VALUE obj, VALUE src)
 {
   unsigned char *p;
   unsigned char *pend;
@@ -319,8 +315,7 @@ rb_nkf_guess1(obj, src)
  */
 
 static VALUE
-rb_nkf_guess2(obj, src)
-  VALUE obj, src;
+rb_nkf_guess2(VALUE obj, VALUE src)
 {
   int code = _BINARY;
 </diff>
      <filename>ext/nkf/nkf.c</filename>
    </modified>
    <modified>
      <diff>@@ -445,7 +445,7 @@ decode_time(unsigned char* der, int length)
 /********/
 
 typedef struct {
-    char *name;
+    const char *name;
     VALUE *klass;
 } ossl_asn1_info_t;
 </diff>
      <filename>ext/openssl/ossl_asn1.c</filename>
    </modified>
    <modified>
      <diff>@@ -335,7 +335,7 @@ static int
 ossl_pkcs7_sym2typeid(VALUE sym)
 {
     int i, ret = Qnil;
-    char *s;
+    const char *s;
 
     static struct {
         const char *name;</diff>
      <filename>ext/openssl/ossl_pkcs7.c</filename>
    </modified>
    <modified>
      <diff>@@ -62,7 +62,7 @@ VALUE cSSLSocket;
 #define ossl_sslctx_get_tmp_dh_cb(o)     rb_iv_get((o),&quot;@tmp_dh_callback&quot;)
 #define ossl_sslctx_get_sess_id_ctx(o)   rb_iv_get((o),&quot;@session_id_context&quot;)
 
-static char *ossl_sslctx_attrs[] = {
+static const char *ossl_sslctx_attrs[] = {
     &quot;cert&quot;, &quot;key&quot;, &quot;client_ca&quot;, &quot;ca_file&quot;, &quot;ca_path&quot;,
     &quot;timeout&quot;, &quot;verify_mode&quot;, &quot;verify_depth&quot;,
     &quot;verify_callback&quot;, &quot;options&quot;, &quot;cert_store&quot;, &quot;extra_chain_cert&quot;,
@@ -83,8 +83,8 @@ static char *ossl_sslctx_attrs[] = {
 #define ossl_ssl_set_key(o,v)        rb_iv_set((o),&quot;@key&quot;,(v))
 #define ossl_ssl_set_tmp_dh(o,v)     rb_iv_set((o),&quot;@tmp_dh&quot;,(v))
 
-static char *ossl_ssl_attr_readers[] = { &quot;io&quot;, &quot;context&quot;, };
-static char *ossl_ssl_attrs[] = { &quot;sync_close&quot;, };
+static const char *ossl_ssl_attr_readers[] = { &quot;io&quot;, &quot;context&quot;, };
+static const char *ossl_ssl_attrs[] = { &quot;sync_close&quot;, };
 
 /*
  * SSLContext class
@@ -144,7 +144,7 @@ ossl_sslctx_initialize(int argc, VALUE *argv, VALUE self)
     SSL_METHOD *method = NULL;
     SSL_CTX *ctx;
     int i;
-    char *s;
+    const char *s;
 
     for(i = 0; i &lt; numberof(ossl_sslctx_attrs); i++){
 	char buf[32];</diff>
      <filename>ext/openssl/ossl_ssl.c</filename>
    </modified>
    <modified>
      <diff>@@ -118,8 +118,7 @@ static char SlaveName[DEVICELEN];
 static VALUE eChildExited;
 
 static VALUE
-echild_status(self)
-    VALUE self;
+echild_status(VALUE self)
 {
     return rb_ivar_get(self, rb_intern(&quot;status&quot;));
 }
@@ -131,9 +130,7 @@ struct pty_info {
 };
 
 static void
-raise_from_wait(state, info)
-    struct pty_info *info;
-    char *state;
+raise_from_wait(char *state, struct pty_info *info)
 {
     extern VALUE rb_last_status;
     char buf[1024];
@@ -146,8 +143,7 @@ raise_from_wait(state, info)
 }
 
 static VALUE
-pty_syswait(info)
-    struct pty_info *info;
+pty_syswait(struct pty_info *info)
 {
     int cpid, status;
 
@@ -184,17 +180,13 @@ struct exec_info {
 };
 
 static VALUE
-pty_exec(arg)
-    struct exec_info *arg;
+pty_exec(struct exec_info *arg)
 {
     return rb_f_exec(arg-&gt;argc, arg-&gt;argv);
 }
 
 static void
-establishShell(argc, argv, info)
-    int argc;
-    VALUE *argv;
-    struct pty_info *info;
+establishShell(int argc, VALUE *argv, struct pty_info *info)
 {	
     static int		i,master,slave,currentPid;
     char		*p,*getenv();
@@ -295,8 +287,7 @@ establishShell(argc, argv, info)
 }
 
 static VALUE
-pty_finalize_syswait(info)
-    struct pty_info *info;
+pty_finalize_syswait(struct pty_info *info)
 {
     rb_thread_kill(info-&gt;thread);
     rb_funcall(info-&gt;thread, rb_intern(&quot;value&quot;), 0);
@@ -310,8 +301,7 @@ pty_finalize_syswait(info)
  * or the same interface function.
  */
 static void
-getDevice(master,slave)
-    int	*master,*slave;
+getDevice(int *master, int *slave)
 {
     if (openpty(master, slave, SlaveName,
 		(struct termios *)0, (struct winsize *)0) == -1) {
@@ -321,8 +311,7 @@ getDevice(master,slave)
 #else /* HAVE_OPENPTY */
 #ifdef HAVE__GETPTY
 static void
-getDevice(master,slave)
-    int	*master,*slave;
+getDevice(int *master, int *slave)
 {
     char *name;
 
@@ -335,8 +324,7 @@ getDevice(master,slave)
 }
 #else /* HAVE__GETPTY */
 static void
-getDevice(master,slave)
-    int	*master,*slave;
+getDevice(int *master, int *slave)
 {
     int	 i,j;
 
@@ -407,10 +395,7 @@ freeDevice()
 
 /* ruby function: getpty */
 static VALUE
-pty_getpty(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+pty_getpty(int argc, VALUE *argv, VALUE self)
 {
     VALUE res;
     struct pty_info info;
@@ -450,8 +435,7 @@ pty_getpty(argc, argv, self)
 
 /* ruby function: protect_signal - obsolete */
 static VALUE
-pty_protect(self)
-    VALUE self;
+pty_protect(VALUE self)
 {
     rb_warn(&quot;PTY::protect_signal is no longer needed&quot;);
     rb_yield(Qnil);
@@ -460,8 +444,7 @@ pty_protect(self)
 
 /* ruby function: reset_signal - obsolete */
 static VALUE
-pty_reset_signal(self)
-    VALUE self;
+pty_reset_signal(VALUE self)
 {
     rb_warn(&quot;PTY::reset_signal is no longer needed&quot;);
     return self;</diff>
      <filename>ext/pty/pty.c</filename>
    </modified>
    <modified>
      <diff>@@ -50,10 +50,7 @@ readline_event()
 }
 
 static VALUE
-readline_readline(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+readline_readline(int argc, VALUE *argv, VALUE self)
 {
     VALUE tmp, add_hist, result;
     char *prompt = NULL;
@@ -95,8 +92,7 @@ readline_readline(argc, argv, self)
 }
 
 static VALUE
-readline_s_set_input(self, input)
-    VALUE self, input;
+readline_s_set_input(VALUE self, VALUE input)
 {
     OpenFile *ifp;
 
@@ -108,8 +104,7 @@ readline_s_set_input(self, input)
 }
 
 static VALUE
-readline_s_set_output(self, output)
-    VALUE self, output;
+readline_s_set_output(VALUE self, VALUE output)
 {
     OpenFile *ofp;
 
@@ -121,9 +116,7 @@ readline_s_set_output(self, output)
 }
 
 static VALUE
-readline_s_set_completion_proc(self, proc)
-    VALUE self;
-    VALUE proc;
+readline_s_set_completion_proc(VALUE self, VALUE proc)
 {
     rb_secure(4);
     if (!rb_respond_to(proc, rb_intern(&quot;call&quot;)))
@@ -132,35 +125,28 @@ readline_s_set_completion_proc(self, proc)
 }
 
 static VALUE
-readline_s_get_completion_proc(self)
-    VALUE self;
+readline_s_get_completion_proc(VALUE self)
 {
     rb_secure(4);
     return rb_attr_get(mReadline, completion_proc);
 }
 
 static VALUE
-readline_s_set_completion_case_fold(self, val)
-    VALUE self;
-    VALUE val;
+readline_s_set_completion_case_fold(VALUE self, VALUE val)
 {
     rb_secure(4);
     return rb_ivar_set(mReadline, completion_case_fold, val);
 }
 
 static VALUE
-readline_s_get_completion_case_fold(self)
-    VALUE self;
+readline_s_get_completion_case_fold(VALUE self)
 {
     rb_secure(4);
     return rb_attr_get(mReadline, completion_case_fold);
 }
 
 static char **
-readline_attempted_completion_function(text, start, end)
-    const char *text;
-    int start;
-    int end;
+readline_attempted_completion_function(const char *text, int start, int end)
 {
     VALUE proc, ary, temp;
     char **result;
@@ -224,8 +210,7 @@ readline_attempted_completion_function(text, start, end)
 }
 
 static VALUE
-readline_s_vi_editing_mode(self)
-    VALUE self;
+readline_s_vi_editing_mode(VALUE self)
 {
 #ifdef HAVE_RL_VI_EDITING_MODE
     rb_secure(4);
@@ -238,8 +223,7 @@ readline_s_vi_editing_mode(self)
 }
 
 static VALUE
-readline_s_emacs_editing_mode(self)
-    VALUE self;
+readline_s_emacs_editing_mode(VALUE self)
 {
 #ifdef HAVE_RL_EMACS_EDITING_MODE
     rb_secure(4);
@@ -252,8 +236,7 @@ readline_s_emacs_editing_mode(self)
 }
 
 static VALUE
-readline_s_set_completion_append_character(self, str)
-    VALUE self, str;
+readline_s_set_completion_append_character(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
     rb_secure(4);
@@ -276,8 +259,7 @@ readline_s_set_completion_append_character(self, str)
 }
 
 static VALUE
-readline_s_get_completion_append_character(self)
-    VALUE self;
+readline_s_get_completion_append_character(VALUE self)
 {
 #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
     VALUE str;
@@ -296,8 +278,7 @@ readline_s_get_completion_append_character(self)
 }
 
 static VALUE
-readline_s_set_basic_word_break_characters(self, str)
-    VALUE self, str;
+readline_s_set_basic_word_break_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_BASIC_WORD_BREAK_CHARACTERS
     static char *basic_word_break_characters = NULL;
@@ -323,8 +304,7 @@ readline_s_set_basic_word_break_characters(self, str)
 }
 
 static VALUE
-readline_s_get_basic_word_break_characters(self, str)
-    VALUE self, str;
+readline_s_get_basic_word_break_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_BASIC_WORD_BREAK_CHARACTERS
     rb_secure(4);
@@ -338,8 +318,7 @@ readline_s_get_basic_word_break_characters(self, str)
 }
 
 static VALUE
-readline_s_set_completer_word_break_characters(self, str)
-    VALUE self, str;
+readline_s_set_completer_word_break_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS
     static char *completer_word_break_characters = NULL;
@@ -365,8 +344,7 @@ readline_s_set_completer_word_break_characters(self, str)
 }
 
 static VALUE
-readline_s_get_completer_word_break_characters(self, str)
-    VALUE self, str;
+readline_s_get_completer_word_break_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS
     rb_secure(4);
@@ -380,8 +358,7 @@ readline_s_get_completer_word_break_characters(self, str)
 }
 
 static VALUE
-readline_s_set_basic_quote_characters(self, str)
-    VALUE self, str;
+readline_s_set_basic_quote_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_BASIC_QUOTE_CHARACTERS
     static char *basic_quote_characters = NULL;
@@ -408,8 +385,7 @@ readline_s_set_basic_quote_characters(self, str)
 }
 
 static VALUE
-readline_s_get_basic_quote_characters(self, str)
-    VALUE self, str;
+readline_s_get_basic_quote_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_BASIC_QUOTE_CHARACTERS
     rb_secure(4);
@@ -423,8 +399,7 @@ readline_s_get_basic_quote_characters(self, str)
 }
 
 static VALUE
-readline_s_set_completer_quote_characters(self, str)
-    VALUE self, str;
+readline_s_set_completer_quote_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_COMPLETER_QUOTE_CHARACTERS
     static char *completer_quote_characters = NULL;
@@ -451,8 +426,7 @@ readline_s_set_completer_quote_characters(self, str)
 }
 
 static VALUE
-readline_s_get_completer_quote_characters(self, str)
-    VALUE self, str;
+readline_s_get_completer_quote_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_COMPLETER_QUOTE_CHARACTERS
     rb_secure(4);
@@ -466,8 +440,7 @@ readline_s_get_completer_quote_characters(self, str)
 }
 
 static VALUE
-readline_s_set_filename_quote_characters(self, str)
-    VALUE self, str;
+readline_s_set_filename_quote_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_FILENAME_QUOTE_CHARACTERS
     static char *filename_quote_characters = NULL;
@@ -494,8 +467,7 @@ readline_s_set_filename_quote_characters(self, str)
 }
 
 static VALUE
-readline_s_get_filename_quote_characters(self, str)
-    VALUE self, str;
+readline_s_get_filename_quote_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_FILENAME_QUOTE_CHARACTERS
     rb_secure(4);
@@ -509,16 +481,13 @@ readline_s_get_filename_quote_characters(self, str)
 }
 
 static VALUE
-hist_to_s(self)
-    VALUE self;
+hist_to_s(VALUE self)
 {
     return rb_str_new2(&quot;HISTORY&quot;);
 }
 
 static VALUE
-hist_get(self, index)
-    VALUE self;
-    VALUE index;
+hist_get(VALUE self, VALUE index)
 {
     HIST_ENTRY *entry;
     int i;
@@ -536,10 +505,7 @@ hist_get(self, index)
 }
 
 static VALUE
-hist_set(self, index, str)
-    VALUE self;
-    VALUE index;
-    VALUE str;
+hist_set(VALUE self, VALUE index, VALUE str)
 {
 #ifdef HAVE_REPLACE_HISTORY_ENTRY
     HIST_ENTRY *entry;
@@ -563,9 +529,7 @@ hist_set(self, index, str)
 }
 
 static VALUE
-hist_push(self, str)
-    VALUE self;
-    VALUE str;
+hist_push(VALUE self, VALUE str)
 {
     rb_secure(4);
     SafeStringValue(str);
@@ -574,10 +538,7 @@ hist_push(self, str)
 }
 
 static VALUE
-hist_push_method(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+hist_push_method(int argc, VALUE *argv, VALUE self)
 {
     VALUE str;
     
@@ -591,8 +552,7 @@ hist_push_method(argc, argv, self)
 }
 
 static VALUE
-rb_remove_history(index)
-    int index;
+rb_remove_history(int index)
 {
 #ifdef HAVE_REMOVE_HISTORY
     HIST_ENTRY *entry;
@@ -614,8 +574,7 @@ rb_remove_history(index)
 }
 
 static VALUE
-hist_pop(self)
-    VALUE self;
+hist_pop(VALUE self)
 {
     rb_secure(4);
     if (history_length &gt; 0) {
@@ -626,8 +585,7 @@ hist_pop(self)
 }
 
 static VALUE
-hist_shift(self)
-    VALUE self;
+hist_shift(VALUE self)
 {
     rb_secure(4);
     if (history_length &gt; 0) {
@@ -638,8 +596,7 @@ hist_shift(self)
 }
 
 static VALUE
-hist_each(self)
-    VALUE self;
+hist_each(VALUE self)
 {
     HIST_ENTRY *entry;
     int i;
@@ -655,25 +612,21 @@ hist_each(self)
 }
 
 static VALUE
-hist_length(self)
-    VALUE self;
+hist_length(VALUE self)
 {
     rb_secure(4);
     return INT2NUM(history_length);
 }
 
 static VALUE
-hist_empty_p(self)
-    VALUE self;
+hist_empty_p(VALUE self)
 {
     rb_secure(4);
     return history_length == 0 ? Qtrue : Qfalse;
 }
 
 static VALUE
-hist_delete_at(self, index)
-    VALUE self;
-    VALUE index;
+hist_delete_at(VALUE self, VALUE index)
 {
     int i;
 
@@ -688,9 +641,7 @@ hist_delete_at(self, index)
 }
 
 static VALUE
-filename_completion_proc_call(self, str)
-    VALUE self;
-    VALUE str;
+filename_completion_proc_call(VALUE self, VALUE str)
 {
     VALUE result;
     char **matches;
@@ -715,9 +666,7 @@ filename_completion_proc_call(self, str)
 }
 
 static VALUE
-username_completion_proc_call(self, str)
-    VALUE self;
-    VALUE str;
+username_completion_proc_call(VALUE self, VALUE str)
 {
     VALUE result;
     char **matches;</diff>
      <filename>ext/readline/readline.c</filename>
    </modified>
    <modified>
      <diff>@@ -265,8 +265,7 @@ static struct token_assoc {
 };
 
 static ID
-ripper_token2eventid(tok)
-    int tok;
+ripper_token2eventid(int tok)
 {
     struct token_assoc *a;
 </diff>
      <filename>ext/ripper/eventids2.c</filename>
    </modified>
    <modified>
      <diff>@@ -489,8 +489,7 @@ strio_eof(self)
 
 /* :nodoc: */
 static VALUE
-strio_copy(copy, orig)
-    VALUE copy, orig;
+strio_copy(VALUE copy, VALUE orig)
 {
     struct StringIO *ptr;
 
@@ -559,10 +558,7 @@ strio_set_lineno(self, lineno)
  * and _mode_ (see StringIO#new).
  */
 static VALUE
-strio_reopen(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strio_reopen(int argc, VALUE *argv, VALUE self)
 {
     if (!OBJ_TAINTED(self)) rb_secure(4);
     if (argc == 1 &amp;&amp; TYPE(*argv) != T_STRING) {
@@ -717,9 +713,7 @@ strio_getc(self)
 }
 
 static void
-strio_extend(ptr, pos, len)
-    struct StringIO *ptr;
-    long pos, len;
+strio_extend(struct StringIO *ptr, long pos, long len)
 {
     long olen;
 
@@ -1149,10 +1143,7 @@ strio_read(argc, argv, self)
  * returning +nil+, as well as IO#sysread does.
  */
 static VALUE
-strio_sysread(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strio_sysread(int argc, VALUE *argv, VALUE self)
 {
     VALUE val = strio_read(argc, argv, self);
     if (NIL_P(val) || RSTRING(val)-&gt;len == 0) {</diff>
      <filename>ext/stringio/stringio.c</filename>
    </modified>
    <modified>
      <diff>@@ -263,8 +263,7 @@ strscan_s_mustc(self)
  * Reset the scan pointer (index 0) and clear matching data.
  */
 static VALUE
-strscan_reset(self)
-    VALUE self;
+strscan_reset(VALUE self)
 {
     struct strscanner *p;
 
@@ -600,8 +599,7 @@ strscan_scan_until(self, re)
  *   s.exist? /e/            # -&gt; nil
  */
 static VALUE
-strscan_exist_p(self, re)
-    VALUE self, re;
+strscan_exist_p(VALUE self, VALUE re)
 {
     return strscan_do_scan(self, re, 0, 0, 0);
 }
@@ -962,8 +960,7 @@ strscan_matched_size(self)
  * This method is obsolete; use #matched_size instead.
  */
 static VALUE
-strscan_matchedsize(self)
-    VALUE self;
+strscan_matchedsize(VALUE self)
 {
     rb_warning(&quot;StringScanner#matchedsize is obsolete; use #matched_size instead&quot;);
     return strscan_matched_size(self);
@@ -1084,8 +1081,7 @@ strscan_rest_size(self)
  * This method is obsolete; use #rest_size instead.
  */
 static VALUE
-strscan_restsize(self)
-    VALUE self;
+strscan_restsize(VALUE self)
 {
     rb_warning(&quot;StringScanner#restsize is obsolete; use #rest_size instead&quot;);
     return strscan_rest_size(self);</diff>
      <filename>ext/strscan/strscan.c</filename>
    </modified>
    <modified>
      <diff>@@ -282,7 +282,7 @@ syck_emitter_clear( SyckEmitter *e )
  * Raw write to the emitter buffer.
  */
 void
-syck_emitter_write( SyckEmitter *e, char *str, long len )
+syck_emitter_write( SyckEmitter *e, const char *str, long len )
 {
     long at;
     ASSERT( str != NULL )
@@ -438,7 +438,7 @@ end_emit:
  * and the implicit tag which would be assigned to this node.  If a tag is
  * required, write the tag.
  */
-void syck_emit_tag( SyckEmitter *e, char *tag, char *ignore )
+void syck_emit_tag( SyckEmitter *e, const char *tag, const char *ignore )
 {
     SyckLevel *lvl;
     if ( tag == NULL ) return;
@@ -457,7 +457,7 @@ void syck_emit_tag( SyckEmitter *e, char *tag, char *ignore )
             int skip = 4 + strlen( YAML_DOMAIN ) + 1;
             syck_emitter_write( e, tag + skip, taglen - skip );
         } else {
-            char *subd = tag + 4;
+            const char *subd = tag + 4;
             while ( *subd != ':' &amp;&amp; *subd != '\0' ) subd++;
             if ( *subd == ':' ) {
                 if ( subd - tag &gt; ( strlen( YAML_DOMAIN ) + 5 ) &amp;&amp;
@@ -559,7 +559,7 @@ syck_scan_scalar( int req_width, char *cursor, long len )
     }
     if ( ( cursor[0] == '-' || cursor[0] == ':' ||
            cursor[0] == '?' || cursor[0] == ',' ) &amp;&amp;
-           ( cursor[1] == ' ' || cursor[1] == '\n' || len == 1 ) )
+           ( len == 1 || cursor[1] == ' ' || cursor[1] == '\n' ) )
     {
             flags |= SCAN_INDIC_S;
     }
@@ -1221,7 +1221,7 @@ syck_emitter_mark_node( SyckEmitter *e, st_data_t n )
         if ( ! st_lookup( e-&gt;anchors, (st_data_t)oid, (st_data_t *)&amp;anchor_name ) )
         {
             int idx = 0;
-            char *anc = ( e-&gt;anchor_format == NULL ? DEFAULT_ANCHOR_FORMAT : e-&gt;anchor_format );
+            const char *anc = ( e-&gt;anchor_format == NULL ? DEFAULT_ANCHOR_FORMAT : e-&gt;anchor_format );
 
             /*
              * Second time hitting this object, let's give it an anchor</diff>
      <filename>ext/syck/emitter.c</filename>
    </modified>
    <modified>
      <diff>@@ -155,7 +155,7 @@ syck_xprivate( char *type_id, int type_len )
 }
 
 char *
-syck_taguri( char *domain, char *type_id, int type_len )
+syck_taguri( const char *domain, const char *type_id, int type_len )
 {
     char *uri = S_ALLOC_N( char, strlen( domain ) + type_len + 14 );
     uri[0] = '\0';</diff>
      <filename>ext/syck/handler.c</filename>
    </modified>
    <modified>
      <diff>@@ -1585,7 +1585,7 @@ yy201:	++YYCURSOR;
 
 /* Remove ending fragment and compare types */
 int
-syck_tagcmp( char *tag1, char *tag2 )
+syck_tagcmp( const char *tag1, const char *tag2 )
 {
     if ( tag1 == tag2 ) return 1;
     if ( tag1 == NULL || tag2 == NULL ) return 0;</diff>
      <filename>ext/syck/implicit.c</filename>
    </modified>
    <modified>
      <diff>@@ -100,13 +100,13 @@ syck_alloc_str()
 }
 
 SyckNode *
-syck_new_str( char *str, enum scalar_style style )
+syck_new_str( const char *str, enum scalar_style style )
 {
     return syck_new_str2( str, strlen( str ), style );
 }
 
 SyckNode *
-syck_new_str2( char *str, long len, enum scalar_style style )
+syck_new_str2( const char *str, long len, enum scalar_style style )
 {
     SyckNode *n;
 </diff>
      <filename>ext/syck/node.c</filename>
    </modified>
    <modified>
      <diff>@@ -32,7 +32,7 @@ syck_assert( char *file_name, unsigned line_num )
  * Allocates and copies a string
  */
 char *
-syck_strndup( char *buf, long len )
+syck_strndup( const char *buf, long len )
 {
     char *new = S_ALLOC_N( char, len + 1 );
     S_MEMZERO( new, char, len + 1 );</diff>
      <filename>ext/syck/syck.c</filename>
    </modified>
    <modified>
      <diff>@@ -346,8 +346,8 @@ void syck_hdlr_remove_anchor( SyckParser *, char * );
 SyckNode *syck_hdlr_get_anchor( SyckParser *, char * );
 void syck_add_transfer( char *, SyckNode *, int );
 char *syck_xprivate( char *, int );
-char *syck_taguri( char *, char *, int );
-int syck_tagcmp( char *, char * );
+char *syck_taguri( const char *, const char *, int );
+int syck_tagcmp( const char *, const char * );
 int syck_add_sym( SyckParser *, char * );
 int syck_lookup_sym( SyckParser *, SYMID, char ** );
 int syck_try_implicit( SyckNode * );
@@ -358,7 +358,7 @@ char *syck_match_implicit( char *, size_t );
 /*
  * API prototypes
  */
-char *syck_strndup( char *, long );
+char *syck_strndup( const char *, long );
 long syck_io_file_read( char *, SyckIoFile *, long, long );
 long syck_io_str_read( char *, SyckIoStr *, long, long );
 char *syck_base64enc( char *, long );
@@ -370,7 +370,7 @@ void syck_output_handler( SyckEmitter *, SyckOutputHandler );
 void syck_emitter_handler( SyckEmitter *, SyckEmitterHandler );
 void syck_free_emitter( SyckEmitter * );
 void syck_emitter_clear( SyckEmitter * );
-void syck_emitter_write( SyckEmitter *, char *, long );
+void syck_emitter_write( SyckEmitter *, const char *, long );
 void syck_emitter_escape( SyckEmitter *, char *, long );
 void syck_emitter_flush( SyckEmitter *, long );
 void syck_emit( SyckEmitter *, st_data_t );
@@ -383,7 +383,7 @@ void syck_emit_seq( SyckEmitter *, char *, enum seq_style );
 void syck_emit_item( SyckEmitter *, st_data_t );
 void syck_emit_map( SyckEmitter *, char *, enum map_style );
 void syck_emit_end( SyckEmitter * );
-void syck_emit_tag( SyckEmitter *, char *, char * );
+void syck_emit_tag( SyckEmitter *, const char *, const char * );
 void syck_emit_indent( SyckEmitter * );
 SyckLevel *syck_emitter_current_level( SyckEmitter * );
 SyckLevel *syck_emitter_parent_level( SyckEmitter * );
@@ -421,8 +421,8 @@ SyckNode *syck_alloc_seq();
 SyckNode *syck_alloc_str();
 void syck_free_node( SyckNode * );
 void syck_free_members( SyckNode * );
-SyckNode *syck_new_str( char *, enum scalar_style );
-SyckNode *syck_new_str2( char *, long, enum scalar_style );
+SyckNode *syck_new_str( const char *, enum scalar_style );
+SyckNode *syck_new_str2( const char *, long, enum scalar_style );
 void syck_replace_str( SyckNode *, char *, enum scalar_style );
 void syck_replace_str2( SyckNode *, char *, long, enum scalar_style );
 void syck_str_blow_away_commas( SyckNode * );</diff>
      <filename>ext/syck/syck.h</filename>
    </modified>
    <modified>
      <diff>@@ -145,6 +145,7 @@ syck_yaml2byte_handler(p, n)
             strcat( type_tag, &quot;!&quot; );
             strcat( type_tag, n-&gt;type_id );
             bytestring_append( val, YAMLBYTE_TRANSFER, type_tag, NULL);
+	    S_FREE(type_tag);
         }
     }
     switch (n-&gt;kind)</diff>
      <filename>ext/syck/yaml2byte.c</filename>
    </modified>
    <modified>
      <diff>@@ -6217,7 +6217,11 @@ lib_fromUTF8_core(ip_obj, src, encodename)
             char *s;
             int  len;
 
+&lt;&lt;&lt;&lt;&lt;&lt;&lt; tcltklib.c
+	    StringValue(str);
+=======
             StringValue(str);
+&gt;&gt;&gt;&gt;&gt;&gt;&gt; 1.45
             s = Tcl_GetByteArrayFromObj(Tcl_NewStringObj(RSTRING(str)-&gt;ptr, 
                                                          RSTRING(str)-&gt;len), 
                                         &amp;len);</diff>
      <filename>ext/tk/tcltklib.c</filename>
    </modified>
    <modified>
      <diff>@@ -197,9 +197,7 @@ static VALUE cZError, cStreamEnd, cNeedDict;
 static VALUE cStreamError, cDataError, cMemError, cBufError, cVersionError;
 
 static void
-raise_zlib_error(err, msg)
-    int err;
-    const char *msg;
+raise_zlib_error(int err, const char *msg)
 {
     VALUE exc;
 
@@ -247,8 +245,7 @@ raise_zlib_error(err, msg)
 /*--- Warning (in finalizer) ---*/
 
 static void
-finalizer_warn(msg)
-    const char *msg;
+finalizer_warn(const char *msg)
 {
     fprintf(stderr, &quot;zlib(finalizer): %s\n&quot;, msg);
 }
@@ -260,8 +257,7 @@ finalizer_warn(msg)
  * Returns the string which represents the version of zlib library.
  */
 static VALUE
-rb_zlib_version(klass)
-    VALUE klass;
+rb_zlib_version(VALUE klass)
 {
     VALUE str;
 
@@ -311,10 +307,7 @@ do_checksum(argc, argv, func)
  * FIXME: expression.
  */
 static VALUE
-rb_zlib_adler32(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+rb_zlib_adler32(int argc, VALUE *argv, VALUE klass)
 {
     return do_checksum(argc, argv, adler32);
 }
@@ -329,10 +322,7 @@ rb_zlib_adler32(argc, argv, klass)
  * FIXME: expression.
  */
 static VALUE
-rb_zlib_crc32(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+rb_zlib_crc32(int argc, VALUE *argv, VALUE klass)
 {
     return do_checksum(argc, argv, crc32);
 }
@@ -341,8 +331,7 @@ rb_zlib_crc32(argc, argv, klass)
  * Returns the table for calculating CRC checksum as an array.
  */
 static VALUE
-rb_zlib_crc_table(obj)
-    VALUE obj;
+rb_zlib_crc_table(VALUE obj)
 {
     const unsigned long *crctbl;
     VALUE dst;
@@ -401,24 +390,19 @@ static const struct zstream_funcs inflate_funcs = {
 
 
 static voidpf
-zlib_mem_alloc(opaque, items, size)
-    voidpf opaque;
-    uInt items, size;
+zlib_mem_alloc(voidpf opaque, uInt items, uInt size)
 {
     return xmalloc(items * size);
 }
 
 static void
-zlib_mem_free(opaque, address)
-    voidpf opaque, address;
+zlib_mem_free(voidpf opaque, voidpf address)
 {
     free(address);
 }
 
 static void
-zstream_init(z, func)
-    struct zstream *z;
-    const struct zstream_funcs *func;
+zstream_init(struct zstream *z, const struct zstream_funcs *func)
 {
     z-&gt;flags = 0;
     z-&gt;buf = Qnil;
@@ -439,8 +423,7 @@ zstream_init(z, func)
 #define zstream_init_inflate(z)   zstream_init((z), &amp;inflate_funcs)
 
 static void
-zstream_expand_buffer(z)
-    struct zstream *z;
+zstream_expand_buffer(struct zstream *z)
 {
     long inc;
 
@@ -472,9 +455,7 @@ zstream_expand_buffer(z)
 }
 
 static void
-zstream_expand_buffer_into(z, size)
-    struct zstream *z;
-    int size;
+zstream_expand_buffer_into(struct zstream *z, int size)
 {
     if (NIL_P(z-&gt;buf)) {
 	/* I uses rb_str_new here not rb_str_buf_new because
@@ -493,10 +474,7 @@ zstream_expand_buffer_into(z, size)
 }
 
 static void
-zstream_append_buffer(z, src, len)
-    struct zstream *z;
-    const Bytef *src;
-    int len;
+zstream_append_buffer(struct zstream *z, const Bytef *src, int len)
 {
     if (NIL_P(z-&gt;buf)) {
 	z-&gt;buf = rb_str_buf_new(len);
@@ -529,8 +507,7 @@ zstream_append_buffer(z, src, len)
     zstream_append_buffer((z),(Bytef*)RSTRING(v)-&gt;ptr,RSTRING(v)-&gt;len)
 
 static VALUE
-zstream_detach_buffer(z)
-    struct zstream *z;
+zstream_detach_buffer(struct zstream *z)
 {
     VALUE dst;
 
@@ -551,9 +528,7 @@ zstream_detach_buffer(z)
 }
 
 static VALUE
-zstream_shift_buffer(z, len)
-    struct zstream *z;
-    int len;
+zstream_shift_buffer(struct zstream *z, int len)
 {
     VALUE dst;
 
@@ -576,9 +551,7 @@ zstream_shift_buffer(z, len)
 }
 
 static void
-zstream_buffer_ungetc(z, c)
-    struct zstream *z;
-    int c;
+zstream_buffer_ungetc(struct zstream *z, int c)
 {
     if (NIL_P(z-&gt;buf) || RSTRING(z-&gt;buf)-&gt;len - z-&gt;buf_filled == 0) {
 	zstream_expand_buffer(z);
@@ -594,10 +567,7 @@ zstream_buffer_ungetc(z, c)
 }
 
 static void
-zstream_append_input(z, src, len)
-    struct zstream *z;
-    const Bytef *src;
-    unsigned int len;
+zstream_append_input(struct zstream *z, const Bytef *src, unsigned int len)
 {
     if (len &lt;= 0) return;
 
@@ -615,9 +585,7 @@ zstream_append_input(z, src, len)
     zstream_append_input((z), (Bytef*)RSTRING(v)-&gt;ptr, RSTRING(v)-&gt;len)
 
 static void
-zstream_discard_input(z, len)
-    struct zstream *z;
-    unsigned int len;
+zstream_discard_input(struct zstream *z, unsigned int len)
 {
     if (NIL_P(z-&gt;input) || RSTRING(z-&gt;input)-&gt;len &lt;= len) {
 	z-&gt;input = Qnil;
@@ -630,15 +598,13 @@ zstream_discard_input(z, len)
 }
 
 static void
-zstream_reset_input(z)
-    struct zstream *z;
+zstream_reset_input(struct zstream *z)
 {
     z-&gt;input = Qnil;
 }
 
 static void
-zstream_passthrough_input(z)
-    struct zstream *z;
+zstream_passthrough_input(struct zstream *z)
 {
     if (!NIL_P(z-&gt;input)) {
 	zstream_append_buffer2(z, z-&gt;input);
@@ -647,8 +613,7 @@ zstream_passthrough_input(z)
 }
 
 static VALUE
-zstream_detach_input(z)
-    struct zstream *z;
+zstream_detach_input(struct zstream *z)
 {
     VALUE dst;
 
@@ -665,8 +630,7 @@ zstream_detach_input(z)
 }
 
 static void
-zstream_reset(z)
-    struct zstream *z;
+zstream_reset(struct zstream *z)
 {
     int err;
 
@@ -683,8 +647,7 @@ zstream_reset(z)
 }
 
 static VALUE
-zstream_end(z)
-    struct zstream *z;
+zstream_end(struct zstream *z)
 {
     int err;
 
@@ -707,11 +670,7 @@ zstream_end(z)
 }
 
 static void
-zstream_run(z, src, len, flush)
-    struct zstream *z;
-    Bytef *src;
-    uInt len;
-    int flush;
+zstream_run(struct zstream *z, Bytef *src, uInt len, int flush)
 {
     uInt n;
     int err;
@@ -773,10 +732,7 @@ zstream_run(z, src, len, flush)
 }
 
 static VALUE
-zstream_sync(z, src, len)
-    struct zstream *z;
-    Bytef *src;
-    uInt len;
+zstream_sync(struct zstream *z, Bytef *src, uInt len)
 {
     VALUE rest;
     int err;
@@ -815,16 +771,14 @@ zstream_sync(z, src, len)
 }
 
 static void
-zstream_mark(z)
-    struct zstream *z;
+zstream_mark(struct zstream *z)
 {
     rb_gc_mark(z-&gt;buf);
     rb_gc_mark(z-&gt;input);
 }
 
 static void
-zstream_finalize(z)
-    struct zstream *z;
+zstream_finalize(struct zstream *z)
 {
     int err = z-&gt;func-&gt;end(&amp;z-&gt;stream);
     if (err == Z_STREAM_ERROR)
@@ -834,8 +788,7 @@ zstream_finalize(z)
 }
 
 static void
-zstream_free(z)
-    struct zstream *z;
+zstream_free(struct zstream *z)
 {
     if (ZSTREAM_IS_READY(z)) {
 	zstream_finalize(z);
@@ -844,9 +797,7 @@ zstream_free(z)
 }
 
 static VALUE
-zstream_new(klass, funcs)
-    VALUE klass;
-    const struct zstream_funcs *funcs;
+zstream_new(VALUE klass, const struct zstream_funcs *funcs)
 {
     VALUE obj;
     struct zstream *z;
@@ -861,8 +812,7 @@ zstream_new(klass, funcs)
 #define zstream_inflate_new(klass)  zstream_new((klass), &amp;inflate_funcs)
 
 static struct zstream *
-get_zstream(obj)
-    VALUE obj;
+get_zstream(VALUE obj)
 {
     struct zstream *z;
 
@@ -942,8 +892,7 @@ get_zstream(obj)
  * exception.
  */
 static VALUE
-rb_zstream_end(obj)
-    VALUE obj;
+rb_zstream_end(VALUE obj)
 {
     zstream_end(get_zstream(obj));
     return Qnil;
@@ -954,8 +903,7 @@ rb_zstream_end(obj)
  * are discarded.
  */
 static VALUE
-rb_zstream_reset(obj)
-    VALUE obj;
+rb_zstream_reset(VALUE obj)
 {
     zstream_reset(get_zstream(obj));
     return Qnil;
@@ -966,8 +914,7 @@ rb_zstream_reset(obj)
  * Zlib::Inflate#finish for details of this behavior.
  */
 static VALUE
-rb_zstream_finish(obj)
-    VALUE obj;
+rb_zstream_finish(VALUE obj)
 {
     struct zstream *z = get_zstream(obj);
     VALUE dst;
@@ -983,8 +930,7 @@ rb_zstream_finish(obj)
  * Flushes input buffer and returns all data in that buffer.
  */
 static VALUE
-rb_zstream_flush_next_in(obj)
-    VALUE obj;
+rb_zstream_flush_next_in(VALUE obj)
 {
     struct zstream *z;
     VALUE dst;
@@ -999,8 +945,7 @@ rb_zstream_flush_next_in(obj)
  * Flushes output buffer and returns all data in that buffer.
  */
 static VALUE
-rb_zstream_flush_next_out(obj)
-    VALUE obj;
+rb_zstream_flush_next_out(VALUE obj)
 {
     struct zstream *z;
     VALUE dst;
@@ -1016,8 +961,7 @@ rb_zstream_flush_next_out(obj)
  * space is allocated automatically, this method returns 0 normally.
  */
 static VALUE
-rb_zstream_avail_out(obj)
-    VALUE obj;
+rb_zstream_avail_out(VALUE obj)
 {
     struct zstream *z;
     Data_Get_Struct(obj, struct zstream, z);
@@ -1031,8 +975,7 @@ rb_zstream_avail_out(obj)
  * method.
  */
 static VALUE
-rb_zstream_set_avail_out(obj, size)
-    VALUE obj, size;
+rb_zstream_set_avail_out(VALUE obj, VALUE size)
 {
     struct zstream *z = get_zstream(obj);
 
@@ -1045,8 +988,7 @@ rb_zstream_set_avail_out(obj, size)
  * Returns bytes of data in the input buffer. Normally, returns 0.
  */
 static VALUE
-rb_zstream_avail_in(obj)
-    VALUE obj;
+rb_zstream_avail_in(VALUE obj)
 {
     struct zstream *z;
     Data_Get_Struct(obj, struct zstream, z);
@@ -1057,8 +999,7 @@ rb_zstream_avail_in(obj)
  * Returns the total bytes of the input data to the stream.  FIXME
  */
 static VALUE
-rb_zstream_total_in(obj)
-    VALUE obj;
+rb_zstream_total_in(VALUE obj)
 {
     return rb_uint2inum(get_zstream(obj)-&gt;stream.total_in);
 }
@@ -1067,8 +1008,7 @@ rb_zstream_total_in(obj)
  * Returns the total bytes of the output data from the stream.  FIXME
  */
 static VALUE
-rb_zstream_total_out(obj)
-    VALUE obj;
+rb_zstream_total_out(VALUE obj)
 {
     return rb_uint2inum(get_zstream(obj)-&gt;stream.total_out);
 }
@@ -1079,8 +1019,7 @@ rb_zstream_total_out(obj)
  * &lt;tt&gt;Zlib::UNKNOWN&lt;/tt&gt;.
  */
 static VALUE
-rb_zstream_data_type(obj)
-    VALUE obj;
+rb_zstream_data_type(VALUE obj)
 {
     return INT2FIX(get_zstream(obj)-&gt;stream.data_type);
 }
@@ -1089,8 +1028,7 @@ rb_zstream_data_type(obj)
  * Returns the adler-32 checksum.
  */
 static VALUE
-rb_zstream_adler(obj)
-    VALUE obj;
+rb_zstream_adler(VALUE obj)
 {
 	return rb_uint2inum(get_zstream(obj)-&gt;stream.adler);
 }
@@ -1099,8 +1037,7 @@ rb_zstream_adler(obj)
  * Returns true if the stream is finished.
  */
 static VALUE
-rb_zstream_finished_p(obj)
-    VALUE obj;
+rb_zstream_finished_p(VALUE obj)
 {
     return ZSTREAM_IS_FINISHED(get_zstream(obj)) ? Qtrue : Qfalse;
 }
@@ -1109,8 +1046,7 @@ rb_zstream_finished_p(obj)
  * Returns true if the stream is closed.
  */
 static VALUE
-rb_zstream_closed_p(obj)
-    VALUE obj;
+rb_zstream_closed_p(VALUE obj)
 {
     struct zstream *z;
     Data_Get_Struct(obj, struct zstream, z);
@@ -1139,8 +1075,7 @@ rb_zstream_closed_p(obj)
 
 
 static VALUE
-rb_deflate_s_allocate(klass)
-    VALUE klass;
+rb_deflate_s_allocate(VALUE klass)
 {
     return zstream_deflate_new(klass);
 }
@@ -1155,10 +1090,7 @@ rb_deflate_s_allocate(klass)
  * TODO: document better!
  */
 static VALUE
-rb_deflate_initialize(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_deflate_initialize(int argc, VALUE *argv, VALUE obj)
 {
     struct zstream *z;
     VALUE level, wbits, memlevel, strategy;
@@ -1182,8 +1114,7 @@ rb_deflate_initialize(argc, argv, obj)
  * Duplicates the deflate stream.
  */
 static VALUE
-rb_deflate_init_copy(self, orig)
-    VALUE self, orig;
+rb_deflate_init_copy(VALUE self, VALUE orig)
 {
     struct zstream *z1 = get_zstream(self);
     struct zstream *z2 = get_zstream(orig);
@@ -1199,8 +1130,7 @@ rb_deflate_init_copy(self, orig)
 }
 
 static VALUE
-deflate_run(args)
-    VALUE args;
+deflate_run(VALUE args)
 {
     struct zstream *z = (struct zstream*)((VALUE*)args)[0];
     VALUE src = ((VALUE*)args)[1];
@@ -1230,10 +1160,7 @@ deflate_run(args)
  *
  */
 static VALUE
-rb_deflate_s_deflate(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+rb_deflate_s_deflate(int argc, VALUE *argv, VALUE klass)
 {
     struct zstream z;
     VALUE src, level, dst, args[2];
@@ -1259,10 +1186,7 @@ rb_deflate_s_deflate(argc, argv, klass)
 }
 
 static void
-do_deflate(z, src, flush)
-    struct zstream *z;
-    VALUE src;
-    int flush;
+do_deflate(struct zstream *z, VALUE src, int flush)
 {
     if (NIL_P(src)) {
 	zstream_run(z, (Bytef*)&quot;&quot;, 0, Z_FINISH);
@@ -1289,10 +1213,7 @@ do_deflate(z, src, flush)
  * TODO: document better!
  */
 static VALUE
-rb_deflate_deflate(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_deflate_deflate(int argc, VALUE *argv, VALUE obj)
 {
     struct zstream *z = get_zstream(obj);
     VALUE src, flush, dst;
@@ -1314,8 +1235,7 @@ rb_deflate_deflate(argc, argv, obj)
  * preserved in output buffer.
  */
 static VALUE
-rb_deflate_addstr(obj, src)
-    VALUE obj, src;
+rb_deflate_addstr(VALUE obj, VALUE src)
 {
     OBJ_INFECT(obj, src);
     do_deflate(get_zstream(obj), src, Z_NO_FLUSH);
@@ -1332,10 +1252,7 @@ rb_deflate_addstr(obj, src)
  * TODO: document better!
  */
 static VALUE
-rb_deflate_flush(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_deflate_flush(int argc, VALUE *argv, VALUE obj)
 {
     struct zstream *z = get_zstream(obj);
     VALUE v_flush, dst;
@@ -1362,8 +1279,7 @@ rb_deflate_flush(argc, argv, obj)
  * TODO: document better!
  */
 static VALUE
-rb_deflate_params(obj, v_level, v_strategy)
-    VALUE obj, v_level, v_strategy;
+rb_deflate_params(VALUE obj, VALUE v_level, VALUE v_strategy)
 {
     struct zstream *z = get_zstream(obj);
     int level, strategy;
@@ -1395,8 +1311,7 @@ rb_deflate_params(obj, v_level, v_strategy)
  * TODO: document better!
  */
 static VALUE
-rb_deflate_set_dictionary(obj, dic)
-    VALUE obj, dic;
+rb_deflate_set_dictionary(VALUE obj, VALUE dic)
 {
     struct zstream *z = get_zstream(obj);
     VALUE src = dic;
@@ -1427,8 +1342,7 @@ rb_deflate_set_dictionary(obj, dic)
 
 
 static VALUE
-rb_inflate_s_allocate(klass)
-    VALUE klass;
+rb_inflate_s_allocate(VALUE klass)
 {
     return zstream_inflate_new(klass);
 }
@@ -1442,10 +1356,7 @@ rb_inflate_s_allocate(klass)
  * TODO: document better!
  */
 static VALUE
-rb_inflate_initialize(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_inflate_initialize(int argc, VALUE *argv, VALUE obj)
 {
     struct zstream *z;
     VALUE wbits;
@@ -1464,8 +1375,7 @@ rb_inflate_initialize(argc, argv, obj)
 }
 
 static VALUE
-inflate_run(args)
-    VALUE args;
+inflate_run(VALUE args)
 {
     struct zstream *z = (struct zstream*)((VALUE*)args)[0];
     VALUE src = ((VALUE*)args)[1];
@@ -1493,8 +1403,7 @@ inflate_run(args)
  *
  */
 static VALUE
-rb_inflate_s_inflate(obj, src)
-    VALUE obj, src;
+rb_inflate_s_inflate(VALUE obj, VALUE src)
 {
     struct zstream z;
     VALUE dst, args[2];
@@ -1517,9 +1426,7 @@ rb_inflate_s_inflate(obj, src)
 }
 
 static void
-do_inflate(z, src)
-    struct zstream *z;
-    VALUE src;
+do_inflate(struct zstream *z, VALUE src)
 {
     if (NIL_P(src)) {
 	zstream_run(z, (Bytef*)&quot;&quot;, 0, Z_FINISH);
@@ -1546,8 +1453,7 @@ do_inflate(z, src)
  * TODO: document better!
  */
 static VALUE
-rb_inflate_inflate(obj, src)
-    VALUE obj, src;
+rb_inflate_inflate(VALUE obj, VALUE src)
 {
     struct zstream *z = get_zstream(obj);
     VALUE dst;
@@ -1584,8 +1490,7 @@ rb_inflate_inflate(obj, src)
  * preserved in output buffer.
  */
 static VALUE
-rb_inflate_addstr(obj, src)
-    VALUE obj, src;
+rb_inflate_addstr(VALUE obj, VALUE src)
 {
     struct zstream *z = get_zstream(obj);
 
@@ -1616,8 +1521,7 @@ rb_inflate_addstr(obj, src)
  * following data of full flush point is preserved in the buffer.
  */
 static VALUE
-rb_inflate_sync(obj, src)
-    VALUE obj, src;
+rb_inflate_sync(VALUE obj, VALUE src)
 {
     struct zstream *z = get_zstream(obj);
 
@@ -1634,8 +1538,7 @@ rb_inflate_sync(obj, src)
  * &lt;tt&gt;:)&lt;/tt&gt;
  */
 static VALUE
-rb_inflate_sync_point_p(obj)
-    VALUE obj;
+rb_inflate_sync_point_p(VALUE obj)
 {
     struct zstream *z = get_zstream(obj);
     int err;
@@ -1657,8 +1560,7 @@ rb_inflate_sync_point_p(obj)
  * TODO: document better!
  */
 static VALUE
-rb_inflate_set_dictionary(obj, dic)
-    VALUE obj, dic;
+rb_inflate_set_dictionary(VALUE obj, VALUE dic)
 {
     struct zstream *z = get_zstream(obj);
     VALUE src = dic;
@@ -1753,8 +1655,7 @@ struct gzfile {
 
 
 static void
-gzfile_mark(gz)
-    struct gzfile *gz;
+gzfile_mark(struct gzfile *gz)
 {
     rb_gc_mark(gz-&gt;io);
     rb_gc_mark(gz-&gt;orig_name);
@@ -1763,8 +1664,7 @@ gzfile_mark(gz)
 }
 
 static void
-gzfile_free(gz)
-    struct gzfile *gz;
+gzfile_free(struct gzfile *gz)
 {
     struct zstream *z = &amp;gz-&gt;z;
 
@@ -1806,8 +1706,7 @@ gzfile_new(klass, funcs, endfunc)
 #define gzfile_reader_new(gz) gzfile_new((gz),&amp;inflate_funcs,gzfile_reader_end)
 
 static void
-gzfile_reset(gz)
-    struct gzfile *gz;
+gzfile_reset(struct gzfile *gz)
 {
     zstream_reset(&amp;gz-&gt;z);
     gz-&gt;crc = crc32(0, Z_NULL, 0);
@@ -1816,9 +1715,7 @@ gzfile_reset(gz)
 }
 
 static void
-gzfile_close(gz, closeflag)
-    struct gzfile *gz;
-    int closeflag;
+gzfile_close(struct gzfile *gz, int closeflag)
 {
     VALUE io = gz-&gt;io;
 
@@ -1832,8 +1729,7 @@ gzfile_close(gz, closeflag)
 }
 
 static void
-gzfile_write_raw(gz)
-    struct gzfile *gz;
+gzfile_write_raw(struct gzfile *gz)
 {
     VALUE str;
 
@@ -1848,8 +1744,7 @@ gzfile_write_raw(gz)
 }
 
 static VALUE
-gzfile_read_raw_partial(arg)
-    VALUE arg;
+gzfile_read_raw_partial(VALUE arg)
 {
     struct gzfile *gz = (struct gzfile*)arg;
     VALUE str;
@@ -1860,8 +1755,7 @@ gzfile_read_raw_partial(arg)
 }
 
 static VALUE
-gzfile_read_raw_rescue(arg)
-    VALUE arg;
+gzfile_read_raw_rescue(VALUE arg)
 {
     struct gzfile *gz = (struct gzfile*)arg;
     VALUE str = Qnil;
@@ -1875,8 +1769,7 @@ gzfile_read_raw_rescue(arg)
 }
 
 static VALUE
-gzfile_read_raw(gz)
-    struct gzfile *gz;
+gzfile_read_raw(struct gzfile *gz)
 {
     return rb_rescue2(gzfile_read_raw_partial, (VALUE)gz,
                       gzfile_read_raw_rescue, (VALUE)gz,
@@ -1884,9 +1777,7 @@ gzfile_read_raw(gz)
 }
 
 static int
-gzfile_read_raw_ensure(gz, size)
-    struct gzfile *gz;
-    int size;
+gzfile_read_raw_ensure(struct gzfile *gz, int size)
 {
     VALUE str;
 
@@ -1899,9 +1790,7 @@ gzfile_read_raw_ensure(gz, size)
 }
 
 static char *
-gzfile_read_raw_until_zero(gz, offset)
-    struct gzfile *gz;
-    long offset;
+gzfile_read_raw_until_zero(struct gzfile *gz, long offset)
 {
     VALUE str;
     char *p;
@@ -1921,8 +1810,7 @@ gzfile_read_raw_until_zero(gz, offset)
 }
 
 static unsigned int
-gzfile_get16(src)
-    const unsigned char *src;
+gzfile_get16(const unsigned char *src)
 {
     unsigned int n;
     n  = *(src++) &amp; 0xff;
@@ -1931,8 +1819,7 @@ gzfile_get16(src)
 }
 
 static unsigned long
-gzfile_get32(src)
-    const unsigned char *src;
+gzfile_get32(const unsigned char *src)
 {
     unsigned long n;
     n  = *(src++) &amp; 0xff;
@@ -1943,9 +1830,7 @@ gzfile_get32(src)
 }
 
 static void
-gzfile_set32(n, dst)
-    unsigned long n;
-    unsigned char *dst;
+gzfile_set32(unsigned long n, unsigned char *dst)
 {
     *(dst++) = n &amp; 0xff;
     *(dst++) = (n &gt;&gt; 8) &amp; 0xff;
@@ -1954,8 +1839,7 @@ gzfile_set32(n, dst)
 }
 
 static void
-gzfile_make_header(gz)
-    struct gzfile *gz;
+gzfile_make_header(struct gzfile *gz)
 {
     Bytef buf[10];  /* the size of gzip header */
     unsigned char flags = 0, extraflags = 0;
@@ -1999,8 +1883,7 @@ gzfile_make_header(gz)
 }
 
 static void
-gzfile_make_footer(gz)
-    struct gzfile *gz;
+gzfile_make_footer(struct gzfile *gz)
 {
     Bytef buf[8];  /* 8 is the size of gzip footer */
 
@@ -2011,8 +1894,7 @@ gzfile_make_footer(gz)
 }
 
 static void
-gzfile_read_header(gz)
-    struct gzfile *gz;
+gzfile_read_header(struct gzfile *gz)
 {
     const unsigned char *head;
     long len;
@@ -2087,8 +1969,7 @@ gzfile_read_header(gz)
 }
 
 static void
-gzfile_check_footer(gz)
-    struct gzfile *gz;
+gzfile_check_footer(struct gzfile *gz)
 {
     unsigned long crc, length;
 
@@ -2113,10 +1994,7 @@ gzfile_check_footer(gz)
 }
 
 static void
-gzfile_write(gz, str, len)
-    struct gzfile *gz;
-    Bytef *str;
-    uInt len;
+gzfile_write(struct gzfile *gz, Bytef *str, uInt len)
 {
     if (!(gz-&gt;z.flags &amp; GZFILE_FLAG_HEADER_FINISHED)) {
 	gzfile_make_header(gz);
@@ -2131,8 +2009,7 @@ gzfile_write(gz, str, len)
 }
 
 static long
-gzfile_read_more(gz)
-    struct gzfile *gz;
+gzfile_read_more(struct gzfile *gz)
 {
     volatile VALUE str;
 
@@ -2154,9 +2031,7 @@ gzfile_read_more(gz)
 }
 
 static void
-gzfile_calc_crc(gz, str)
-    struct gzfile *gz;
-    VALUE str;
+gzfile_calc_crc(struct gzfile *gz, VALUE str)
 {
     if (RSTRING(str)-&gt;len &lt;= gz-&gt;ungetc) {
 	gz-&gt;ungetc -= RSTRING(str)-&gt;len;
@@ -2169,9 +2044,7 @@ gzfile_calc_crc(gz, str)
 }
 
 static VALUE
-gzfile_read(gz, len)
-    struct gzfile *gz;
-    int len;
+gzfile_read(struct gzfile *gz, int len)
 {
     VALUE dst;
 
@@ -2197,10 +2070,7 @@ gzfile_read(gz, len)
 }
 
 static VALUE
-gzfile_readpartial(gz, len, outbuf)
-    struct gzfile *gz;
-    int len;
-    VALUE outbuf;
+gzfile_readpartial(struct gzfile *gz, int len, VALUE outbuf)
 {
     VALUE dst;
 
@@ -2245,8 +2115,7 @@ gzfile_readpartial(gz, len, outbuf)
 }
 
 static VALUE
-gzfile_read_all(gz)
-    struct gzfile *gz;
+gzfile_read_all(struct gzfile *gz)
 {
     VALUE dst;
 
@@ -2268,17 +2137,14 @@ gzfile_read_all(gz)
 }
 
 static void
-gzfile_ungetc(gz, c)
-    struct gzfile *gz;
-    int c;
+gzfile_ungetc(struct gzfile *gz, int c)
 {
     zstream_buffer_ungetc(&amp;gz-&gt;z, c);
     gz-&gt;ungetc++;
 }
 
 static VALUE
-gzfile_writer_end_run(arg)
-    VALUE arg;
+gzfile_writer_end_run(VALUE arg)
 {
     struct gzfile *gz = (struct gzfile *)arg;
 
@@ -2294,8 +2160,7 @@ gzfile_writer_end_run(arg)
 }
 
 static void
-gzfile_writer_end(gz)
-    struct gzfile *gz;
+gzfile_writer_end(struct gzfile *gz)
 {
     if (ZSTREAM_IS_CLOSING(&amp;gz-&gt;z)) return;
     gz-&gt;z.flags |= ZSTREAM_FLAG_CLOSING;
@@ -2304,8 +2169,7 @@ gzfile_writer_end(gz)
 }
 
 static VALUE
-gzfile_reader_end_run(arg)
-    VALUE arg;
+gzfile_reader_end_run(VALUE arg)
 {
     struct gzfile *gz = (struct gzfile *)arg;
 
@@ -2318,8 +2182,7 @@ gzfile_reader_end_run(arg)
 }
 
 static void
-gzfile_reader_end(gz)
-    struct gzfile *gz;
+gzfile_reader_end(struct gzfile *gz)
 {
     if (ZSTREAM_IS_CLOSING(&amp;gz-&gt;z)) return;
     gz-&gt;z.flags |= ZSTREAM_FLAG_CLOSING;
@@ -2328,8 +2191,7 @@ gzfile_reader_end(gz)
 }
 
 static void
-gzfile_reader_rewind(gz)
-    struct gzfile *gz;
+gzfile_reader_rewind(struct gzfile *gz)
 {
     long n;
 
@@ -2343,8 +2205,7 @@ gzfile_reader_rewind(gz)
 }
 
 static VALUE
-gzfile_reader_get_unused(gz)
-    struct gzfile *gz;
+gzfile_reader_get_unused(struct gzfile *gz)
 {
     VALUE str;
 
@@ -2361,8 +2222,7 @@ gzfile_reader_get_unused(gz)
 }
 
 static struct gzfile *
-get_gzfile(obj)
-    VALUE obj;
+get_gzfile(VALUE obj)
 {
     struct gzfile *gz;
 
@@ -2388,8 +2248,7 @@ get_gzfile(obj)
 
 
 static VALUE
-gzfile_ensure_close(obj)
-    VALUE obj;
+gzfile_ensure_close(VALUE obj)
 {
     struct gzfile *gz;
 
@@ -2404,10 +2263,7 @@ gzfile_ensure_close(obj)
  * See Zlib::GzipReader#wrap and Zlib::GzipWriter#wrap.
  */
 static VALUE
-rb_gzfile_s_wrap(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+rb_gzfile_s_wrap(int argc, VALUE *argv, VALUE klass)
 {
     VALUE obj = rb_class_new_instance(argc, argv, klass);
 
@@ -2423,11 +2279,7 @@ rb_gzfile_s_wrap(argc, argv, klass)
  * See Zlib::GzipReader#open and Zlib::GzipWriter#open.
  */
 static VALUE
-gzfile_s_open(argc, argv, klass, mode)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
-    const char *mode;
+gzfile_s_open(int argc, VALUE *argv, VALUE klass, const char *mode)
 {
     VALUE io, filename;
 
@@ -2446,8 +2298,7 @@ gzfile_s_open(argc, argv, klass, mode)
  * Same as IO.
  */
 static VALUE
-rb_gzfile_to_io(obj)
-    VALUE obj;
+rb_gzfile_to_io(VALUE obj)
 {
     return get_gzfile(obj)-&gt;io;
 }
@@ -2456,8 +2307,7 @@ rb_gzfile_to_io(obj)
  * Returns CRC value of the uncompressed data.
  */
 static VALUE
-rb_gzfile_crc(obj)
-    VALUE obj;
+rb_gzfile_crc(VALUE obj)
 {
     return rb_uint2inum(get_gzfile(obj)-&gt;crc);
 }
@@ -2466,8 +2316,7 @@ rb_gzfile_crc(obj)
  * Returns last modification time recorded in the gzip file header.
  */
 static VALUE
-rb_gzfile_mtime(obj)
-    VALUE obj;
+rb_gzfile_mtime(VALUE obj)
 {
     return rb_time_new(get_gzfile(obj)-&gt;mtime, (time_t)0);
 }
@@ -2476,8 +2325,7 @@ rb_gzfile_mtime(obj)
  * Returns compression level.
  */
 static VALUE
-rb_gzfile_level(obj)
-    VALUE obj;
+rb_gzfile_level(VALUE obj)
 {
     return INT2FIX(get_gzfile(obj)-&gt;level);
 }
@@ -2486,8 +2334,7 @@ rb_gzfile_level(obj)
  * Returns OS code number recorded in the gzip file header.
  */
 static VALUE
-rb_gzfile_os_code(obj)
-    VALUE obj;
+rb_gzfile_os_code(VALUE obj)
 {
     return INT2FIX(get_gzfile(obj)-&gt;os_code);
 }
@@ -2497,8 +2344,7 @@ rb_gzfile_os_code(obj)
  * original filename is not present.
  */
 static VALUE
-rb_gzfile_orig_name(obj)
-    VALUE obj;
+rb_gzfile_orig_name(VALUE obj)
 {
     VALUE str = get_gzfile(obj)-&gt;orig_name;
     if (!NIL_P(str)) {
@@ -2513,8 +2359,7 @@ rb_gzfile_orig_name(obj)
  * is not present.
  */
 static VALUE
-rb_gzfile_comment(obj)
-    VALUE obj;
+rb_gzfile_comment(VALUE obj)
 {
     VALUE str = get_gzfile(obj)-&gt;comment;
     if (!NIL_P(str)) {
@@ -2528,8 +2373,7 @@ rb_gzfile_comment(obj)
  * ???
  */
 static VALUE
-rb_gzfile_lineno(obj)
-    VALUE obj;
+rb_gzfile_lineno(VALUE obj)
 {
     return INT2NUM(get_gzfile(obj)-&gt;lineno);
 }
@@ -2538,8 +2382,7 @@ rb_gzfile_lineno(obj)
  * ???
  */
 static VALUE
-rb_gzfile_set_lineno(obj, lineno)
-    VALUE obj, lineno;
+rb_gzfile_set_lineno(VALUE obj, VALUE lineno)
 {
     struct gzfile *gz = get_gzfile(obj);
     gz-&gt;lineno = NUM2INT(lineno);
@@ -2550,8 +2393,7 @@ rb_gzfile_set_lineno(obj, lineno)
  * ???
  */
 static VALUE
-rb_gzfile_set_mtime(obj, mtime)
-    VALUE obj, mtime;
+rb_gzfile_set_mtime(VALUE obj, VALUE mtime)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE val;
@@ -2574,8 +2416,7 @@ rb_gzfile_set_mtime(obj, mtime)
  * ???
  */
 static VALUE
-rb_gzfile_set_orig_name(obj, str)
-    VALUE obj, str;
+rb_gzfile_set_orig_name(VALUE obj, VALUE str)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE s;
@@ -2597,8 +2438,7 @@ rb_gzfile_set_orig_name(obj, str)
  * ???
  */
 static VALUE
-rb_gzfile_set_comment(obj, str)
-    VALUE obj, str;
+rb_gzfile_set_comment(VALUE obj, VALUE str)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE s;
@@ -2621,8 +2461,7 @@ rb_gzfile_set_comment(obj, str)
  * associated IO object. Returns the associated IO object.
  */
 static VALUE
-rb_gzfile_close(obj)
-    VALUE obj;
+rb_gzfile_close(VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE io;
@@ -2638,8 +2477,7 @@ rb_gzfile_close(obj)
  * object.
  */
 static VALUE
-rb_gzfile_finish(obj)
-    VALUE obj;
+rb_gzfile_finish(VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE io;
@@ -2653,8 +2491,7 @@ rb_gzfile_finish(obj)
  * Same as IO.
  */
 static VALUE
-rb_gzfile_closed_p(obj)
-    VALUE obj;
+rb_gzfile_closed_p(VALUE obj)
 {
     struct gzfile *gz;
     Data_Get_Struct(obj, struct gzfile, gz);
@@ -2665,8 +2502,7 @@ rb_gzfile_closed_p(obj)
  * ???
  */
 static VALUE
-rb_gzfile_eof_p(obj)
-    VALUE obj;
+rb_gzfile_eof_p(VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     return GZFILE_IS_FINISHED(gz) ? Qtrue : Qfalse;
@@ -2676,8 +2512,7 @@ rb_gzfile_eof_p(obj)
  * Same as IO.
  */
 static VALUE
-rb_gzfile_sync(obj)
-    VALUE obj;
+rb_gzfile_sync(VALUE obj)
 {
     return (get_gzfile(obj)-&gt;z.flags &amp; GZFILE_FLAG_SYNC) ? Qtrue : Qfalse;
 }
@@ -2690,8 +2525,7 @@ rb_gzfile_sync(obj)
  * decreases sharply.
  */
 static VALUE
-rb_gzfile_set_sync(obj, mode)
-    VALUE obj, mode;
+rb_gzfile_set_sync(VALUE obj, VALUE mode)
 {
     struct gzfile *gz = get_gzfile(obj);
 
@@ -2708,8 +2542,7 @@ rb_gzfile_set_sync(obj, mode)
  * ???
  */
 static VALUE
-rb_gzfile_total_in(obj)
-    VALUE obj;
+rb_gzfile_total_in(VALUE obj)
 {
     return rb_uint2inum(get_gzfile(obj)-&gt;z.stream.total_in);
 }
@@ -2718,8 +2551,7 @@ rb_gzfile_total_in(obj)
  * ???
  */
 static VALUE
-rb_gzfile_total_out(obj)
-    VALUE obj;
+rb_gzfile_total_out(VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     return rb_uint2inum(gz-&gt;z.stream.total_out - gz-&gt;z.buf_filled);
@@ -2756,8 +2588,7 @@ rb_gzfile_total_out(obj)
  */
 
 static VALUE
-rb_gzwriter_s_allocate(klass)
-    VALUE klass;
+rb_gzwriter_s_allocate(VALUE klass)
 {
     return gzfile_writer_new(klass);
 }
@@ -2770,10 +2601,7 @@ rb_gzwriter_s_allocate(klass)
  * this method are found in Zlib::GzipWriter.new and Zlib::GzipWriter#wrap.
  */
 static VALUE
-rb_gzwriter_s_open(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+rb_gzwriter_s_open(int argc, VALUE *argv, VALUE klass)
 {
     return gzfile_s_open(argc, argv, klass, &quot;wb&quot;);
 }
@@ -2787,10 +2615,7 @@ rb_gzwriter_s_open(argc, argv, klass)
  * +write+ method that behaves same as write method in IO class.
  */
 static VALUE
-rb_gzwriter_initialize(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzwriter_initialize(int argc, VALUE *argv, VALUE obj)
 {
     struct gzfile *gz;
     VALUE io, level, strategy;
@@ -2820,10 +2645,7 @@ rb_gzwriter_initialize(argc, argv, obj)
  * +flush+ is omitted.  It is no use giving flush &lt;tt&gt;Zlib::NO_FLUSH&lt;/tt&gt;.
  */
 static VALUE
-rb_gzwriter_flush(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzwriter_flush(int argc, VALUE *argv, VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE v_flush;
@@ -2847,8 +2669,7 @@ rb_gzwriter_flush(argc, argv, obj)
  * Same as IO.
  */
 static VALUE
-rb_gzwriter_write(obj, str)
-    VALUE obj, str;
+rb_gzwriter_write(VALUE obj, VALUE str)
 {
     struct gzfile *gz = get_gzfile(obj);
 
@@ -2863,8 +2684,7 @@ rb_gzwriter_write(obj, str)
  * Same as IO.
  */
 static VALUE
-rb_gzwriter_putc(obj, ch)
-    VALUE obj, ch;
+rb_gzwriter_putc(VALUE obj, VALUE ch)
 {
     struct gzfile *gz = get_gzfile(obj);
     char c = NUM2CHR(ch);
@@ -2955,8 +2775,7 @@ rb_gzwriter_putc(obj, ch)
  */
 
 static VALUE
-rb_gzreader_s_allocate(klass)
-    VALUE klass;
+rb_gzreader_s_allocate(VALUE klass)
 {
     return gzfile_reader_new(klass);
 }
@@ -2969,10 +2788,7 @@ rb_gzreader_s_allocate(klass)
  * are in Zlib::GzipReader.new and ZLib::GzipReader.wrap.
  */
 static VALUE
-rb_gzreader_s_open(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+rb_gzreader_s_open(int argc, VALUE *argv, VALUE klass)
 {
     return gzfile_s_open(argc, argv, klass, &quot;rb&quot;);
 }
@@ -2988,8 +2804,7 @@ rb_gzreader_s_open(argc, argv, klass)
  * exception.
  */
 static VALUE
-rb_gzreader_initialize(obj, io)
-    VALUE obj, io;
+rb_gzreader_initialize(VALUE obj, VALUE io)
 {
     struct gzfile *gz;
     int err;
@@ -3013,8 +2828,7 @@ rb_gzreader_initialize(obj, io)
  * object.  The associated IO object needs to respond to the +seek+ method.
  */
 static VALUE
-rb_gzreader_rewind(obj)
-    VALUE obj;
+rb_gzreader_rewind(VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     gzfile_reader_rewind(gz);
@@ -3026,8 +2840,7 @@ rb_gzreader_rewind(obj)
  * +nil+ if the whole gzip file is not parsed yet.
  */
 static VALUE
-rb_gzreader_unused(obj)
-    VALUE obj;
+rb_gzreader_unused(VALUE obj)
 {
     struct gzfile *gz;
     Data_Get_Struct(obj, struct gzfile, gz);
@@ -3038,10 +2851,7 @@ rb_gzreader_unused(obj)
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_read(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzreader_read(int argc, VALUE *argv, VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE vlen;
@@ -3070,10 +2880,7 @@ rb_gzreader_read(argc, argv, obj)
  *  It raises &lt;code&gt;EOFError&lt;/code&gt; on end of file.
  */
 static VALUE
-rb_gzreader_readpartial(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzreader_readpartial(int argc, VALUE *argv, VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE vlen, outbuf;
@@ -3094,8 +2901,7 @@ rb_gzreader_readpartial(argc, argv, obj)
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_getc(obj)
-    VALUE obj;
+rb_gzreader_getc(VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE dst;
@@ -3111,8 +2917,7 @@ rb_gzreader_getc(obj)
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_readchar(obj)
-    VALUE obj;
+rb_gzreader_readchar(VALUE obj)
 {
     VALUE dst;
     dst = rb_gzreader_getc(obj);
@@ -3126,8 +2931,7 @@ rb_gzreader_readchar(obj)
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_each_byte(obj)
-    VALUE obj;
+rb_gzreader_each_byte(VALUE obj)
 {
     VALUE c;
     while (!NIL_P(c = rb_gzreader_getc(obj))) {
@@ -3140,8 +2944,7 @@ rb_gzreader_each_byte(obj)
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_ungetc(obj, ch)
-    VALUE obj, ch;
+rb_gzreader_ungetc(VALUE obj, VALUE ch)
 {
     struct gzfile *gz = get_gzfile(obj);
     gzfile_ungetc(gz, NUM2CHR(ch));
@@ -3149,8 +2952,7 @@ rb_gzreader_ungetc(obj, ch)
 }
 
 static void
-gzreader_skip_linebreaks(gz)
-    struct gzfile *gz;
+gzreader_skip_linebreaks(struct gzfile *gz)
 {
     VALUE str;
     char *p;
@@ -3181,20 +2983,14 @@ gzreader_skip_linebreaks(gz)
 }
 
 static void
-rscheck(rsptr, rslen, rs)
-    char *rsptr;
-    long rslen;
-    VALUE rs;
+rscheck(char *rsptr, long rslen, VALUE rs)
 {
     if (RSTRING(rs)-&gt;ptr != rsptr &amp;&amp; RSTRING(rs)-&gt;len != rslen)
 	rb_raise(rb_eRuntimeError, &quot;rs modified&quot;);
 }
 
 static VALUE
-gzreader_gets(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+gzreader_gets(int argc, VALUE *argv, VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     volatile VALUE rs;
@@ -3274,10 +3070,7 @@ gzreader_gets(argc, argv, obj)
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_gets(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzreader_gets(int argc, VALUE *argv, VALUE obj)
 {
     VALUE dst;
     dst = gzreader_gets(argc, argv, obj);
@@ -3291,10 +3084,7 @@ rb_gzreader_gets(argc, argv, obj)
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_readline(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzreader_readline(int argc, VALUE *argv, VALUE obj)
 {
     VALUE dst;
     dst = rb_gzreader_gets(argc, argv, obj);
@@ -3308,10 +3098,7 @@ rb_gzreader_readline(argc, argv, obj)
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_each(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzreader_each(int argc, VALUE *argv, VALUE obj)
 {
     VALUE str;
     while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {
@@ -3324,10 +3111,7 @@ rb_gzreader_each(argc, argv, obj)
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_readlines(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzreader_readlines(int argc, VALUE *argv, VALUE obj)
 {
     VALUE str, dst;
     dst = rb_ary_new();</diff>
      <filename>ext/zlib/zlib.c</filename>
    </modified>
    <modified>
      <diff>@@ -412,6 +412,7 @@ add_heap(void)
     if (himem &lt; pend) himem = pend;
     heaps_used++;
     heap_slots *= 1.8;
+    if (heap_slots &lt;= 0) heap_slots = HEAP_MIN_SLOTS;
 
     while (p &lt; pend) {
 	p-&gt;as.free.flags = 0;
@@ -832,6 +833,7 @@ gc_mark_children(VALUE ptr, int lev)
 	  case NODE_MODULE:
 	  case NODE_ALIAS:
 	  case NODE_VALIAS:
+	  case NODE_BLOCK_PASS:
 	    gc_mark((VALUE)obj-&gt;as.node.u1.node, lev);
 	    /* fall through */
 	  case NODE_METHOD:	/* 2 */
@@ -863,12 +865,10 @@ gc_mark_children(VALUE ptr, int lev)
 	  case NODE_COLON2:
 	  case NODE_SPLAT:
 	  case NODE_TO_ARY:
-	  case NODE_SVALUE:
 	    ptr = (VALUE)obj-&gt;as.node.u1.node;
 	    goto again;
 
 	  case NODE_SCOPE:	/* 2,3 */
-	  case NODE_BLOCK_PASS:
 	  case NODE_CDECL:
 	    gc_mark((VALUE)obj-&gt;as.node.u3.node, lev);
 	    ptr = (VALUE)obj-&gt;as.node.u2.node;
@@ -2066,7 +2066,7 @@ Init_GC(void)
     rb_global_variable(&amp;nomem_error);
     nomem_error = rb_exc_new2(rb_eNoMemError, &quot;failed to allocate memory&quot;);
 
+    rb_define_method(rb_cBasicObject, &quot;__id__&quot;, rb_obj_id, 0);
+    rb_define_method(rb_cBasicObject, &quot;object_id&quot;, rb_obj_id, 0);
     rb_define_method(rb_mKernel, &quot;hash&quot;, rb_obj_id, 0);
-    rb_define_method(rb_mKernel, &quot;__id__&quot;, rb_obj_id, 0);
-    rb_define_method(rb_mKernel, &quot;object_id&quot;, rb_obj_id, 0);
 }</diff>
      <filename>gc.c</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,7 @@ rb_hash_freeze(VALUE hash)
 VALUE rb_cHash;
 
 static VALUE envtbl;
-static ID id_hash, id_call, id_default;
+static ID id_hash, id_yield, id_default;
 
 static VALUE
 eql(VALUE *args)
@@ -474,7 +474,7 @@ rb_hash_default(int argc, VALUE *argv, VALUE hash)
 
     rb_scan_args(argc, argv, &quot;01&quot;, &amp;key);
     if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
-	return rb_funcall(RHASH(hash)-&gt;ifnone, id_call, 2, hash, key);
+	return rb_funcall(RHASH(hash)-&gt;ifnone, id_yield, 2, hash, key);
     }
     return RHASH(hash)-&gt;ifnone;
 }
@@ -656,7 +656,7 @@ rb_hash_shift(VALUE hash)
 	return rb_assoc_new(var.key, var.val);
     }
     else if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
-	return rb_funcall(RHASH(hash)-&gt;ifnone, id_call, 2, hash, Qnil);
+	return rb_funcall(RHASH(hash)-&gt;ifnone, id_yield, 2, hash, Qnil);
     }
     else {
 	return RHASH(hash)-&gt;ifnone;
@@ -986,7 +986,7 @@ static int
 each_pair_i(VALUE key, VALUE value)
 {
     if (key == Qundef) return ST_CONTINUE;
-    rb_yield_values(2, key, value);
+    rb_yield(rb_assoc_new(key, value));
     return ST_CONTINUE;
 }
 
@@ -994,11 +994,11 @@ each_pair_i(VALUE key, VALUE value)
  *  call-seq:
  *     hsh.each_pair {| key_value_array | block } -&gt; hsh
  *  
- *  Calls &lt;i&gt;block&lt;/i&gt; once for each key in &lt;i&gt;hsh&lt;/i&gt;, passing the key
- *  and value as parameters.
+ *  Calls &lt;i&gt;block&lt;/i&gt; once for each key in &lt;i&gt;hsh&lt;/i&gt;, passing the
+ *  key and value to the block as a two-element array.
  *     
  *     h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }
- *     h.each_pair {|key, value| puts &quot;#{key} is #{value}&quot; }
+ *     h.each_pair {|(key, value)| puts &quot;#{key} is #{value}&quot; }
  *     
  *  &lt;em&gt;produces:&lt;/em&gt;
  *     
@@ -1019,7 +1019,7 @@ static int
 each_i(VALUE key, VALUE value)
 {
     if (key == Qundef) return ST_CONTINUE;
-    rb_yield(rb_assoc_new(key, value));
+    rb_yield_values(2, key, value);
     return ST_CONTINUE;
 }
 
@@ -1027,11 +1027,9 @@ each_i(VALUE key, VALUE value)
  *  call-seq:
  *     hsh.each {| key, value | block } -&gt; hsh
  *  
- *  Calls &lt;i&gt;block&lt;/i&gt; once for each key in &lt;i&gt;hsh&lt;/i&gt;, passing the key
- *  and value to the block as a two-element array. Because of the assignment
- *  semantics of block parameters, these elements will be split out if the
- *  block has two formal parameters. Also see &lt;code&gt;Hash.each_pair&lt;/code&gt;, which
- *  will be marginally more efficient for blocks with two parameters.
+ *  Calls &lt;i&gt;block&lt;/i&gt; once for each key in &lt;i&gt;hsh&lt;/i&gt;, passing the key-value
+ *  pair as parameters.  Also see &lt;code&gt;Hash#each_pair&lt;/code&gt;, which
+ *  passes the key and value to the block as a two-element array.
  *     
  *     h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }
  *     h.each {|key, value| puts &quot;#{key} is #{value}&quot; }
@@ -1893,14 +1891,14 @@ static VALUE
 env_each(VALUE ehash)
 {
     RETURN_ENUMERATOR(ehash, 0, 0);
-    return env_each_i(ehash, Qfalse);
+    return env_each_i(ehash, Qtrue);
 }
 
 static VALUE
 env_each_pair(VALUE ehash)
 {
     RETURN_ENUMERATOR(ehash, 0, 0);
-    return env_each_i(ehash, Qtrue);
+    return env_each_i(ehash, Qfalse);
 }
 
 static VALUE
@@ -2273,7 +2271,7 @@ void
 Init_Hash(void)
 {
     id_hash = rb_intern(&quot;hash&quot;);
-    id_call = rb_intern(&quot;call&quot;);
+    id_yield = rb_intern(&quot;yield&quot;);
     id_default = rb_intern(&quot;default&quot;);
 
     rb_cHash = rb_define_class(&quot;Hash&quot;, rb_cObject);</diff>
      <filename>hash.c</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@ def parse_args()
   opt.on('--dest-dir=DIR') {|dir| $destdir = dir}
   opt.on('--make=COMMAND') {|make| $make = make}
   opt.on('--mantype=MAN') {|man| $mantype = man}
-  opt.on('--make-flags=FLAGS', '--mflags', Shellwords) do |v|
+  opt.on('--make-flags=FLAGS', '--mflags', Shellwords) do |*v|
     if arg = v.first
       arg.insert(0, '-') if /\A[^-][^=]*\Z/ =~ arg
     end
@@ -38,7 +38,7 @@ def parse_args()
   $mflags.unshift(*rest) unless rest.empty?
 
   def $mflags.set?(flag)
-    grep(/\A-(?!-).*#{'%c' % flag}/i) { return true }
+    grep(/\A-(?!-).*#{'%s' % flag}/i) { return true }
     false
   end
 </diff>
      <filename>instruby.rb</filename>
    </modified>
    <modified>
      <diff>@@ -128,6 +128,7 @@ VALUE rb_class_instance_methods(int, VALUE*, VALUE);
 VALUE rb_class_public_instance_methods(int, VALUE*, VALUE);
 VALUE rb_class_protected_instance_methods(int, VALUE*, VALUE);
 VALUE rb_class_private_instance_methods(int, VALUE*, VALUE);
+VALUE rb_class_local_methods(VALUE);
 VALUE rb_obj_singleton_methods(int, VALUE*, VALUE);
 void rb_define_method_id(VALUE, ID, VALUE (*)(ANYARGS), int);
 void rb_frozen_class_p(VALUE);
@@ -425,9 +426,9 @@ VALUE rb_range_new(VALUE, VALUE, int);
 VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
 VALUE rb_length_by_each(VALUE);
 /* re.c */
-int rb_memcmp(char*,char*,long);
-int rb_memcicmp(char*,char*,long);
-long rb_memsearch(char*,long,char*,long);
+int rb_memcmp(const void*,const void*,long);
+int rb_memcicmp(const void*,const void*,long);
+long rb_memsearch(const void*,long,const void*,long);
 VALUE rb_reg_nth_defined(int, VALUE);
 VALUE rb_reg_nth_match(int, VALUE);
 VALUE rb_reg_last_match(VALUE);</diff>
      <filename>intern.h</filename>
    </modified>
    <modified>
      <diff>@@ -1095,7 +1095,8 @@ static VALUE
 rb_io_inspect(VALUE obj)
 {
     OpenFile *fptr;
-    char *cname, *st = &quot;&quot;;
+    char *cname;
+    const char *st = &quot;&quot;;
 
     fptr = RFILE(rb_io_taint_check(obj))-&gt;fptr;
     if (!fptr || !fptr-&gt;path) return rb_any_to_s(obj);
@@ -1962,21 +1963,40 @@ rb_io_each_byte(VALUE io)
     return io;
 }
 
+VALUE
+rb_io_getc(VALUE io)
+{
+    OpenFile *fptr;
+    int c;
+
+    GetOpenFile(io, fptr);
+    rb_io_check_readable(fptr);
+
+    READ_CHECK(fptr);
+    c = io_getc(fptr);
+
+    if (c &lt; 0) {
+	return Qnil;
+    }
+    return INT2FIX(c &amp; 0xff);
+}
+
 /*
  *  call-seq:
- *     ios.getc   =&gt; fixnum or nil
+ *     ios.getc   =&gt; string or nil
  *
- *  Gets the next 8-bit byte (0..255) from &lt;em&gt;ios&lt;/em&gt;. Returns
+ *  Reads a one-character string from &lt;em&gt;ios&lt;/em&gt;. Returns
  *  &lt;code&gt;nil&lt;/code&gt; if called at end of file.
  *
  *     f = File.new(&quot;testfile&quot;)
- *     f.getc   #=&gt; 84
- *     f.getc   #=&gt; 104
+ *     f.getc   #=&gt; &quot;8&quot;
+ *     f.getc   #=&gt; &quot;1&quot;
  */
 
 VALUE
-rb_io_getc(VALUE io)
+rb_io_getc_m(VALUE io)
 {
+    char ch;
     OpenFile *fptr;
     int c;
 
@@ -1989,7 +2009,8 @@ rb_io_getc(VALUE io)
     if (c &lt; 0) {
 	return Qnil;
     }
-    return INT2FIX(c &amp; 0xff);
+    ch = c &amp; 0xff; 
+    return rb_str_new(&amp;ch, 1);
 }
 
 int
@@ -2009,7 +2030,7 @@ rb_getc(FILE *f)
 
 /*
  *  call-seq:
- *     ios.readchar   =&gt; fixnum
+ *     ios.readchar   =&gt; string
  *
  *  Reads a character as with &lt;code&gt;IO#getc&lt;/code&gt;, but raises an
  *  &lt;code&gt;EOFError&lt;/code&gt; on end of file.
@@ -2028,7 +2049,7 @@ rb_io_readchar(VALUE io)
 
 /*
  *  call-seq:
- *     ios.ungetc(integer)   =&gt; nil
+ *     ios.ungetc(string)   =&gt; nil
  *
  *  Pushes back one character (passed as a parameter) onto &lt;em&gt;ios&lt;/em&gt;,
  *  such that a subsequent buffered read will return it. Only one character
@@ -2037,20 +2058,30 @@ rb_io_readchar(VALUE io)
  *  back). Has no effect with unbuffered reads (such as &lt;code&gt;IO#sysread&lt;/code&gt;).
  *
  *     f = File.new(&quot;testfile&quot;)   #=&gt; #&lt;File:testfile&gt;
- *     c = f.getc                 #=&gt; 84
+ *     c = f.getc                 #=&gt; &quot;8&quot;
  *     f.ungetc(c)                #=&gt; nil
- *     f.getc                     #=&gt; 84
+ *     f.getc                     #=&gt; &quot;8&quot;
  */
 
 VALUE
 rb_io_ungetc(VALUE io, VALUE c)
 {
     OpenFile *fptr;
-    int cc = NUM2INT(c);
+    int cc;
 
     GetOpenFile(io, fptr);
     rb_io_check_readable(fptr);
-
+    if (NIL_P(c)) return Qnil;
+    if (FIXNUM_P(c)) {
+	cc = FIX2INT(c);
+    }
+    else {
+	SafeStringValue(c);
+	if (RSTRING(c)-&gt;len &gt; 1) {
+	    rb_warn(&quot;IO#ungetc pushes back only one byte&quot;);
+	}
+	cc = (unsigned char)RSTRING(c)-&gt;ptr[0];
+    }
     if (io_ungetc(cc, fptr) == EOF &amp;&amp; cc != EOF) {
 	rb_raise(rb_eIOError, &quot;ungetc failed&quot;);
     }
@@ -2912,8 +2943,9 @@ popen_redirect(struct popen_arg *p)
 
 #ifdef HAVE_FORK
 static int
-popen_exec(struct popen_arg *p)
+popen_exec(void *pp)
 {
+    struct popen_arg *p = (struct popen_arg*)pp;
     int fd;
 
     popen_redirect(p);
@@ -5316,23 +5348,23 @@ argf_readpartial(int argc, VALUE *argv)
 static VALUE
 argf_getc(void)
 {
-    VALUE byte;
+    VALUE ch;
 
   retry:
     if (!next_argv()) return Qnil;
     if (TYPE(current_file) != T_FILE) {
-	byte = rb_funcall3(current_file, rb_intern(&quot;getc&quot;), 0, 0);
+	ch = rb_funcall3(current_file, rb_intern(&quot;getc&quot;), 0, 0);
     }
     else {
-	byte = rb_io_getc(current_file);
+	ch = rb_io_getc(current_file);
     }
-    if (NIL_P(byte) &amp;&amp; next_p != -1) {
+    if (NIL_P(ch) &amp;&amp; next_p != -1) {
 	argf_close(current_file);
 	next_p = 1;
 	goto retry;
     }
 
-    return byte;
+    return ch;
 }
 
 static VALUE
@@ -5646,7 +5678,7 @@ Init_IO(void)
     rb_define_method(rb_cIO, &quot;write&quot;, io_write, 1);
     rb_define_method(rb_cIO, &quot;gets&quot;,  rb_io_gets_m, -1);
     rb_define_method(rb_cIO, &quot;readline&quot;,  rb_io_readline, -1);
-    rb_define_method(rb_cIO, &quot;getc&quot;,  rb_io_getc, 0);
+    rb_define_method(rb_cIO, &quot;getc&quot;,  rb_io_getc_m, 0);
     rb_define_method(rb_cIO, &quot;readchar&quot;,  rb_io_readchar, 0);
     rb_define_method(rb_cIO, &quot;ungetc&quot;,rb_io_ungetc, 1);
     rb_define_method(rb_cIO, &quot;&lt;&lt;&quot;,    rb_io_addstr, 1);</diff>
      <filename>io.c</filename>
    </modified>
    <modified>
      <diff>@@ -20,6 +20,7 @@ fileutils.rb
 find.rb
 forwardable.rb
 generator.rb
+getoptlong.rb
 logger.rb
 matrix.rb
 net</diff>
      <filename>lib/.document</filename>
    </modified>
    <modified>
      <diff>@@ -726,6 +726,8 @@ class CGI
       when /shift_jis/ni
         content = NKF::nkf('-s', content)
         options[&quot;language&quot;] = &quot;ja&quot; unless options.has_key?(&quot;language&quot;)
+      when /utf-8/ni
+        content = NKF::nkf('-w', content)
       end
     end
 </diff>
      <filename>lib/cgi.rb</filename>
    </modified>
    <modified>
      <diff>@@ -93,7 +93,7 @@
 # array, like this:
 #
 #   class RecordCollection
-#     extends Forwardable
+#     extend Forwardable
 #     def_delegator :@records, :[], :record_number
 #   end
 #
@@ -101,7 +101,7 @@
 # all of which delegate to @records, this is how you can do it:
 #
 #   class RecordCollection
-#     # extends Forwardable, but we did that above
+#     # extend Forwardable, but we did that above
 #     def_delegators :@records, :size, :&lt;&lt;, :map
 #   end
 #   f = Foo.new</diff>
      <filename>lib/forwardable.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +1,94 @@
-#                                                         -*- Ruby -*-
-# Copyright (C) 1998, 1999, 2000  Motoyuki Kasahara
 #
-# You may redistribute it and/or modify it under the same license
+# GetoptLong for Ruby
+#
+# Copyright (C) 1998, 1999, 2000  Motoyuki Kasahara.
+#
+# You may redistribute and/or modify this library under the same license
 # terms as Ruby.
 #
+# See GetoptLong for documentation.
+#
+# Additional documents and the latest version of `getoptlong.rb' can be
+# found at http://www.sra.co.jp/people/m-kasahr/ruby/getoptlong/
 
+# The GetoptLong class allows you to parse command line options similarly to
+# the GNU getopt_long() C library call. Note, however, that GetoptLong is a 
+# pure Ruby implementation.
 #
-# Documents and latest version of `getoptlong.rb' are found at:
-#    http://www.sra.co.jp/people/m-kasahr/ruby/getoptlong/
+# GetoptLong allows for POSIX-style options like &lt;tt&gt;--file&lt;/tt&gt; as well 
+# as single letter options like &lt;tt&gt;-f&lt;/tt&gt;
 #
-
+# The empty option &lt;tt&gt;--&lt;/tt&gt; (two minus symbols) is used to end option
+# processing. This can be particularly important if options have optional
+# arguments.
 #
-# Parse command line options just like GNU getopt_long().
+# Here is a simple example of usage:
+#
+#     # == Synopsis
+#     #
+#     # hello: greets user, demonstrates command line parsing
+#     #
+#     # == Usage
+#     #
+#     # hello [OPTION] ... DIR
+#     #
+#     # -h, --help:
+#     #    show help
+#     #
+#     # --repeat x, -n x:
+#     #    repeat x times
+#     #
+#     # --name [name]:
+#     #    greet user by name, if name not supplied default is John
+#     #
+#     # DIR: The directory in which to issue the greeting.
+#     
+#     require 'getoptlong'
+#     require 'rdoc/usage'
+#     
+#     opts = GetoptLong.new(
+#       [ '--help', '-h', GetoptLong::NO_ARGUMENT ],
+#       [ '--repeat', '-n', GetoptLong::REQUIRED_ARGUMENT ],
+#       [ '--name', GetoptLong::OPTIONAL_ARGUMENT ]
+#     )
+#     
+#     dir = nil
+#     name = nil
+#     repetitions = 1
+#     opts.each do |opt, arg|
+#       case opt
+#         when '--help'
+#           RDoc::usage
+#         when '--repeat'
+#           repetitions = arg.to_i
+#         when '--name'
+#           if arg == ''
+#             name = 'John'
+#           else
+#             name = arg
+#           end
+#       end
+#     end
+#     
+#     if ARGV.length != 1
+#       puts &quot;Missing dir argument (try --help)&quot;
+#       exit 0
+#     end
+#     
+#     dir = ARGV.shift
+#     
+#     Dir.chdir(dir)
+#     for i in (1..repetitions)
+#       print &quot;Hello&quot;
+#       if name
+#         print &quot;, #{name}&quot;
+#       end
+#       puts
+#     end
+#
+# Example command line:
+#
+#     hello -n 6 --name -- /tmp
 #
 class GetoptLong
   #
@@ -40,13 +117,20 @@ class GetoptLong
   class InvalidOption    &lt; Error; end
 
   #
-  # The arguments are passed to new() as an array of arrays. Each
-  # subarray has a number of option names which carry the same
-  # meaning, and a ARGUMENT_FLAG, being one of
-  # GetoptLong::NO_ARGUMENT, GetoptLong::REQUIRED_ARGUMENT or
-  # GetoptLong::OPTIONAL_ARGUMENT.  These determine whether the
-  # option takes an argument or not, or whether it is optional The
-  # actual processing is done later with #each().
+  # Set up option processing.
+  #
+  # The options to support are passed to new() as an array of arrays.
+  # Each sub-array contains any number of String option names which carry 
+  # the same meaning, and one of the following flags:
+  #
+  # GetoptLong::NO_ARGUMENT :: Option does not take an argument.
+  #
+  # GetoptLong::REQUIRED_ARGUMENT :: Option always takes an argument.
+  #
+  # GetoptLong::OPTIONAL_ARGUMENT :: Option may or may not take an argument.
+  #
+  # The first option name is considered to be the preferred (canonical) name.
+  # Other than that, the elements of each sub-array can be in any order.
   #
   def initialize(*arguments)
     #
@@ -109,11 +193,53 @@ class GetoptLong
   end
 
   #
-  # Set the handling of the ordering of options.  The supplied
-  # argument ordering must be a member of ORDERINGS, i.e one of
-  # GetoptLong::REQUIRE_ORDER, GetoptLong::PERMUTE,
-  # GetoptLong::RETURN_IN_ORDER.  A RuntimeError is raised if
-  # option processing has already started.
+  # Set the handling of the ordering of options and arguments.
+  # A RuntimeError is raised if option processing has already started.
+  #
+  # The supplied value must be a member of GetoptLong::ORDERINGS. It alters
+  # the processing of options as follows:
+  #
+  # &lt;b&gt;REQUIRE_ORDER&lt;/b&gt; :
+  # 
+  # Options are required to occur before non-options.
+  #
+  # Processing of options ends as soon as a word is encountered that has not
+  # been preceded by an appropriate option flag.
+  #
+  # For example, if -a and -b are options which do not take arguments,
+  # parsing command line arguments of '-a one -b two' would result in 
+  # 'one', '-b', 'two' being left in ARGV, and only ('-a', '') being 
+  # processed as an option/arg pair.
+  #
+  # This is the default ordering, if the environment variable
+  # POSIXLY_CORRECT is set. (This is for compatibility with GNU getopt_long.)
+  #
+  # &lt;b&gt;PERMUTE&lt;/b&gt; :
+  #  
+  # Options can occur anywhere in the command line parsed. This is the 
+  # default behavior.
+  #
+  # Every sequence of words which can be interpreted as an option (with or
+  # without argument) is treated as an option; non-option words are skipped.
+  #
+  # For example, if -a does not require an argument and -b optionally takes
+  # an argument, parsing '-a one -b two three' would result in ('-a','') and
+  # ('-b', 'two') being processed as option/arg pairs, and 'one','three'
+  # being left in ARGV.
+  #
+  # If the ordering is set to PERMUTE but the environment variable
+  # POSIXLY_CORRECT is set, REQUIRE_ORDER is used instead. This is for
+  # compatibility with GNU getopt_long.
+  #
+  # &lt;b&gt;RETURN_IN_ORDER&lt;/b&gt; :
+  #
+  # All words on the command line are processed as options. Words not 
+  # preceded by a short or long option flag are passed as arguments
+  # with an option of '' (empty string).
+  #
+  # For example, if -a requires an argument but -b does not, a command line
+  # of '-a one -b two three' would result in option/arg pairs of ('-a', 'one')
+  # ('-b', ''), ('', 'two'), ('', 'three') being processed.
   #
   def ordering=(ordering)
     #
@@ -144,7 +270,9 @@ class GetoptLong
   attr_reader :ordering
 
   #
-  # Set options
+  # Set options. Takes the same argument as GetoptLong.new.
+  #
+  # Raises a RuntimeError if option processing has already started.
   #
   def set_options(*arguments)
     #
@@ -233,7 +361,7 @@ class GetoptLong
   alias quiet? quiet
 
   #
-  # Terminate option processing.
+  # Explicitly terminate option processing.
   #
   def terminate
     return nil if @status == STATUS_TERMINATED
@@ -253,7 +381,7 @@ class GetoptLong
   end
 
   #
-  # Examine whether option processing is terminated or not.
+  # Returns true if option processing has terminated, false otherwise.
   #
   def terminated?
     return @status == STATUS_TERMINATED
@@ -286,16 +414,22 @@ class GetoptLong
   #
   alias error? error
 
-  #
-  # Return an error message.
+  # Return the appropriate error message in POSIX-defined format.
+  # If no error has occurred, returns nil.
   #
   def error_message
     return @error_message
   end
 
   #
-  # Get next option name and its argument as an array.
-  # Return nil if the processing is complete (as determined by
+  # Get next option name and its argument, as an Array of two elements.
+  #
+  # The option name is always converted to the first (preferred)
+  # name given in the original options to GetoptLong.new.
+  #
+  # Example: ['--option', 'value']
+  #
+  # Returns nil if the processing is complete (as determined by
   # STATUS_TERMINATED).
   #
   def get
@@ -462,9 +596,15 @@ class GetoptLong
   #
   alias get_option get
 
+  # Iterator version of `get'.
+  #
+  # The block is called repeatedly with two arguments:
+  # The first is the option name.
+  # The second is the argument which followed it (if any). 
+  # Example: ('--opt', 'value')
   #
-  # Iterator version of `get', passes the option and the
-  # corresponding argument to the supplied block for processing.
+  # The option name is always converted to the first (preferred)
+  # name given in the original options to GetoptLong.new.
   #
   def each
     loop do</diff>
      <filename>lib/getoptlong.rb</filename>
    </modified>
    <modified>
      <diff>@@ -174,7 +174,7 @@ class String
   def tr_s!(from, to)
     return self.delete!(from) if to.length == 0
 
-    pattern = SqueezePatternCache[from] ||= /([#{_regex_quote(from)}])\1+/
+    pattern = SqueezePatternCache[from] ||= /([#{_regex_quote(from)}])\1*/
     if from[0] == ?^
       last = /.$/.match(to)[0]
       self.gsub!(pattern, last)</diff>
      <filename>lib/jcode.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,14 +16,6 @@ require &quot;matrix.rb&quot;
 
 class Integer
 
-  remove_method(:gcd2)
-  def gcd2(other)
-    min = self.abs
-    max = other.abs
-    min, max = max % min, min while min &gt; 0
-    max
-  end
-
   def Integer.from_prime_division(pd)
     value = 1
     for prime, index in pd</diff>
      <filename>lib/mathn.rb</filename>
    </modified>
    <modified>
      <diff>@@ -786,21 +786,26 @@ def find_executable(bin, path = nil)
   end
 end
 
-def arg_config(config, *defaults, &amp;block)
-  $arg_config &lt;&lt; [config, *defaults]
-  defaults &lt;&lt; nil if !block and defaults.empty?
+def arg_config(config, default=nil, &amp;block)
+  $arg_config &lt;&lt; [config, default]
+  defaults = []
+  if default
+    defaults &lt;&lt; default
+  elsif !block
+    defaults &lt;&lt; nil
+  end
   $configure_args.fetch(config.tr('_', '-'), *defaults, &amp;block)
 end
 
-def with_config(config, *defaults)
+def with_config(config, default=nil)
   config = config.sub(/^--with[-_]/, '')
   val = arg_config(&quot;--with-&quot;+config) do
     if arg_config(&quot;--without-&quot;+config)
       false
     elsif block_given?
-      yield(config, *defaults)
+      yield(config, default)
     else
-      break *defaults
+      break default
     end
   end
   case val
@@ -813,15 +818,15 @@ def with_config(config, *defaults)
   end
 end
 
-def enable_config(config, *defaults)
+def enable_config(config, default=nil)
   if arg_config(&quot;--enable-&quot;+config)
     true
   elsif arg_config(&quot;--disable-&quot;+config)
     false
   elsif block_given?
-    yield(config, *defaults)
+    yield(config, default)
   else
-    return *defaults
+    return default
   end
 end
 
@@ -1105,7 +1110,7 @@ EXTSTATIC = #{$static || &quot;&quot;}
 STATIC_LIB = #{staticlib unless $static.nil?}
 
 }
-  install_dirs.each {|d| mfile.print(&quot;%-14s= %s\n&quot; % d) if /^[[:upper:]]/ =~ d[0]}
+  install_dirs.each {|*d| mfile.print(&quot;%-14s= %s\n&quot; % d) if /^[[:upper:]]/ =~ d[0]}
   n = ($extout ? '$(RUBYARCHDIR)/' : '') + '$(TARGET).'
   mfile.print %{
 TARGET_SO     = #{($extout ? '$(RUBYARCHDIR)/' : '')}$(DLLIB)</diff>
      <filename>lib/mkmf.rb</filename>
    </modified>
    <modified>
      <diff>@@ -357,7 +357,7 @@ class OptionParser
         if conv
           val = conv.call(*val)
         else
-          val = *val
+          val = val[0]
         end
         return arg, block, val
       else
@@ -622,7 +622,7 @@ class OptionParser
       if list = __send__(id)
         val = list.fetch(key) {return nil}
         return val unless block_given?
-        yield(val)
+        yield(*val)
       end
     end
 
@@ -848,7 +848,7 @@ class OptionParser
   # :nodoc:
   def add_officious
     list = base()
-    Officious.each_pair do |opt, block|
+    Officious.each do |opt, block|
       list.long[opt] ||= block.call(self)
     end
   end
@@ -1319,7 +1319,7 @@ class OptionParser
           end
           begin
             opt, sw, val = sw.parse(rest, argv) {|*exc| raise(*exc)}
-            sw.call(val) if sw
+            sw.call(*val) if sw
           rescue ParseError
             raise $!.set_option(arg, rest)
           end
@@ -1458,9 +1458,9 @@ class OptionParser
         yielded with the found value when succeeded.
 =end #'#&quot;#`#
   def search(id, key)
-    visit(:search, id, key) do |k|
+    visit(:search, id, key) do |*k|
       return k unless block_given?
-      return yield(k)
+      return yield(*k)
     end
   end
   private :search</diff>
      <filename>lib/optparse.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2555,7 +2555,7 @@ module RDoc
 	    break
 	  when TkCOMMA
 	  else
-	    warn(&quot;unexpected token: '#{tk2.inspect}'&quot;) if $DEBBUG
+           warn(&quot;unexpected token: '#{tk2.inspect}'&quot;) if $DEBUG
 	    break
 	  end
 	end</diff>
      <filename>lib/rdoc/parsers/parse_rb.rb</filename>
    </modified>
    <modified>
      <diff>@@ -41,5 +41,11 @@ module RI
 
     # This is the search path for 'ri'
     PATH = [ SYSDIR, SITEDIR, HOMEDIR ].find_all {|p| p &amp;&amp; File.directory?(p)}
+
+    begin
+      require 'rubygems'
+      Dir[&quot;#{Gem.path}/doc/*/ri&quot;].each { |path| RI::Paths::PATH &lt;&lt; path }
+    rescue LoadError
+    end
   end
 end</diff>
      <filename>lib/rdoc/ri/ri_paths.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,8 +6,7 @@ require 'test/unit/assertions'
 require 'runit/error'
 
 module RUNIT
-  module Assert
-    include Test::Unit::Assertions
+  module AssertMixin
 
     def setup_assert
     end
@@ -70,4 +69,8 @@ module RUNIT
       /assertions\.rb/.match(caller[1])
     end
   end
+  module Assert
+    include Test::Unit::Assertions
+    include AssertMixin
+  end
 end</diff>
      <filename>lib/runit/assert.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ require 'test/unit/testcase'
 
 module RUNIT
   class TestCase &lt; Test::Unit::TestCase  
-    include RUNIT::Assert
+    include RUNIT::AssertMixin
     
     def self.suite
       method_names = instance_methods(true)</diff>
      <filename>lib/runit/testcase.rb</filename>
    </modified>
    <modified>
      <diff>@@ -67,7 +67,7 @@ class Tempfile &lt; DelegateClass(File)
   end
 
   def make_tmpname(basename, n)
-    sprintf('%s%d.%d', basename, $$, n)
+    sprintf('%s.%d.%d', basename, $$, n)
   end
   private :make_tmpname
 </diff>
      <filename>lib/tempfile.rb</filename>
    </modified>
    <modified>
      <diff>@@ -304,7 +304,7 @@ w_float(double d, struct dump_arg *arg)
 static void
 w_symbol(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)) {
@@ -872,7 +872,7 @@ r_symbol(struct load_arg *arg)
     return r_symreal(arg);
 }
 
-static char*
+static const char*
 r_unique(struct load_arg *arg)
 {
     return rb_id2name(r_symbol(arg));</diff>
      <filename>marshal.c</filename>
    </modified>
    <modified>
      <diff>@@ -300,16 +300,55 @@ math_exp(VALUE obj, VALUE x)
  */
 
 static VALUE
-math_log(VALUE obj, VALUE x)
+math_log(int argc, VALUE *argv)
 {
-    double d;
+    VALUE x, base;
+    double d, b;
 
+    rb_scan_args(argc, argv, &quot;11&quot;, &amp;x, &amp;base);
     Need_Float(x);
     errno = 0;
     d = log(RFLOAT(x)-&gt;value);
     if (errno) {
 	rb_sys_fail(&quot;log&quot;);
     }
+    if (!NIL_P(base)) {
+	Need_Float(base);
+	d /= log(RFLOAT(base)-&gt;value);
+    }
+    if (errno) {
+	rb_sys_fail(&quot;log&quot;);
+    }
+    return rb_float_new(d);
+}
+
+#ifndef HAVE_LOG2
+double
+log2(double x)
+{
+    return log10(x)/log10(2.0);
+}
+#endif
+
+/*
+ *  call-seq:
+ *     Math.log2(numeric)    =&gt; float
+ *  
+ *  Returns the base 2 logarithm of &lt;i&gt;numeric&lt;/i&gt;.
+ */
+
+static VALUE
+math_log2(VALUE obj, VALUE x)
+{
+    extern double log2(double);
+    double d;
+
+    Need_Float(x);
+    errno = 0;
+    d = log2(RFLOAT(x)-&gt;value);
+    if (errno) {
+	rb_sys_fail(&quot;log2&quot;);
+    }
     return rb_float_new(d);
 }
 
@@ -485,7 +524,8 @@ Init_Math(void)
     rb_define_module_function(rb_mMath, &quot;atanh&quot;, math_atanh, 1);
 
     rb_define_module_function(rb_mMath, &quot;exp&quot;, math_exp, 1);
-    rb_define_module_function(rb_mMath, &quot;log&quot;, math_log, 1);
+    rb_define_module_function(rb_mMath, &quot;log&quot;, math_log, -1);
+    rb_define_module_function(rb_mMath, &quot;log2&quot;, math_log2, 1);
     rb_define_module_function(rb_mMath, &quot;log10&quot;, math_log10, 1);
     rb_define_module_function(rb_mMath, &quot;sqrt&quot;, math_sqrt, 1);
 </diff>
      <filename>math.c</filename>
    </modified>
    <modified>
      <diff>@@ -314,9 +314,7 @@ static int BSD__sfvwrite(fp, uio)
  * then reset it so that it can be reused.
  */
 static int
-BSD__sprint(fp, uio)
-	FILE *fp;
-	register struct __suio *uio;
+BSD__sprint(FILE *fp, register struct __suio *uio)
 {
 	register int err;
 
@@ -337,10 +335,7 @@ BSD__sprint(fp, uio)
  * worries about ungetc buffers and so forth.
  */
 static int
-BSD__sbprintf(fp, fmt, ap)
-	register FILE *fp;
-	const char *fmt;
-	va_list ap;
+BSD__sbprintf(register FILE *fp, const char *fmt, va_list ap)
 {
 /* We don't support files. */
 	return 0;
@@ -361,11 +356,7 @@ BSD__sbprintf(fp, fmt, ap)
  * use the given digits.
  */
 static char *
-BSD__ultoa(val, endp, base, octzero, xdigs)
-	register u_long val;
-	char *endp;
-	int base, octzero;
-	char *xdigs;
+BSD__ultoa(register u_long val, char *endp, int base, int octzero, char *xdigs)
 {
 	register char *cp = endp;
 	register long sval;
@@ -464,10 +455,7 @@ static int exponent __P((char *, int, int));
 #define	ZEROPAD		0x080		/* zero (as opposed to blank) pad */
 #define FPT		0x100		/* Floating point number */
 static int
-BSD_vfprintf(fp, fmt0, ap)
-	FILE *fp;
-	const char *fmt0;
-	va_list ap;
+BSD_vfprintf(FILE *fp, const char *fmt0, va_list ap)
 {
 	register char *fmt;	/* format string */
 	register int ch;	/* character from fmt */</diff>
      <filename>missing/vsnprintf.c</filename>
    </modified>
    <modified>
      <diff>@@ -38,9 +38,11 @@ vars = {}
 has_version = false
 File.foreach &quot;config.status&quot; do |line|
   next if /^#/ =~ line
-  if /^s[%,]@program_transform_name@[%,]s,(.*)/ =~ line
+  line.gsub!(/\|#_!!_#\|/, '')
+  if /^s[%,]@program_transform_name@[%,]s(\\?.)(.*)\1[%,]/ =~ line
     next if $install_name
-    ptn = $1.sub(/\$\$/, '$').split(/,/)	#'
+    sep = Regexp.quote($1)
+    ptn = $2.sub(/\$\$/, '$').split(/#{sep}/,2)
     v_fast &lt;&lt; &quot;  CONFIG[\&quot;ruby_install_name\&quot;] = \&quot;&quot; + &quot;ruby&quot;.sub(/#{ptn[0]}/,ptn[1]) + &quot;\&quot;\n&quot;
   elsif /^s[%,]@(\w+)@[%,](.*)[%,]/ =~ line
     name = $1</diff>
      <filename>mkconfig.rb</filename>
    </modified>
    <modified>
      <diff>@@ -86,11 +86,11 @@ enum node_type {
     NODE_DREGX,
     NODE_DREGX_ONCE,
     NODE_ARGS,
+    NODE_POSTARG,
     NODE_ARGSCAT,
     NODE_ARGSPUSH,
     NODE_SPLAT,
     NODE_TO_ARY,
-    NODE_SVALUE,
     NODE_BLOCK_ARG,
     NODE_BLOCK_PASS,
     NODE_DEFN,
@@ -311,11 +311,11 @@ typedef struct RNode {
 #define NEW_SUPER(a) NEW_NODE(NODE_SUPER,0,0,a)
 #define NEW_ZSUPER() NEW_NODE(NODE_ZSUPER,0,0,0)
 #define NEW_ARGS(f,o,r) NEW_NODE(NODE_ARGS,o,r,f)
+#define NEW_POSTARG(r,m) NEW_NODE(NODE_POSTARG,m,0,r)
 #define NEW_ARGSCAT(a,b) NEW_NODE(NODE_ARGSCAT,a,b,0)
 #define NEW_ARGSPUSH(a,b) NEW_NODE(NODE_ARGSPUSH,a,b,0)
 #define NEW_SPLAT(a) NEW_NODE(NODE_SPLAT,a,0,0)
 #define NEW_TO_ARY(a) NEW_NODE(NODE_TO_ARY,a,0,0)
-#define NEW_SVALUE(a) NEW_NODE(NODE_SVALUE,a,0,0)
 #define NEW_BLOCK_ARG(v) NEW_NODE(NODE_BLOCK_ARG,v,0,local_cnt(v))
 #define NEW_BLOCK_PASS(b) NEW_NODE(NODE_BLOCK_PASS,0,b,0)
 #define NEW_ALIAS(n,o) NEW_NODE(NODE_ALIAS,n,o,0)
@@ -345,10 +345,11 @@ typedef struct RNode {
 #define NOEX_NOSUPER   1
 #define NOEX_PRIVATE   2
 #define NOEX_PROTECTED 4 
-#define NOEX_MASK      6 
+#define NOEX_LOCAL     8
+#define NOEX_MASK      14
 
 #define NOEX_UNDEF     NOEX_NOSUPER
-#define NOEX_RECV      8
+#define NOEX_RECV      16
 
 VALUE rb_parser_new(void);
 VALUE rb_parser_end_seen_p(VALUE);</diff>
      <filename>node.h</filename>
    </modified>
    <modified>
      <diff>@@ -284,21 +284,21 @@ num_div(VALUE x, VALUE y)
  *    ------+-----+---------------+---------+-------------+---------------
  *    -13   | -4  |   3,   -1     |   3     |   -1        |    -1
  *    ------+-----+---------------+---------+-------------+---------------
- *     11.5 |  4  |   2.0,  3.5   |   2.875 |    3.5      |     3.5
+ *     11.5 |  4  |   2,    3.5   |   2.875 |    3.5      |     3.5
  *    ------+-----+---------------+---------+-------------+---------------
- *     11.5 | -4  |  -3.0, -0.5   |  -2.875 |   -0.5      |     3.5
+ *     11.5 | -4  |  -3,   -0.5   |  -2.875 |   -0.5      |     3.5
  *    ------+-----+---------------+---------+-------------+---------------
- *    -11.5 |  4  |  -3.0   0.5   |  -2.875 |    0.5      |    -3.5
+ *    -11.5 |  4  |  -3,    0.5   |  -2.875 |    0.5      |    -3.5
  *    ------+-----+---------------+---------+-------------+---------------
- *    -11.5 | -4  |   2.0  -3.5   |   2.875 |   -3.5      |    -3.5
+ *    -11.5 | -4  |   2,   -3.5   |   2.875 |   -3.5      |    -3.5
  *
  *
  *  Examples
  *     11.divmod(3)         #=&gt; [3, 2]
  *     11.divmod(-3)        #=&gt; [-4, -1]
- *     11.divmod(3.5)       #=&gt; [3.0, 0.5]
- *     (-11).divmod(3.5)    #=&gt; [-4.0, 3.0]
- *     (11.5).divmod(3.5)   #=&gt; [3.0, 1.0]
+ *     11.divmod(3.5)       #=&gt; [3, 0.5]
+ *     (-11).divmod(3.5)    #=&gt; [-4, 3.0]
+ *     (11.5).divmod(3.5)   #=&gt; [3, 1.0]
  */
 
 static VALUE
@@ -696,7 +696,7 @@ flo_mod(VALUE x, VALUE y)
 static VALUE
 flo_divmod(VALUE x, VALUE y)
 {
-    double fy, div, mod;
+    double fy, div, mod, val;
     volatile VALUE a, b;
 
     switch (TYPE(y)) {
@@ -713,7 +713,13 @@ flo_divmod(VALUE x, VALUE y)
 	return rb_num_coerce_bin(x, y);
     }
     flodivmod(RFLOAT(x)-&gt;value, fy, &amp;div, &amp;mod);
-    a = rb_float_new(div);
+    if (FIXABLE(div)) {
+        val = div;
+        a = LONG2FIX(val);
+    }
+    else {
+        a = rb_dbl2big(div);
+    }
     b = rb_float_new(mod);
     return rb_assoc_new(a, b);
 }
@@ -1722,7 +1728,6 @@ int_succ(VALUE num)
  *  receiver's value.
  *     
  *     65.chr    #=&gt; &quot;A&quot;
- *     ?a.chr    #=&gt; &quot;a&quot;
  *     230.chr   #=&gt; &quot;\346&quot;
  */
 
@@ -2603,7 +2608,7 @@ fix_abs(VALUE fix)
 static VALUE
 fix_id2name(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>@@ -20,6 +20,7 @@
 #include &lt;ctype.h&gt;
 #include &lt;math.h&gt;
 
+VALUE rb_cBasicObject;
 VALUE rb_mKernel;
 VALUE rb_cObject;
 VALUE rb_cModule;
@@ -266,7 +267,7 @@ static int
 inspect_i(ID id, VALUE value, VALUE str)
 {
     VALUE str2;
-    char *ivname;
+    const char *ivname;
 
     /* need not to show internal data */
     if (CLASS_OF(value) == 0) return ST_CONTINUE;
@@ -698,8 +699,7 @@ nil_to_s(VALUE obj)
  */
 
 static VALUE
-nil_to_a(obj)
-    VALUE obj;
+nil_to_a(VALUE obj)
 {
     return rb_ary_new2(0);
 }
@@ -1007,7 +1007,7 @@ static VALUE
 sym_inspect(VALUE sym)
 {
     VALUE str;
-    char *name;
+    const char *name;
     ID id = SYM2ID(sym);
 
     name = rb_id2name(id);
@@ -1374,7 +1374,7 @@ rb_obj_alloc(VALUE klass)
 {
     VALUE obj;
 
-    if (RCLASS(klass)-&gt;super == 0) {
+    if (RCLASS(klass)-&gt;super == 0 &amp;&amp; klass != rb_cBasicObject) {
 	rb_raise(rb_eTypeError, &quot;can't instantiate uninitialized class&quot;);
     }
     if (FL_TEST(klass, FL_SINGLETON)) {
@@ -2258,7 +2258,7 @@ rb_f_array(VALUE obj, VALUE arg)
 }
 
 static VALUE
-boot_defclass(char *name, VALUE super)
+boot_defclass(const char *name, VALUE super)
 {
     extern st_table *rb_class_tbl;
     VALUE obj = rb_class_boot(super);
@@ -2309,9 +2309,12 @@ VALUE ruby_top_self;
  *  that follows, the vertical arrows represent inheritance, and the
  *  parentheses meta-classes. All metaclasses are instances 
  *  of the class `Class'.
- *
- *                            +------------------+
- *                            |                  |
+ * 
+ *                             +-----------------+
+ *                             |                 |
+ *           BasicObject--&gt;(BasicObject)         |
+ *                ^           ^                  |
+ *                |           |                  |
  *              Object----&gt;(Object)              |
  *               ^  ^        ^  ^                |
  *               |  |        |  |                |
@@ -2331,10 +2334,12 @@ VALUE ruby_top_self;
 
 
 /*
- *  &lt;code&gt;Object&lt;/code&gt; is the parent class of all classes in Ruby. Its
+ *  &lt;code&gt;BasicObject&lt;/code&gt; is the parent class of all classes in Ruby.
+ *  It's an explicit blank class.  &lt;code&gt;Object&lt;/code&gt;, the root of Ruby's
+ *  class hierarchy is a direct subclass of &lt;code&gt;BasicObject&lt;/code&gt;.  Its
  *  methods are therefore available to all objects unless explicitly
  *  overridden.
- *     
+ *
  *  &lt;code&gt;Object&lt;/code&gt; mixes in the &lt;code&gt;Kernel&lt;/code&gt; module, making
  *  the built-in kernel functions globally accessible. Although the
  *  instance methods of &lt;code&gt;Object&lt;/code&gt; are defined by the
@@ -2351,18 +2356,23 @@ Init_Object(void)
 {
     VALUE metaclass;
 
-    rb_cObject = boot_defclass(&quot;Object&quot;, 0);
+    rb_cBasicObject = boot_defclass(&quot;BasicObject&quot;, 0);
+    rb_cObject = boot_defclass(&quot;Object&quot;, rb_cBasicObject);
     rb_cModule = boot_defclass(&quot;Module&quot;, rb_cObject);
     rb_cClass =  boot_defclass(&quot;Class&quot;,  rb_cModule);
 
-    metaclass = rb_make_metaclass(rb_cObject, rb_cClass);
+    metaclass = rb_make_metaclass(rb_cBasicObject, rb_cClass);
+    metaclass = rb_make_metaclass(rb_cObject, metaclass);
     metaclass = rb_make_metaclass(rb_cModule, metaclass);
     metaclass = rb_make_metaclass(rb_cClass, metaclass);
 
+    rb_define_private_method(rb_cBasicObject, &quot;initialize&quot;, rb_obj_dummy, 0);
+    rb_define_alloc_func(rb_cBasicObject, rb_class_allocate_instance);
+    rb_define_method(rb_cBasicObject, &quot;==&quot;, rb_obj_equal, 1);
+    rb_define_method(rb_cBasicObject, &quot;equal?&quot;, rb_obj_equal, 1);
+
     rb_mKernel = rb_define_module(&quot;Kernel&quot;);
     rb_include_module(rb_cObject, rb_mKernel);
-    rb_define_alloc_func(rb_cObject, rb_class_allocate_instance);
-    rb_define_private_method(rb_cObject, &quot;initialize&quot;, rb_obj_dummy, 0);
     rb_define_private_method(rb_cClass, &quot;inherited&quot;, rb_obj_dummy, 1);
     rb_define_private_method(rb_cModule, &quot;included&quot;, rb_obj_dummy, 1);
     rb_define_private_method(rb_cModule, &quot;extended&quot;, rb_obj_dummy, 1);
@@ -2370,10 +2380,7 @@ Init_Object(void)
     rb_define_private_method(rb_cModule, &quot;method_removed&quot;, rb_obj_dummy, 1);
     rb_define_private_method(rb_cModule, &quot;method_undefined&quot;, rb_obj_dummy, 1);
 
-
     rb_define_method(rb_mKernel, &quot;nil?&quot;, rb_false, 0);
-    rb_define_method(rb_mKernel, &quot;==&quot;, rb_obj_equal, 1);
-    rb_define_method(rb_mKernel, &quot;equal?&quot;, rb_obj_equal, 1);
     rb_define_method(rb_mKernel, &quot;===&quot;, rb_equal, 1); 
     rb_define_method(rb_mKernel, &quot;=~&quot;, rb_obj_pattern_match, 1);
 
@@ -2477,6 +2484,8 @@ Init_Object(void)
 		     rb_class_protected_instance_methods, -1); /* in class.c */
     rb_define_method(rb_cModule, &quot;private_instance_methods&quot;, 
 		     rb_class_private_instance_methods, -1);   /* in class.c */
+    rb_define_method(rb_cModule, &quot;local_methods&quot;, 
+		     rb_class_local_methods, 0);               /* in class.c */
 
     rb_define_method(rb_cModule, &quot;constants&quot;, rb_mod_constants, 0); /* in variable.c */
     rb_define_method(rb_cModule, &quot;const_get&quot;, rb_mod_const_get, -1);</diff>
      <filename>object.c</filename>
    </modified>
    <modified>
      <diff>@@ -1286,7 +1286,7 @@ infected_str_new(const char *ptr, long len, VALUE str)
 static VALUE
 pack_unpack(VALUE str, VALUE fmt)
 {
-    static char *hexdigits = &quot;0123456789abcdef0123456789ABCDEFx&quot;;
+    static const char *hexdigits = &quot;0123456789abcdef0123456789ABCDEFx&quot;;
     char *s, *send;
     char *p, *pend;
     VALUE ary;
@@ -1320,7 +1320,7 @@ pack_unpack(VALUE str, VALUE fmt)
 	}
 	star = 0;
 	if (*p == '_' || *p == '!') {
-	    char *natstr = &quot;sSiIlL&quot;;
+	    const char *natstr = &quot;sSiIlL&quot;;
 
 	    if (strchr(natstr, type)) {
 #ifdef NATINT_PACK
@@ -1818,6 +1818,8 @@ pack_unpack(VALUE str, VALUE fmt)
 		while (s &lt; send) {
 		    if (*s == '=') {
 			if (++s == send) break;
+                       if (s+1 &lt; send &amp;&amp; *s == '\r' &amp;&amp; *(s+1) == '\n')
+                         s++;
 			if (*s != '\n') {
 			    if ((c1 = hex2num(*s)) == -1) break;
 			    if (++s == send) break;</diff>
      <filename>pack.c</filename>
    </modified>
    <modified>
      <diff>@@ -67,7 +67,6 @@ int   ruby_sourceline;		/* current line no. */
 enum lex_state_e {
     EXPR_BEG,			/* ignore newline, +/- is a sign. */
     EXPR_END,			/* newline significant, +/- is a operator. */
-    EXPR_END2,			/* newline significant, +/- is a operator. */
     EXPR_ARG,			/* newline significant, +/- is a operator. */
     EXPR_CMDARG,		/* newline significant, +/- is a operator. */
     EXPR_ENDARG,		/* newline significant, +/- is a operator. */
@@ -257,11 +256,12 @@ static NODE *remove_begin(NODE*);
 static void void_stmts_gen(struct parser_params*,NODE*);
 #define void_stmts(node) void_stmts_gen(parser, node)
 static void reduce_nodes(NODE**);
-static void block_dup_check(NODE*);
+static void block_dup_check(NODE*,NODE*);
 
 static NODE *block_append(NODE*,NODE*);
 static NODE *list_append(NODE*,NODE*);
 static NODE *list_concat(NODE*,NODE*);
+static NODE *arg_append(NODE*,NODE*);
 static NODE *arg_concat(NODE*,NODE*);
 static NODE *literal_concat(NODE*,NODE*);
 static NODE *new_evstr(NODE*);
@@ -270,18 +270,14 @@ static NODE *evstr2dstr(NODE*);
 static NODE *call_op_gen(struct parser_params*,NODE*,ID,int,NODE*);
 #define call_op(recv,id,narg,arg1) call_op_gen(parser, recv,id,narg,arg1)
 
-static NODE *new_args_gen(struct parser_params*,VALUE,NODE*,NODE*,NODE*);
-#define new_args(f,o,r,b) new_args_gen(parser, f,o,r,b)
+static NODE *new_args_gen(struct parser_params*,VALUE,NODE*,NODE*,NODE*,NODE*);
+#define new_args(f,o,r,p,b) new_args_gen(parser, f,o,r,p,b)
 static void shadowing_lvar_gen(struct parser_params*,ID);
 #define shadowing_lvar(name) shadowing_lvar_gen(parser, name)
 
 static NODE *negate_lit(NODE*);
 static NODE *ret_args(NODE*);
 static NODE *arg_blk_pass(NODE*,NODE*);
-static NODE *new_call(NODE*,ID,NODE*);
-static NODE *new_fcall_gen(struct parser_params*,ID,NODE*);
-#define new_fcall(id,args) new_fcall_gen(parser, id, args)
-static NODE *new_super(NODE*);
 static NODE *new_yield(NODE*);
 
 static NODE *gettable_gen(struct parser_params*,ID);
@@ -525,7 +521,7 @@ static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
 	k__FILE__
 
 %token &lt;id&gt;   tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR tLABEL
-%token &lt;node&gt; tINTEGER tFLOAT tSTRING_CONTENT
+%token &lt;node&gt; tINTEGER tFLOAT tSTRING_CONTENT tCHAR
 %token &lt;node&gt; tNTH_REF tBACK_REF
 %token &lt;num&gt;  tREGEXP_END
 
@@ -536,15 +532,17 @@ static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
 %type &lt;node&gt; bodystmt compstmt stmts stmt expr arg primary command command_call method_call
 %type &lt;node&gt; expr_value arg_value primary_value
 %type &lt;node&gt; if_tail opt_else case_body cases opt_rescue exc_list exc_var opt_ensure
-%type &lt;node&gt; args when_args call_args call_args2 open_args paren_args opt_paren_args
+%type &lt;node&gt; args call_args call_args2 opt_call_args
+%type &lt;node&gt; open_args paren_args opt_paren_args
 %type &lt;node&gt; command_args aref_args opt_block_arg block_arg var_ref var_lhs
 %type &lt;node&gt; mrhs superclass block_call block_command
-%type &lt;node&gt; f_arglist f_args f_rest_arg f_optarg f_opt f_block_arg opt_f_block_arg
+%type &lt;node&gt; f_arglist f_args f_rest_arg f_post_arg
+%type &lt;node&gt; f_optarg f_opt f_block_arg opt_f_block_arg
 %type &lt;node&gt; assoc_list assocs assoc undef_list backref string_dvar
 %type &lt;node&gt; for_var block_param opt_block_param block_param_def block_param0
 %type &lt;node&gt; opt_bv_decl bv_decls bv_decl lambda f_larglist lambda_body
 %type &lt;node&gt; brace_block cmd_brace_block do_block lhs none fitem
-%type &lt;node&gt; mlhs mlhs_head mlhs_basic mlhs_entry mlhs_item mlhs_node
+%type &lt;node&gt; mlhs mlhs_head mlhs_basic mlhs_entry mlhs_item mlhs_node mlhs_post
 %type &lt;id&gt;   fsym variable sym symbol operation operation2 operation3
 %type &lt;id&gt;   cname fname op f_norm_arg
 %type &lt;val&gt;  f_arg
@@ -579,7 +577,6 @@ static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
 %token tSTAR		/* * */
 %token tAMPER		/* &amp; */
 %token tLAMBDA		/* -&gt; */
-%token tLAMBDA_ARG	/* -&gt; */
 %token tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tWORDS_BEG tQWORDS_BEG
 %token tSTRING_DBEG tSTRING_DVAR tSTRING_END tLAMBEG
 
@@ -862,16 +859,12 @@ stmt		: kALIAS fitem {lex_state = EXPR_FNAME;} fitem
 		    }
 		| klEND '{' compstmt '}'
 		    {
-		    /*%%%*/
 			if (in_def || in_single) {
-			    rb_warn(&quot;END in method; use at_exit&quot;);
+			    rb_warn0(&quot;END in method; use at_exit&quot;);
 			}
-
+		    /*%%%*/
 			$$ = NEW_POSTEXE($3);
 		    /*%
-			if (in_def || in_single) {
-			    rb_warn0(&quot;END in method; use at_exit&quot;);
-			}
 			$$ = dispatch1(END, $3);
 		    %*/
 		    }
@@ -922,17 +915,13 @@ stmt		: kALIAS fitem {lex_state = EXPR_FNAME;} fitem
 			$$ = dispatch3(opassign, $1, $2, $3);
 		    %*/
 		    }
-		| primary_value '[' aref_args ']' tOP_ASGN command_call
+		| primary_value '[' opt_call_args ']' tOP_ASGN command_call
 		    {
 		    /*%%%*/
-			NODE *args;
+			NODE *args = $3;
 
 			value_expr($6);
-			args = NEW_LIST($6);
-			if ($3 &amp;&amp; nd_type($3) != NODE_ARRAY)
-			    $3 = NEW_LIST($3);
-			$3 = list_append($3, NEW_NIL());
-			list_concat(args, $3);
+			args = arg_concat($6, $3);
 			if ($5 == tOROP) {
 			    $5 = 0;
 			}
@@ -1010,7 +999,7 @@ stmt		: kALIAS fitem {lex_state = EXPR_FNAME;} fitem
 		| lhs '=' mrhs
 		    {
 		    /*%%%*/
-			$$ = node_assign($1, NEW_SVALUE($3));
+			$$ = node_assign($1, $3);
 		    /*%
 			$$ = dispatch2(assign, $1, $3);
 		    %*/
@@ -1018,7 +1007,7 @@ stmt		: kALIAS fitem {lex_state = EXPR_FNAME;} fitem
 		| mlhs '=' arg_value
 		    {
 		    /*%%%*/
-			$1-&gt;nd_value = ($1-&gt;nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
+			$1-&gt;nd_value = NEW_SPLAT($3);
 			$$ = $1;
 		    /*%
 			dispatch2(massign, $1, $3);
@@ -1115,7 +1104,7 @@ block_command	: block_call
 		| block_call '.' operation2 command_args
 		    {
 		    /*%%%*/
-			$$ = new_call($1, $3, $4);
+			$$ = NEW_CALL($1, $3, $4);
 		    /*%
 			$$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
 			$$ = method_arg($$, $4);
@@ -1124,7 +1113,7 @@ block_command	: block_call
 		| block_call tCOLON2 operation2 command_args
 		    {
 		    /*%%%*/
-			$$ = new_call($1, $3, $4);
+			$$ = NEW_CALL($1, $3, $4);
 		    /*%
 			$$ = dispatch3(call, $1, ripper_intern(&quot;::&quot;), $3);
 			$$ = method_arg($$, $4);
@@ -1159,7 +1148,7 @@ cmd_brace_block	: tLBRACE_ARG
 command		: operation command_args       %prec tLOWEST
 		    {
 		    /*%%%*/
-			$$ = new_fcall($1, $2);
+			$$ = NEW_FCALL($1, $2);
 			fixpos($$, $2);
 		    /*%
 			$$ = dispatch2(command, $1, $2);
@@ -1168,12 +1157,8 @@ command		: operation command_args       %prec tLOWEST
 		| operation command_args cmd_brace_block
 		    {
 		    /*%%%*/
-			$$ = new_fcall($1, $2);
-			if ($3) {
-			    block_dup_check($$);
-			    $3-&gt;nd_iter = $$;
-			    $$ = $3;
-			}
+			$$ = NEW_FCALL($1, $2);
+			block_dup_check($2,$3);
 			fixpos($$, $2);
 		    /*%
 			$$ = dispatch2(command, $1, $2);
@@ -1183,7 +1168,7 @@ command		: operation command_args       %prec tLOWEST
 		| primary_value '.' operation2 command_args	%prec tLOWEST
 		    {
 		    /*%%%*/
-			$$ = new_call($1, $3, $4);
+			$$ = NEW_CALL($1, $3, $4);
 			fixpos($$, $1);
 		    /*%
 			$$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4);
@@ -1192,12 +1177,8 @@ command		: operation command_args       %prec tLOWEST
 		| primary_value '.' operation2 command_args cmd_brace_block
 		    {
 		    /*%%%*/
-			$$ = new_call($1, $3, $4);
-			if ($5) {
-			    block_dup_check($$);
-			    $5-&gt;nd_iter = $$;
-			    $$ = $5;
-			}
+			$$ = NEW_CALL($1, $3, $4);
+			block_dup_check($4,$5);
 			fixpos($$, $1);
 		    /*%
 			$$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4);
@@ -1207,7 +1188,7 @@ command		: operation command_args       %prec tLOWEST
 		| primary_value tCOLON2 operation2 command_args	%prec tLOWEST
 		    {
 		    /*%%%*/
-			$$ = new_call($1, $3, $4);
+			$$ = NEW_CALL($1, $3, $4);
 			fixpos($$, $1);
 		    /*%
 			$$ = dispatch4(command_call, $1, ripper_intern(&quot;::&quot;), $3, $4);
@@ -1216,12 +1197,8 @@ command		: operation command_args       %prec tLOWEST
 		| primary_value tCOLON2 operation2 command_args cmd_brace_block
 		    {
 		    /*%%%*/
-			$$ = new_call($1, $3, $4);
-			if ($5) {
-			    block_dup_check($$);
-			    $5-&gt;nd_iter = $$;
-			    $$ = $5;
-			}
+			$$ = NEW_CALL($1, $3, $4);
+			block_dup_check($4,$5);
 			fixpos($$, $1);
 		    /*%
 			$$ = dispatch4(command_call, $1, ripper_intern(&quot;::&quot;), $3, $4);
@@ -1231,7 +1208,7 @@ command		: operation command_args       %prec tLOWEST
 		| kSUPER command_args
 		    {
 		    /*%%%*/
-			$$ = new_super($2);
+			$$ = NEW_SUPER($2);
 			fixpos($$, $2);
 		    /*%
 			$$ = dispatch1(super, $2);
@@ -1294,6 +1271,14 @@ mlhs_basic	: mlhs_head
 			$$ = mlhs_add_star($1, $3);
 		    %*/
 		    }
+		| mlhs_head tSTAR mlhs_node ',' mlhs_post
+		    {
+		    /*%%%*/
+			$$ = NEW_MASGN($1, NEW_POSTARG($3,$5));
+		    /*%
+			$$ = mlhs_add_star($1, $3);
+		    %*/
+		    }
 		| mlhs_head tSTAR
 		    {
 		    /*%%%*/
@@ -1302,6 +1287,14 @@ mlhs_basic	: mlhs_head
 			$$ = mlhs_add_star($1, Qnil);
 		    %*/
 		    }
+		| mlhs_head tSTAR ',' mlhs_post
+		    {
+		    /*%%%*/
+			$$ = NEW_MASGN($1, NEW_POSTARG(-1,$4));
+		    /*%
+			$$ = mlhs_add_star($1, Qnil);
+		    %*/
+		    }
 		| tSTAR mlhs_node
 		    {
 		    /*%%%*/
@@ -1310,6 +1303,14 @@ mlhs_basic	: mlhs_head
 			$$ = mlhs_add_star(mlhs_new(), $2);
 		    %*/
 		    }
+		| tSTAR mlhs_node ',' mlhs_post
+		    {
+		    /*%%%*/
+			$$ = NEW_MASGN(0, NEW_POSTARG($2,$4));
+		    /*%
+			$$ = mlhs_add_star(mlhs_new(), $2);
+		    %*/
+		    }
 		| tSTAR
 		    {
 		    /*%%%*/
@@ -1318,6 +1319,14 @@ mlhs_basic	: mlhs_head
 			$$ = mlhs_add_star(mlhs_new(), Qnil);
 		    %*/
 		    }
+		| tSTAR ',' mlhs_head
+		    {
+		    /*%%%*/
+			$$ = NEW_MASGN(0, NEW_POSTARG(-1,$3));
+		    /*%
+			$$ = mlhs_add_star(mlhs_new(), Qnil);
+		    %*/
+		    }
 		;
 
 mlhs_item	: mlhs_node
@@ -1349,6 +1358,24 @@ mlhs_head	: mlhs_item ','
 		    }
 		;
 
+mlhs_post	: mlhs_item
+		    {
+		    /*%%%*/
+			$$ = NEW_LIST($1);
+		    /*%
+			$$ = mlhs_add(mlhs_new(), $1);
+		    %*/
+		    }
+		| mlhs_post ',' mlhs_item
+		    {
+		    /*%%%*/
+			$$ = list_append($1, $3);
+		    /*%
+			$$ = mlhs_add($1, $3);
+		    %*/
+		    }
+		;
+
 mlhs_node	: variable
 		    {
 		    /*%%%*/
@@ -1357,7 +1384,7 @@ mlhs_node	: variable
 			$$ = $1;
 		    %*/
 		    }
-		| primary_value '[' aref_args ']'
+		| primary_value '[' opt_call_args ']'
 		    {
 		    /*%%%*/
 			$$ = aryset($1, $3);
@@ -1431,7 +1458,7 @@ lhs		: variable
 			$$ = dispatch1(var_field, $1);
 		    %*/
 		    }
-		| primary_value '[' aref_args ']'
+		| primary_value '[' opt_call_args ']'
 		    {
 		    /*%%%*/
 			$$ = aryset($1, $3);
@@ -1677,14 +1704,13 @@ arg		: lhs '=' arg
 			$$ = dispatch3(opassign, $1, $2, $3);
 		    %*/
 		    }
-		| primary_value '[' aref_args ']' tOP_ASGN arg
+		| primary_value '[' opt_call_args ']' tOP_ASGN arg
 		    {
 		    /*%%%*/
 			NODE *args;
 
 			value_expr($6);
-			args = NEW_LIST($6);
-			list_concat(args, $3);
+			args = arg_concat($6, $3);
 			if ($5 == tOROP) {
 			    $5 = 0;
 			}
@@ -2092,27 +2118,16 @@ arg_value	: arg
 		;
 
 aref_args	: none
-		| command opt_nl
-		    {
-		    /*%%%*/
-			rb_warn(&quot;parenthesize argument(s) for future version&quot;);
-			$$ = NEW_LIST($1);
-		    /*%
-			rb_warn0(&quot;parenthesize argument(s) for future version&quot;);
-			$$ = arg_add(arg_new(), $1);
-		    %*/
-		    }
 		| args trailer
 		    {
 			$$ = $1;
 		    }
-		| args ',' tSTAR arg opt_nl
+		| args ',' assocs trailer
 		    {
 		    /*%%%*/
-			value_expr($4);
-			$$ = arg_concat($1, $4);
+			$$ = list_append($1, NEW_HASH($3));
 		    /*%
-			$$ = arg_add_star($1, $4);
+			$$ = arg_add_assocs($1, $3);
 		    %*/
 		    }
 		| assocs trailer
@@ -2123,26 +2138,9 @@ aref_args	: none
 			$$ = arg_add_assocs(arg_new(), $1);
 		    %*/
 		    }
-		| tSTAR arg opt_nl
-		    {
-		    /*%%%*/
-			value_expr($2);
-			$$ = newline_node(NEW_SPLAT($2));
-		    /*%
-			$$ = arg_add_star(arg_new(), $2);
-		    %*/
-		    }
 		;
 
-paren_args	: '(' none ')'
-		    {
-		    /*%%%*/
-			$$ = $2;
-		    /*%
-			$$ = dispatch1(arg_paren, arg_new());
-		    %*/
-		    }
-		| '(' call_args rparen
+paren_args	: '(' opt_call_args rparen
 		    {
 		    /*%%%*/
 			$$ = $2;
@@ -2150,39 +2148,22 @@ paren_args	: '(' none ')'
 			$$ = dispatch1(arg_paren, $2);
 		    %*/
 		    }
-		| '(' block_call rparen
-		    {
-		    /*%%%*/
-			rb_warn(&quot;parenthesize argument for future version&quot;);
-			$$ = NEW_LIST($2);
-		    /*%
-			rb_warn0(&quot;parenthesize argument for future version&quot;);
-			$$ = dispatch1(arg_paren, arg_add(arg_new(), $2));
-		    %*/
-		    }
-		| '(' args ',' block_call rparen
-		    {
-		    /*%%%*/
-			rb_warn(&quot;parenthesize argument for future version&quot;);
-			$$ = list_append($2, $4);
-		    /*%
-			rb_warn0(&quot;parenthesize argument for future version&quot;);
-			$$ = dispatch1(arg_paren, arg_add($2, $4));
-		    %*/
-		    }
 		;
 
 opt_paren_args	: none
 		| paren_args
 		;
 
+opt_call_args   : none
+		| call_args
+		;
+
 call_args	: command
 		    {
+		        rb_warn(&quot;parenthesize argument(s) for future version&quot;);
 		    /*%%%*/
-			rb_warn(&quot;parenthesize argument(s) for future version&quot;);
 			$$ = NEW_LIST($1);
 		    /*%
-			rb_warn0(&quot;parenthesize argument(s) for future version&quot;);
 			$$ = arg_add(arg_new(), $1);
 		    %*/
 		    }
@@ -2194,15 +2175,6 @@ call_args	: command
 			$$ = arg_add_optblock($1, $2);
 		    %*/
 		    }
-		| args ',' tSTAR arg_value opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_concat($1, $4);
-			$$ = arg_blk_pass($$, $5);
-		    /*%
-			arg_add_optblock(arg_add_star($1, $4), $5);
-		    %*/
-		    }
 		| assocs opt_block_arg
 		    {
 		    /*%%%*/
@@ -2213,44 +2185,15 @@ call_args	: command
 			$$ = arg_add_optblock($$, $2);
 		    %*/
 		    }
-		| assocs ',' tSTAR arg_value opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
-			$$ = arg_blk_pass($$, $5);
-		    /*%
-			$$ = arg_add_star(arg_add_assocs(arg_new(), $1), $4);
-			$$ = arg_add_optblock($$, $5);
-		    %*/
-		    }
 		| args ',' assocs opt_block_arg
 		    {
 		    /*%%%*/
-			$$ = list_append($1, NEW_HASH($3));
+			$$ = arg_append($1, NEW_HASH($3));
 			$$ = arg_blk_pass($$, $4);
 		    /*%
 			$$ = arg_add_optblock(arg_add_assocs($1, $3), $4);
 		    %*/
 		    }
-		| args ',' assocs ',' tSTAR arg opt_block_arg
-		    {
-		    /*%%%*/
-			value_expr($6);
-			$$ = arg_concat(list_append($1, NEW_HASH($3)), $6);
-			$$ = arg_blk_pass($$, $7);
-		    /*%
-			$$ = arg_add_star(arg_add_assocs($1, $3), $6);
-			$$ = arg_add_optblock($$, $7);
-		    %*/
-		    }
-		| tSTAR arg_value opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_blk_pass(NEW_SPLAT($2), $3);
-		    /*%
-			$$ = arg_add_optblock(arg_add_star(arg_new(), $2), $3);
-		    %*/
-		    }
 		| block_arg
 		    /*%c%*/
 		    /*%c
@@ -2276,26 +2219,6 @@ call_args2	: arg_value ',' args opt_block_arg
 			$$ = arg_add_block(arg_add(arg_new(), $1), $3);
 		    %*/
 		    }
-		| arg_value ',' tSTAR arg_value opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_concat(NEW_LIST($1), $4);
-			$$ = arg_blk_pass($$, $5);
-		    /*%
-			$$ = arg_add_star(arg_add(arg_new(), $1), $4);
-			$$ = arg_add_optblock($$, $5);
-		    %*/
-		    }
-		| arg_value ',' args ',' tSTAR arg_value opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_concat(list_concat(NEW_LIST($1),$3), $6);
-			$$ = arg_blk_pass($$, $7);
-		    /*%
-			$$ = arg_add_star(arg_prepend($3, $1), $6);
-			$$ = arg_add_optblock($$, $7);
-		    %*/
-		    }
 		| assocs opt_block_arg
 		    {
 		    /*%%%*/
@@ -2305,20 +2228,10 @@ call_args2	: arg_value ',' args opt_block_arg
 			$$ = arg_add_optblock(arg_add_assocs(arg_new(), $1), $2);
 		    %*/
 		    }
-		| assocs ',' tSTAR arg_value opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
-			$$ = arg_blk_pass($$, $5);
-		    /*%
-			$$ = arg_add_star(arg_add_assocs(arg_new(), $1), $4);
-			$$ = arg_add_optblock($$, $4);
-		    %*/
-		    }
 		| arg_value ',' assocs opt_block_arg
 		    {
 		    /*%%%*/
-			$$ = list_append(NEW_LIST($1), NEW_HASH($3));
+			$$ = arg_append(NEW_LIST($1), NEW_HASH($3));
 			$$ = arg_blk_pass($$, $4);
 		    /*%
 			$$ = arg_add_assocs(arg_add(arg_new(), $1), $3);
@@ -2328,43 +2241,13 @@ call_args2	: arg_value ',' args opt_block_arg
 		| arg_value ',' args ',' assocs opt_block_arg
 		    {
 		    /*%%%*/
-			$$ = list_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
+			$$ = arg_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
 			$$ = arg_blk_pass($$, $6);
 		    /*%
 			$$ = arg_add_assocs(arg_prepend($3, $1), $5);
 			$$ = arg_add_optblock($$, $6);
 		    %*/
 		    }
-		| arg_value ',' assocs ',' tSTAR arg_value opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_concat(list_append(NEW_LIST($1), NEW_HASH($3)), $6);
-			$$ = arg_blk_pass($$, $7);
-		    /*%
-			$$ = arg_add_assocs(arg_add(arg_new(), $1), $3);
-			$$ = arg_add_star($$, $6);
-			$$ = arg_add_optblock($$, $7);
-		    %*/
-		    }
-		| arg_value ',' args ',' assocs ',' tSTAR arg_value opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_concat(list_append(list_concat(NEW_LIST($1), $3), NEW_HASH($5)), $8);
-			$$ = arg_blk_pass($$, $9);
-		    /*%
-			$$ = arg_add_assocs(arg_prepend($3, $1), $5);
-			$$ = arg_add_star($$, $8);
-			$$ = arg_add_optblock($$, $9);
-		    %*/
-		    }
-		| tSTAR arg_value opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_blk_pass(NEW_SPLAT($2), $3);
-		    /*%
-			$$ = arg_add_optblock(arg_add_star(arg_new(), $2), $3);
-		    %*/
-		    }
 		| block_arg
 		;
 
@@ -2426,14 +2309,30 @@ args		: arg_value
 			$$ = arg_add(arg_new(), $1);
 		    %*/
 		    }
+		| tSTAR arg_value
+		    {
+		    /*%%%*/
+			$$ = NEW_SPLAT($2);
+		    /*%
+			$$ = arg_add_star(arg_new(), $1);
+		    %*/
+		    }
 		| args ',' arg_value
 		    {
 		    /*%%%*/
-			$$ = list_append($1, $3);
+			$$ = arg_append($1, $3);
 		    /*%
 			$$ = arg_add($1, $3);
 		    %*/
 		    }
+		| args ',' tSTAR arg_value
+		    {
+		    /*%%%*/
+			$$ = arg_concat($1, $4);
+		    /*%
+			$$ = arg_add_star($1, $4);
+		    %*/
+		    }
 		;
 
 mrhs		: args ',' arg_value
@@ -2615,9 +2514,9 @@ primary		: literal
 		| method_call brace_block
 		    {
 		    /*%%%*/
-			block_dup_check($$);
+			block_dup_check($1-&gt;nd_args, $2);
 			$2-&gt;nd_iter = $1;
-			$$ = $2;
+                        $$ = $2;
 			fixpos($$, $1);
 		    /*%
 			$$ = dispatch2(iter_block, $1, $2);
@@ -3012,13 +2911,7 @@ block_param0	: mlhs_item
 block_param	: block_param0
 		    {
 		    /*%%%*/
-			if ($1-&gt;nd_alen == 1) {
-			    $$ = $1-&gt;nd_head;
-			    rb_gc_force_recycle((VALUE)$1);
-			}
-			else {
-			    $$ = NEW_MASGN($1, 0);
-			}
+			$$ = NEW_MASGN($1, 0);
 		    /*%
 			$$ = blockvar_new($1);
 		    %*/
@@ -3039,10 +2932,10 @@ block_param	: block_param0
 			$$ = blockvar_add_block(blockvar_new($1), $4);
 		    %*/
 		    }
-		| block_param0 ',' tSTAR lhs ',' tAMPER lhs
+		| block_param0 ',' tSTAR lhs ',' mlhs_post ',' tAMPER lhs
 		    {
 		    /*%%%*/
-			$$ = NEW_BLOCK_PARAM($7, NEW_MASGN($1, $4));
+			$$ = NEW_BLOCK_PARAM($9, NEW_MASGN($1, NEW_POSTARG($4,$6)));
 		    /*%
 			$$ = blockvar_add_star(blockvar_new($1), $4);
 			$$ = blockvar_add_block($$, $7);
@@ -3057,6 +2950,15 @@ block_param	: block_param0
 			$$ = blockvar_add_block($$, $6);
 		    %*/
 		    }
+		| block_param0 ',' tSTAR  ',' mlhs_post ',' tAMPER lhs
+		    {
+		    /*%%%*/
+			$$ = NEW_BLOCK_PARAM($8, NEW_MASGN($1, NEW_POSTARG(-1,$5)));
+		    /*%
+			$$ = blockvar_add_star(blockvar_new($1), Qnil);
+			$$ = blockvar_add_block($$, $6);
+		    %*/
+		    }
 		| block_param0 ',' tSTAR lhs
 		    {
 		    /*%%%*/
@@ -3065,6 +2967,14 @@ block_param	: block_param0
 			$$ = blockvar_add_star(blockvar_new($1), $4);
 		    %*/
 		    }
+		| block_param0 ',' tSTAR lhs ',' mlhs_post
+		    {
+		    /*%%%*/
+			$$ = NEW_MASGN($1, NEW_POSTARG($4,$6));
+		    /*%
+			$$ = blockvar_add_star(blockvar_new($1), $4);
+		    %*/
+		    }
 		| block_param0 ',' tSTAR
 		    {
 		    /*%%%*/
@@ -3073,6 +2983,14 @@ block_param	: block_param0
 			$$ = blockvar_add_star(blockvar_new($1), Qnil);
 		    %*/
 		    }
+		| block_param0 ',' tSTAR ',' mlhs_post
+		    {
+		    /*%%%*/
+			$$ = NEW_MASGN($1, NEW_MASGN($1, NEW_POSTARG(-1,$5)));
+		    /*%
+			$$ = blockvar_add_star(blockvar_new($1), Qnil);
+		    %*/
+		    }
 		| tSTAR lhs ',' tAMPER lhs
 		    {
 		    /*%%%*/
@@ -3099,6 +3017,14 @@ block_param	: block_param0
 			$$ = blockvar_add_star(blockvar_new(Qnil), $2);
 		    %*/
 		    }
+		| tSTAR lhs ',' mlhs_post
+		    {
+		    /*%%%*/
+			$$ = NEW_MASGN(0, NEW_POSTARG($2,$4));
+		    /*%
+			$$ = blockvar_add_star(blockvar_new(Qnil), $2);
+		    %*/
+		    }
 		| tSTAR
 		    {
 		    /*%%%*/
@@ -3107,6 +3033,14 @@ block_param	: block_param0
 			$$ = blockvar_add_star(blockvar_new(Qnil), Qnil);
 		    %*/
 		    }
+		| tSTAR ',' mlhs_post
+		    {
+		    /*%%%*/
+			$$ = NEW_MASGN(0, NEW_POSTARG(-1,$3));
+		    /*%
+			$$ = blockvar_add_star(blockvar_new(Qnil), Qnil);
+		    %*/
+		    }
 		| tAMPER lhs
 		    {
 		    /*%%%*/
@@ -3204,18 +3138,15 @@ lambda		: {
 			lpar_beg = ++paren_nest;
 		  }
 		  f_larglist
-		    {
-			$&lt;vars&gt;$ = ruby_dyna_vars;
-		    }
 		  lambda_body
 		    {
 		    /*%%%*/
 			$$ = $3;
-			$$-&gt;nd_body = block_append($$-&gt;nd_body, $5);
+			$$-&gt;nd_body = block_append($$-&gt;nd_body, $4);
 			dyna_pop($&lt;vars&gt;1);
 			lpar_beg = $&lt;num&gt;2;
 		    /*%
-			$$ = dispatch2(lambda, $3, $5);
+			$$ = dispatch2(lambda, $3, $4);
 		    %*/
 		    }
 		;
@@ -3279,9 +3210,9 @@ do_block	: kDO_BLOCK
 block_call	: command do_block
 		    {
 		    /*%%%*/
-			block_dup_check($1);
+			block_dup_check($1-&gt;nd_args, $2);
 			$2-&gt;nd_iter = $1;
-			$$ = $2;
+                        $$ = $2;
 			fixpos($$, $1);
 		    /*%
 			$$ = dispatch2(iter_block, $1, $2);
@@ -3290,7 +3221,7 @@ block_call	: command do_block
 		| block_call '.' operation2 opt_paren_args
 		    {
 		    /*%%%*/
-			$$ = new_call($1, $3, $4);
+			$$ = NEW_CALL($1, $3, $4);
 		    /*%
 			$$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
 			$$ = method_optarg($$, $4);
@@ -3299,7 +3230,7 @@ block_call	: command do_block
 		| block_call tCOLON2 operation2 opt_paren_args
 		    {
 		    /*%%%*/
-			$$ = new_call($1, $3, $4);
+			$$ = NEW_CALL($1, $3, $4);
 		    /*%
 			$$ = dispatch3(call, $1, ripper_intern(&quot;::&quot;), $3);
 			$$ = method_optarg($$, $4);
@@ -3310,7 +3241,7 @@ block_call	: command do_block
 method_call	: operation paren_args
 		    {
 		    /*%%%*/
-			$$ = new_fcall($1, $2);
+			$$ = NEW_FCALL($1, $2);
 			fixpos($$, $2);
 		    /*%
 			$$ = method_arg(dispatch1(fcall, $1), $2);
@@ -3319,7 +3250,7 @@ method_call	: operation paren_args
 		| primary_value '.' operation2 opt_paren_args
 		    {
 		    /*%%%*/
-			$$ = new_call($1, $3, $4);
+			$$ = NEW_CALL($1, $3, $4);
 			fixpos($$, $1);
 		    /*%
 			$$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
@@ -3329,7 +3260,7 @@ method_call	: operation paren_args
 		| primary_value tCOLON2 operation2 paren_args
 		    {
 		    /*%%%*/
-			$$ = new_call($1, $3, $4);
+			$$ = NEW_CALL($1, $3, $4);
 			fixpos($$, $1);
 		    /*%
 			$$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
@@ -3339,7 +3270,7 @@ method_call	: operation paren_args
 		| primary_value tCOLON2 operation3
 		    {
 		    /*%%%*/
-			$$ = new_call($1, $3, 0);
+			$$ = NEW_CALL($1, $3, 0);
 		    /*%
 			$$ = dispatch3(call, $1, ripper_intern(&quot;::&quot;), $3);
 		    %*/
@@ -3347,7 +3278,7 @@ method_call	: operation paren_args
 		| kSUPER paren_args
 		    {
 		    /*%%%*/
-			$$ = new_super($2);
+			$$ = NEW_SUPER($2);
 		    /*%
 			$$ = dispatch1(super, $2);
 		    %*/
@@ -3364,7 +3295,7 @@ method_call	: operation paren_args
 		    {
 		    /*%%%*/
 			if (!$2) $2 = NEW_NIL();
-			$$ = new_call($2, rb_intern(&quot;call&quot;), $4);
+			$$ = NEW_CALL($2, rb_intern(&quot;call&quot;), $4);
 			fixpos($$, $2);
 		    /*%
 			$$ = dispatch3(call, dispatch1(paren, $2),
@@ -3372,7 +3303,7 @@ method_call	: operation paren_args
 			$$ = method_optarg($$, $4);
 		    %*/
 		    }
-		| primary_value '[' aref_args ']'
+		| primary_value '[' opt_call_args ']'
 		    {
 		    /*%%%*/
 			if ($1 &amp;&amp; nd_type($1) == NODE_SELF)
@@ -3438,19 +3369,9 @@ brace_block	: '{'
 			$$ = dispatch2(do_block, escape_Qundef($3), $5);
 		    %*/
 		    }
-		| tLAMBDA_ARG
-		  lambda
-		    {
-		    /*%%%*/
-			$$ = $2;
-			nd_set_type($$, NODE_ITER);
-		    /*%
-			$$ = dispatch2(do_block, Qnil, $2);
-		    %*/
-		    }
 		;
 
-case_body	: kWHEN when_args then
+case_body	: kWHEN args then
 		  compstmt
 		  cases
 		    {
@@ -3461,24 +3382,6 @@ case_body	: kWHEN when_args then
 		    %*/
 		    }
 		;
-when_args	: args
-		| args ',' tSTAR arg_value
-		    {
-		    /*%%%*/
-			$$ = list_append($1, NEW_WHEN($4, 0, 0));
-		    /*%
-			$$ = arg_add_star($1, $4);
-		    %*/
-		    }
-		| tSTAR arg_value
-		    {
-		    /*%%%*/
-			$$ = NEW_LIST(NEW_WHEN($2, 0, 0));
-		    /*%
-			$$ = arg_add_star(arg_new(), $2);
-		    %*/
-		    }
-		;
 
 cases		: opt_else
 		| case_body
@@ -3565,7 +3468,8 @@ strings		: string
 		    }
 		;
 
-string		: string1
+string		: tCHAR
+		| string1
 		| string string1
 		    {
 		    /*%%%*/
@@ -3996,7 +3900,15 @@ f_arglist	: '(' f_args rparen
 f_args		: f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
 		    {
 		    /*%%%*/
-			$$ = new_args($1, $3, $5, $6);
+			$$ = new_args($1, $3, $5, 0, $6);
+		    /*%
+			$$ = dispatch4(params, $1, $3, $5, escape_Qundef($6));
+		    %*/
+		    }
+		| f_arg ',' f_optarg ',' f_rest_arg ',' f_post_arg opt_f_block_arg
+		    {
+		    /*%%%*/
+			$$ = new_args($1, $3, $5, $7, $8);
 		    /*%
 			$$ = dispatch4(params, $1, $3, $5, escape_Qundef($6));
 		    %*/
@@ -4004,7 +3916,7 @@ f_args		: f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
 		| f_arg ',' f_optarg opt_f_block_arg
 		    {
 		    /*%%%*/
-			$$ = new_args($1, $3, 0, $4);
+			$$ = new_args($1, $3, 0, 0, $4);
 		    /*%
 			$$ = dispatch4(params, $1, $3, Qnil, escape_Qundef($4));
 		    %*/
@@ -4012,7 +3924,15 @@ f_args		: f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
 		| f_arg ',' f_rest_arg opt_f_block_arg
 		    {
 		    /*%%%*/
-			$$ = new_args($1, 0, $3, $4);
+			$$ = new_args($1, 0, $3, 0, $4);
+		    /*%
+			$$ = dispatch4(params, $1, Qnil, $3, escape_Qundef($4));
+		    %*/
+		    }
+		| f_arg ',' f_rest_arg ',' f_post_arg opt_f_block_arg
+		    {
+		    /*%%%*/
+			$$ = new_args($1, 0, $3, $5, $6);
 		    /*%
 			$$ = dispatch4(params, $1, Qnil, $3, escape_Qundef($4));
 		    %*/
@@ -4020,7 +3940,7 @@ f_args		: f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
 		| f_arg opt_f_block_arg
 		    {
 		    /*%%%*/
-			$$ = new_args($1, 0, 0, $2);
+			$$ = new_args($1, 0, 0, 0, $2);
 		    /*%
 			$$ = dispatch4(params, $1, Qnil, Qnil, escape_Qundef($2));
 		    %*/
@@ -4028,7 +3948,15 @@ f_args		: f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
 		| f_optarg ',' f_rest_arg opt_f_block_arg
 		    {
 		    /*%%%*/
-			$$ = new_args(0, $1, $3, $4);
+			$$ = new_args(0, $1, $3, 0, $4);
+		    /*%
+			$$ = dispatch4(params, Qnil, $1, $3, escape_Qundef($4));
+		    %*/
+		    }
+		| f_optarg ',' f_rest_arg ',' f_post_arg opt_f_block_arg
+		    {
+		    /*%%%*/
+			$$ = new_args(0, $1, $3, $5, $6);
 		    /*%
 			$$ = dispatch4(params, Qnil, $1, $3, escape_Qundef($4));
 		    %*/
@@ -4036,7 +3964,7 @@ f_args		: f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
 		| f_optarg opt_f_block_arg
 		    {
 		    /*%%%*/
-			$$ = new_args(0, $1, 0, $2);
+			$$ = new_args(0, $1, 0, 0, $2);
 		    /*%
 			$$ = dispatch4(params, Qnil, $1, Qnil, escape_Qundef($2));
 		    %*/
@@ -4044,7 +3972,15 @@ f_args		: f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
 		| f_rest_arg opt_f_block_arg
 		    {
 		    /*%%%*/
-			$$ = new_args(0, 0, $1, $2);
+			$$ = new_args(0, 0, $1, 0, $2);
+		    /*%
+			$$ = dispatch4(params, Qnil, Qnil, $1, escape_Qundef($2));
+		    %*/
+		    }
+		| f_rest_arg ',' f_post_arg opt_f_block_arg
+		    {
+		    /*%%%*/
+			$$ = new_args(0, 0, $1, $3, $4);
 		    /*%
 			$$ = dispatch4(params, Qnil, Qnil, $1, escape_Qundef($2));
 		    %*/
@@ -4052,7 +3988,7 @@ f_args		: f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
 		| f_block_arg
 		    {
 		    /*%%%*/
-			$$ = new_args(0, 0, 0, $1);
+			$$ = new_args(0, 0, 0, 0, $1);
 		    /*%
 			$$ = dispatch4(params, Qnil, Qnil, Qnil, $1);
 		    %*/
@@ -4060,7 +3996,7 @@ f_args		: f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
 		| /* none */
 		    {
 		    /*%%%*/
-			$$ = new_args(0, 0, 0, 0);
+			$$ = new_args(0, 0, 0, 0, 0);
 		    /*%
 			$$ = dispatch4(params, Qnil, Qnil, Qnil, Qnil);
 		    %*/
@@ -4142,6 +4078,24 @@ f_arg		: f_norm_arg
 		    }
 		;
 
+f_post_arg	: f_norm_arg
+		    {
+		    /*%%%*/
+			$$ = NEW_LIST(assignable($1, 0));
+		    /*%
+			$$ = mlhs_add(mlhs_new(), $1);
+		    %*/
+		    }
+		| f_post_arg ',' f_norm_arg
+		    {
+		    /*%%%*/
+			$$ = list_append($1, assignable($3, 0));
+		    /*%
+		        $$ = mlhs_add($1, $3);
+		    %*/
+		    }
+		;
+
 f_opt		: tIDENTIFIER '=' arg_value
 		    {
 		    /*%%%*/
@@ -5783,7 +5737,6 @@ parser_yylex(struct parser_params *parser)
 	c = nextc();
 	if (c == '&lt;' &amp;&amp;
 	    lex_state != EXPR_END &amp;&amp;
-	    lex_state != EXPR_END2 &amp;&amp;
 	    lex_state != EXPR_DOT &amp;&amp;
 	    lex_state != EXPR_ENDARG &amp;&amp;
 	    lex_state != EXPR_CLASS &amp;&amp;
@@ -5863,7 +5816,6 @@ parser_yylex(struct parser_params *parser)
 
       case '?':
 	if (lex_state == EXPR_END ||
-	    lex_state == EXPR_END2 ||
 	    lex_state == EXPR_ENDARG) {
 	    lex_state = EXPR_VALUE;
 	    return '?';
@@ -5906,20 +5858,30 @@ parser_yylex(struct parser_params *parser)
 	    lex_state = EXPR_VALUE;
 	    return '?';
 	}
-	else if (ismbchar(uc)) {
-	    rb_warnI(&quot;multibyte character literal not supported yet; use ?\\%.3o&quot;, c);
-	    goto ternary;
+	newtok();
+	if (ismbchar(uc)) {
+	    int i, len = mbclen(uc)-1;
+
+	    tokadd(c);
+	    for (i = 0; i &lt; len; i++) {
+		c = nextc();
+		tokadd(c);
+	    }
 	}
 	else if ((ISALNUM(c) || c == '_') &amp;&amp; lex_p &lt; lex_pend &amp;&amp; is_identchar(*lex_p)) {
 	    goto ternary;
 	}
 	else if (c == '\\') {
 	    c = read_escape();
+	    tokadd(c);
 	}
-	c &amp;= 0xff;
+	else {
+	    tokadd(c);
+	}
+	tokfix();
+	set_yylval_str(rb_str_new(tok(), toklen()));
 	lex_state = EXPR_END;
-	set_yylval_literal(INT2FIX(c));
-	return tINTEGER;
+	return tCHAR;
 
       case '&amp;':
 	if ((c = nextc()) == '&amp;') {
@@ -6029,15 +5991,7 @@ parser_yylex(struct parser_params *parser)
 	if (c == '&gt;') {
 	    enum lex_state_e state = lex_state;
 	    lex_state = EXPR_ARG;
-	    switch (state) {
-	      case EXPR_CMDARG:
-	      case EXPR_ENDARG:
-	      case EXPR_ARG:
-	      case EXPR_END:
-		return tLAMBDA_ARG;
-	      default:
-		return tLAMBDA;
-	    }
+	    return tLAMBDA;
 	}
 	if (IS_BEG() ||
 	    (IS_ARG() &amp;&amp; space_seen &amp;&amp; !ISSPACE(c))) {
@@ -6307,7 +6261,7 @@ parser_yylex(struct parser_params *parser)
 	    lex_state = EXPR_DOT;
 	    return tCOLON2;
 	}
-	if (lex_state == EXPR_END || lex_state == EXPR_END2 ||
+	if (lex_state == EXPR_END || 
 	    lex_state == EXPR_ENDARG || ISSPACE(c)) {
 	    pushback(c);
 	    lex_state = EXPR_BEG;
@@ -6369,10 +6323,6 @@ parser_yylex(struct parser_params *parser)
 	return '^';
 
       case ';':
-	if (lex_state != EXPR_END2 &amp;&amp; peek(';')) {
-	    lex_state = EXPR_END2;
-	    return kEND;
-	}
 	lex_state = EXPR_BEG;
 	command_start = Qtrue;
 	return ';';
@@ -6446,7 +6396,7 @@ parser_yylex(struct parser_params *parser)
 	    --paren_nest;
 	    return tLAMBEG;
 	}
-	if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_END2)
+	if (IS_ARG() || lex_state == EXPR_END)
 	    c = '{';	      /* block (primary) */
 	else if (lex_state == EXPR_ENDARG)
 	    c = tLBRACE_ARG;  /* block (expr) */
@@ -6880,13 +6830,13 @@ rb_node_newnode(enum node_type type, VALUE a0, VALUE a1, VALUE a2)
     return n;
 }
 
-static enum node_type
+enum node_type
 nodetype(NODE *node)			/* for debug */
 {
     return (enum node_type)nd_type(node);
 }
 
-static int
+int
 nodeline(NODE *node)
 {
     return nd_line(node);
@@ -7284,10 +7234,10 @@ aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx)
 }
 
 static void
-block_dup_check(NODE *node)
+block_dup_check(NODE *node1, NODE *node2)
 {
-    if (node &amp;&amp; nd_type(node) == NODE_BLOCK_PASS) {
-	compile_error(PARSER_ARG &quot;both block arg and actual block given&quot;);
+    if (node2 &amp;&amp; node1 &amp;&amp; nd_type(node1) == NODE_BLOCK_PASS) {
+	compile_error(&quot;both block arg and actual block given&quot;);
     }
 }
 
@@ -7326,17 +7276,39 @@ static NODE *
 arg_concat(NODE *node1, NODE *node2)
 {
     if (!node2) return node1;
+    if (nd_type(node1) == NODE_BLOCK_PASS) {
+	node1-&gt;nd_iter = arg_concat(node1-&gt;nd_iter, node2);
+	return node1;
+    }
     return NEW_ARGSCAT(node1, node2);
 }
 
 static NODE *
-arg_add(NODE *node1, NODE *node2)
+arg_append(NODE *node1, NODE *node2)
 {
     if (!node1) return NEW_LIST(node2);
-    if (nd_type(node1) == NODE_ARRAY) {
+    switch (nd_type(node1))  {
+      case NODE_ARRAY:
 	return list_append(node1, node2);
+      case NODE_BLOCK_PASS:
+	node1-&gt;nd_head = arg_append(node1-&gt;nd_head, node2);
+	return node1;
+      default:
+	return NEW_ARGSCAT(node1, node2);
     }
-    else {
+}
+
+static NODE *
+arg_add(NODE *node1, NODE *node2)
+{
+    if (!node1) return NEW_LIST(node2);
+    switch (nd_type(node1))  {
+      case NODE_ARRAY:
+	return list_append(node1, node2);
+      case NODE_BLOCK_PASS:
+	node1-&gt;nd_head = arg_add(node1-&gt;nd_head, node2);
+	return node1;
+      default:
 	return NEW_ARGSPUSH(node1, node2);
     }
 }
@@ -7427,7 +7399,7 @@ value_expr_gen(struct parser_params *parser, NODE *node)
 static void
 void_expr_gen(struct parser_params *parser, NODE *node)
 {
-    char *useless = 0;
+    const char *useless = 0;
 
     if (!RTEST(ruby_verbose)) return;
 
@@ -7814,9 +7786,6 @@ ret_args(NODE *node)
 		nd_set_type(node, NODE_VALUES);
 	    }
 	}
-	else if (nd_type(node) == NODE_SPLAT) {
-	    node = NEW_SVALUE(node);
-	}
     }
     return node;
 }
@@ -7871,26 +7840,6 @@ arg_blk_pass(NODE *node1, NODE *node2)
     return node1;
 }
 
-static NODE*
-arg_prepend(NODE *node1, NODE *node2)
-{
-    switch (nd_type(node2)) {
-      case NODE_ARRAY:
-	return list_concat(NEW_LIST(node1), node2);
-
-      case NODE_SPLAT:
-	return arg_concat(node1, node2-&gt;nd_head);
-
-      case NODE_BLOCK_PASS:
-	node2-&gt;nd_body = arg_prepend(node1, node2-&gt;nd_body);
-	return node2;
-
-      default:
-	rb_bug(&quot;unknown nodetype(%d) for arg_prepend&quot;, nd_type(node2));
-    }
-    return 0;			/* not reached */
-}
-
 static int
 arg_dup_check(ID vid, VALUE m, VALUE list, NODE *node)
 {
@@ -7904,66 +7853,41 @@ arg_dup_check(ID vid, VALUE m, VALUE list, NODE *node)
 }
 
 static NODE*
-new_args_gen(struct parser_params *parser, VALUE m, NODE *o, NODE *r, NODE *b)
+new_args_gen(struct parser_params *parser, VALUE m, NODE *o, NODE *r, NODE *p, NODE *b)
 {
     int saved_line = ruby_sourceline;
-    NODE *tmp;
+    NODE *node;
     VALUE list;
 
     list = rb_ary_new();
-    tmp = o;
-    while (tmp) {
-	if (!tmp-&gt;nd_head) break;
-	if (arg_dup_check(tmp-&gt;nd_head-&gt;nd_vid, m, list, tmp)) {
+    node = o;
+    while (node) {
+	if (!node-&gt;nd_head) break;
+	if (arg_dup_check(node-&gt;nd_head-&gt;nd_vid, m, list, node)) {
 	    yyerror(&quot;duplicated optional argument name&quot;);
 	    return 0;	
 	}
-	tmp = tmp-&gt;nd_next;
+	node = node-&gt;nd_next;
     }
     if (RTEST(r)) {
 	if (arg_dup_check(r-&gt;nd_vid, m, list, r)) {
 	    yyerror(&quot;duplicated rest argument name&quot;);
 	    return 0;
 	}
+	if (p) {
+	    r = NEW_POSTARG(r, p);
+	}
     }
+    node = NEW_ARGS(m, o, r);
     if (b) {
 	if (arg_dup_check(b-&gt;nd_vid, m, list, b)) {
 	    yyerror(&quot;duplicated block argument name&quot;);
 	    return 0;
 	}
+	node = block_append(node, b);
     }
     ruby_sourceline = saved_line;
-    return block_append(NEW_ARGS(m, o, r), b);
-}
-
-static NODE*
-new_call(NODE *r, ID m, NODE *a)
-{
-    if (a &amp;&amp; nd_type(a) == NODE_BLOCK_PASS) {
-	a-&gt;nd_iter = NEW_CALL(r,m,a-&gt;nd_head);
-	return a;
-    }
-    return NEW_CALL(r,m,a);
-}
-
-static NODE*
-new_fcall_gen(struct parser_params *parser, ID m, NODE *a)
-{
-    if (a &amp;&amp; nd_type(a) == NODE_BLOCK_PASS) {
-	a-&gt;nd_iter = NEW_FCALL(m,a-&gt;nd_head);
-	return a;
-    }
-    return NEW_FCALL(m, a);
-}
-
-static NODE*
-new_super(NODE *a)
-{
-    if (a &amp;&amp; nd_type(a) == NODE_BLOCK_PASS) {
-	a-&gt;nd_iter = NEW_SUPER(a-&gt;nd_head);
-	return a;
-    }
-    return NEW_SUPER(a);
+    return node;
 }
 
 static void
@@ -8236,7 +8160,7 @@ rb_parser_while_loop(NODE *node, int chop, int split)
 
 static const struct {
     ID token;
-    char *name;
+    const char *name;
 } op_tbl[] = {
     {tDOT2,	&quot;..&quot;},
     {tDOT3,	&quot;...&quot;},
@@ -8430,7 +8354,7 @@ rb_intern(const char *name)
 		if (*op_tbl[i].name == *name &amp;&amp;
 		    strcmp(op_tbl[i].name, name) == 0) {
 		    id = op_tbl[i].token;
-		    goto id_regist;
+		    goto id_register;
 		}
 	    }
 	}
@@ -8444,7 +8368,7 @@ rb_intern(const char *name)
 	    id = rb_intern(buf);
 	    if (id &gt; tLAST_TOKEN &amp;&amp; !is_attrset_id(id)) {
 		id = rb_id_attrset(id);
-		goto id_regist;
+		goto id_register;
 	    }
 	    id = ID_ATTRSET;
 	}
@@ -8464,17 +8388,17 @@ rb_intern(const char *name)
     if (*m) id = ID_JUNK;
   new_id:
     id |= ++global_symbols.last_id &lt;&lt; ID_SCOPE_SHIFT;
-  id_regist:
+  id_register:
     name = strdup(name);
     st_add_direct(global_symbols.tbl, (st_data_t)name, id);
     st_add_direct(global_symbols.rev, id, (st_data_t)name);
     return id;
 }
 
-char *
+const char *
 rb_id2name(ID id)
 {
-    char *name;
+    const char *name;
     st_data_t data;
 
     if (id &lt; tLAST_TOKEN) {</diff>
      <filename>parse.y</filename>
    </modified>
    <modified>
      <diff>@@ -55,9 +55,9 @@ prec_prec_i(VALUE x)
 
 /*
  *  call-seq:
- *    num.prec_f  =&gt;  Integer
+ *    num.prec_f  =&gt;  Float
  *
- *  Returns an +Float+ converted from _num_. It is equivalent 
+ *  Returns a +Float+ converted from _num_. It is equivalent 
  *  to &lt;code&gt;prec(Float)&lt;/code&gt;.
  */
 </diff>
      <filename>prec.c</filename>
    </modified>
    <modified>
      <diff>@@ -1296,10 +1296,7 @@ proc_syswait(pid)
  * +chfunc+ must not raise any exceptions.
  */
 int
-rb_fork(status, chfunc, charg)
-    int *status;
-    int (*chfunc)(void *);
-    void *charg;
+rb_fork(int *status, int (*chfunc)(void*), void *charg)
 {
     int pid, err, state = 0;
 #ifdef FD_CLOEXEC
@@ -1627,12 +1624,11 @@ rb_f_spawn(int argc, VALUE *argv)
  *  call-seq:
  *     sleep([duration])    =&gt; fixnum
  *
- *  Suspends the current thread for _duration_ seconds (which may be
- *  any number, including a +Float+ with fractional seconds). Returns the actual
- *  number of seconds slept (rounded), which may be less than that asked
- *  for if the thread was interrupted by a +SIGALRM+, or if
- *  another thread calls &lt;code&gt;Thread#run&lt;/code&gt;. Zero arguments
- *  causes +sleep+ to sleep forever.
+ *  Suspends the current thread for _duration_ seconds (which may be any number,
+ *  including a +Float+ with fractional seconds). Returns the actual number of
+ *  seconds slept (rounded), which may be less than that asked for if another
+ *  thread calls &lt;code&gt;Thread#run&lt;/code&gt;. Zero arguments causes +sleep+ to sleep
+ *  forever.
  *
  *     Time.new    #=&gt; Wed Apr 09 08:56:32 CDT 2003
  *     sleep 1.2   #=&gt; 1
@@ -3314,8 +3310,7 @@ p_uid_have_saved_id(void)
 
 #if defined(HAVE_SETRESUID) || defined(HAVE_SETEUID) || defined(_POSIX_SAVED_IDS)
 static VALUE
-p_uid_sw_ensure(id)
-    int id;
+p_uid_sw_ensure(int id)
 {
     under_uid_switch = 0;
     return rb_seteuid_core(id);
@@ -3336,8 +3331,7 @@ p_uid_sw_ensure(id)
  */
 
 static VALUE
-p_uid_switch(obj)
-    VALUE obj;
+p_uid_switch(VALUE obj)
 {
     int uid, euid;
 
@@ -3423,8 +3417,7 @@ p_gid_have_saved_id(void)
 
 #if defined(HAVE_SETRESGID) || defined(HAVE_SETEGID) || defined(_POSIX_SAVED_IDS)
 static VALUE
-p_gid_sw_ensure(id)
-    int id;
+p_gid_sw_ensure(int id)
 {
     under_gid_switch = 0;
     return rb_setegid_core(id);
@@ -3445,8 +3438,7 @@ p_gid_sw_ensure(id)
  */
 
 static VALUE
-p_gid_switch(obj)
-    VALUE obj;
+p_gid_switch(VALUE obj)
 {
     int gid, egid;
 </diff>
      <filename>process.c</filename>
    </modified>
    <modified>
      <diff>@@ -654,8 +654,7 @@ range_include(VALUE range, VALUE val)
  */
 
 static VALUE
-range_cover(range, val)
-    VALUE range, val;
+range_cover(VALUE range, VALUE val)
 {
     VALUE beg, end;
 </diff>
      <filename>range.c</filename>
    </modified>
    <modified>
      <diff>@@ -76,8 +76,9 @@ static const char casetable[] = {
 #endif
 
 int
-rb_memcicmp(char *p1, char *p2, long len)
+rb_memcicmp(const void *x, const void *y, long len)
 {
+    const unsigned char *p1 = x, *p2 = y;
     int tmp;
 
     while (len--) {
@@ -88,7 +89,7 @@ rb_memcicmp(char *p1, char *p2, long len)
 }
 
 int
-rb_memcmp(char *p1, char *p2, long len)
+rb_memcmp(const void *p1, const void *p2, long len)
 {
     if (!ruby_ignorecase) {
 	return memcmp(p1, p2, len);
@@ -97,10 +98,10 @@ rb_memcmp(char *p1, char *p2, long len)
 }
 
 long
-rb_memsearch(char *x0, long m, char *y0, long n)
+rb_memsearch(const void *x0, long m, const void *y0, long n)
 {
-    unsigned char *x = (unsigned char *)x0, *y = (unsigned char *)y0;
-    unsigned char *s, *e;
+    const unsigned char *x = x0, *y = y0;
+    const unsigned char *s, *e;
     long i;
     int d;
     unsigned long hx, hy;
@@ -151,7 +152,9 @@ rb_memsearch(char *x0, long m, char *y0, long n)
     return s-y;
 }
 
+#define REG_LITERAL FL_USER5
 #define REG_CASESTATE  FL_USER0
+
 #define KCODE_NONE  0
 #define KCODE_EUC   FL_USER1
 #define KCODE_SJIS  FL_USER2
@@ -167,10 +170,8 @@ rb_memsearch(char *x0, long m, char *y0, long n)
 #define ARG_KCODE_UTF8       (ARG_KCODE_UNIT * 4)
 #define ARG_KCODE_MASK       (ARG_KCODE_UNIT * 7)
 
-
 static int reg_kcode = DEFAULT_KCODE;
 
-
 static int char_to_option(int c)
 {
   int val;
@@ -505,13 +506,13 @@ rb_reg_to_s(VALUE re)
     int options, opt;
     const int embeddable = ONIG_OPTION_MULTILINE|ONIG_OPTION_IGNORECASE|ONIG_OPTION_EXTEND;
     long len;
-    const char* ptr;
+    const UChar* ptr;
     VALUE str = rb_str_buf_new2(&quot;(?&quot;);
 
     rb_reg_check(re);
 
     options = RREGEXP(re)-&gt;ptr-&gt;options;
-    ptr = RREGEXP(re)-&gt;str;
+    ptr = (UChar*)RREGEXP(re)-&gt;str;
     len = RREGEXP(re)-&gt;len;
   again:
     if (len &gt;= 4 &amp;&amp; ptr[0] == '(' &amp;&amp; ptr[1] == '?') {
@@ -566,7 +567,7 @@ rb_reg_to_s(VALUE re)
 	}
 	if (err) {
 	    options = RREGEXP(re)-&gt;ptr-&gt;options;
-	    ptr = RREGEXP(re)-&gt;str;
+	    ptr = (UChar*)RREGEXP(re)-&gt;str;
 	    len = RREGEXP(re)-&gt;len;
 	}
     }
@@ -583,7 +584,7 @@ rb_reg_to_s(VALUE re)
     }
 
     rb_str_buf_cat2(str, &quot;:&quot;);
-    rb_reg_expr_str(str, ptr, len);
+    rb_reg_expr_str(str, (char*)ptr, len);
     rb_str_buf_cat2(str, &quot;)&quot;);
 
     OBJ_INFECT(str, re);
@@ -1247,12 +1248,12 @@ match_captures(VALUE match)
 }
 
 static int
-name_to_backref_number(struct re_registers *regs, VALUE regexp, char* name, char* name_end)
+name_to_backref_number(struct re_registers *regs, VALUE regexp, const char* name, const char* name_end)
 {
   int num;
 
   num = onig_name_to_backref_number(RREGEXP(regexp)-&gt;ptr,
-            (unsigned char* )name, (unsigned char* )name_end, regs);
+            (const unsigned char* )name, (const unsigned char* )name_end, regs);
   if (num &gt;= 1) {
     return num;
   }
@@ -1301,7 +1302,7 @@ match_aref(int argc, VALUE *argv, VALUE match)
         }
       }
       else {
-        char *p;
+        const char *p;
         int num;
 
         switch (TYPE(idx)) {
@@ -1336,6 +1337,8 @@ match_entry(VALUE match, long n)
 
 /*
  *  call-seq:
+    if (!OBJ_TAINTED(obj) &amp;&amp; rb_safe_level() &gt;= 4)
+	rb_raise(rb_eSecurityError, &quot;Insecure: can't modify regexp&quot;);
  *     mtch.select([index]*)   =&gt; array
  *  
  *  Uses each &lt;i&gt;index&lt;/i&gt; to access the matching values, returning an array of
@@ -1437,6 +1440,11 @@ rb_reg_initialize(VALUE obj, const char *s, long len,
 {
     struct RRegexp *re = RREGEXP(obj);
 
+    if (!OBJ_TAINTED(obj) &amp;&amp; rb_safe_level() &gt;= 4)
+	rb_raise(rb_eSecurityError, &quot;Insecure: can't modify regexp&quot;);
+    rb_check_frozen(obj);
+    if (FL_TEST(obj, REG_LITERAL))
+	rb_raise(rb_eSecurityError, &quot;can't modify literal regexp&quot;);
     if (re-&gt;ptr) onig_free(re-&gt;ptr);
     if (re-&gt;str) free(re-&gt;str);
     re-&gt;ptr = 0;
@@ -1459,6 +1467,7 @@ rb_reg_initialize(VALUE obj, const char *s, long len,
     if (options &amp; ARG_KCODE_MASK) {
 	kcode_reset_option();
     }
+    if (ce) FL_SET(obj, REG_LITERAL);
 }
 
 static VALUE
@@ -1760,7 +1769,6 @@ rb_reg_initialize_m(int argc, VALUE *argv, VALUE self)
     long len;
     int flags = 0;
 
-    rb_check_frozen(self);
     if (argc == 0 || argc &gt; 3) {
 	rb_raise(rb_eArgError, &quot;wrong number of arguments&quot;);
     }</diff>
      <filename>re.c</filename>
    </modified>
    <modified>
      <diff>@@ -276,8 +276,8 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist)
   UChar bs[6];
   va_list args;
 
-  va_init_list(args, (char* )fmt);
-  n = vsnprintf((char* )buf, bufsize, (char* )fmt, args);
+  va_init_list(args, (const char* )fmt);
+  n = vsnprintf((char* )buf, bufsize, (const char* )fmt, args);
   va_end(args);
 
   need = (pat_end - pat) * 4 + 4;</diff>
      <filename>regerror.c</filename>
    </modified>
    <modified>
      <diff>@@ -4487,11 +4487,11 @@ parse_effect(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
   return 0;
 }
 
-static char* PopularQStr[] = {
+static const char* PopularQStr[] = {
   &quot;?&quot;, &quot;*&quot;, &quot;+&quot;, &quot;??&quot;, &quot;*?&quot;, &quot;+?&quot;
 };
 
-static char* ReduceQStr[] = {
+static const char* ReduceQStr[] = {
   &quot;&quot;, &quot;&quot;, &quot;*&quot;, &quot;*?&quot;, &quot;??&quot;, &quot;+ and ??&quot;, &quot;+? and ?&quot;
 };
 </diff>
      <filename>regparse.c</filename>
    </modified>
    <modified>
      <diff>@@ -309,9 +309,10 @@ this switch, unless you are going to debug the Ruby interpreter.
 .Sh ENVIRONMENT
 .Bl -tag -width &quot;RUBYLIB_PREFIX&quot; -compact
 .It Ev RUBYLIB
-A colon-separated list of directories that are appended to Ruby's
+A colon-separated list of directories that are added to Ruby's
 library load path
-.Pf ( Li &quot;$:&quot; ) .
+.Pf ( Li &quot;$:&quot; ) . Directories from this environment variable are searched
+before the standard load path is searched.
 .Pp
 e.g.:
 .Dl RUBYLIB=&quot;$HOME/lib/ruby:$HOME/lib/rubyext&quot;</diff>
      <filename>ruby.1</filename>
    </modified>
    <modified>
      <diff>@@ -73,7 +73,7 @@ usage(const char *name)
     /* This message really ought to be max 23 lines.
      * Removed -h because the user already knows that option. Others? */
 
-    static char *usage_msg[] = {
+    static const char *usage_msg[] = {
 &quot;-0[octal]       specify record separator (\\0, if no argument)&quot;,
 &quot;-a              autosplit mode with -n or -p (splits $_ into $F)&quot;,
 &quot;-c              check syntax only&quot;,
@@ -99,7 +99,7 @@ usage(const char *name)
 &quot;--version       print the version&quot;,
 NULL
 };
-    char **p = usage_msg;
+    const char **p = usage_msg;
 
     printf(&quot;Usage: %s [switches] [--] [programfile] [arguments]\n&quot;, name);
     while (*p)</diff>
      <filename>ruby.c</filename>
    </modified>
    <modified>
      <diff>@@ -547,7 +547,7 @@ 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);
@@ -629,6 +629,7 @@ RUBY_EXTERN VALUE rb_mGC;
 RUBY_EXTERN VALUE rb_mMath;
 RUBY_EXTERN VALUE rb_mProcess;
 
+RUBY_EXTERN VALUE rb_cBasicObject;
 RUBY_EXTERN VALUE rb_cObject;
 RUBY_EXTERN VALUE rb_cArray;
 RUBY_EXTERN VALUE rb_cValues;</diff>
      <filename>ruby.h</filename>
    </modified>
    <modified>
      <diff>@@ -54,13 +54,13 @@ a = [*[]]; test_ok(a == [])
 a = [*[1]]; test_ok(a == [1])
 a = [*[1,2]]; test_ok(a == [1,2])
 
-a = *[]; test_ok(a == nil)
-a = *[1]; test_ok(a == 1)
-a = *[nil]; test_ok(a == nil)
-a = *[[]]; test_ok(a == [])
+a = *[]; test_ok(a == [])
+a = *[1]; test_ok(a == [1])
+a = *[nil]; test_ok(a == [nil])
+a = *[[]]; test_ok(a == [[]])
 a = *[1,2]; test_ok(a == [1,2])
-a = *[*[]]; test_ok(a == nil)
-a = *[*[1]]; test_ok(a == 1)
+a = *[*[]]; test_ok(a == [])
+a = *[*[1]]; test_ok(a == [1])
 a = *[*[1,2]]; test_ok(a == [1,2])
 
 a, = nil; test_ok(a == nil)
@@ -87,14 +87,14 @@ a, = *[*[1,2]]; test_ok(a == 1)
 
 *a = nil; test_ok(a == [nil])
 *a = 1; test_ok(a == [1])
-*a = []; test_ok(a == [[]])
-*a = [1]; test_ok(a == [[1]])
-*a = [nil]; test_ok(a == [[nil]])
-*a = [[]]; test_ok(a == [[[]]])
-*a = [1,2]; test_ok(a == [[1,2]])
-*a = [*[]]; test_ok(a == [[]])
-*a = [*[1]]; test_ok(a == [[1]])
-*a = [*[1,2]]; test_ok(a == [[1,2]])
+*a = []; test_ok(a == [])
+*a = [1]; test_ok(a == [1])
+*a = [nil]; test_ok(a == [nil])
+*a = [[]]; test_ok(a == [[]])
+*a = [1,2]; test_ok(a == [1,2])
+*a = [*[]]; test_ok(a == [])
+*a = [*[1]]; test_ok(a == [1])
+*a = [*[1,2]]; test_ok(a == [1,2])
 
 *a = *[]; test_ok(a == [])
 *a = *[1]; test_ok(a == [1])
@@ -127,18 +127,13 @@ a,b,*c = *[*[1,2]]; test_ok([a,b,c] == [1,2,[]])
 
 def f; yield nil; end; f {|a| test_ok(a == nil)}
 def f; yield 1; end; f {|a| test_ok(a == 1)}
-def f; yield []; end; f {|a| test_ok(a == [])}
-def f; yield [1]; end; f {|a| test_ok(a == [1])}
-def f; yield [nil]; end; f {|a| test_ok(a == [nil])}
-def f; yield [[]]; end; f {|a| test_ok(a == [[]])}
-def f; yield [*[]]; end; f {|a| test_ok(a == [])}
-def f; yield [*[1]]; end; f {|a| test_ok(a == [1])}
-def f; yield [*[1,2]]; end; f {|a| test_ok(a == [1,2])}
-
+def f; yield *[]; end; f {|a| test_ok(a == nil)}
 def f; yield *[1]; end; f {|a| test_ok(a == 1)}
 def f; yield *[nil]; end; f {|a| test_ok(a == nil)}
 def f; yield *[[]]; end; f {|a| test_ok(a == [])}
+def f; yield *[*[]]; end; f {|a| test_ok(a == nil)}
 def f; yield *[*[1]]; end; f {|a| test_ok(a == 1)}
+def f; yield *[*[1,2]]; end; f {|a| test_ok(a == 1)}
 
 def f; yield; end; f {|a,| test_ok(a == nil)}
 def f; yield nil; end; f {|a,| test_ok(a == nil)}
@@ -162,14 +157,14 @@ def f; yield *[*[1,2]]; end; f {|a,| test_ok(a == 1)}
 def f; yield; end; f {|*a| test_ok(a == [])}
 def f; yield nil; end; f {|*a| test_ok(a == [nil])}
 def f; yield 1; end; f {|*a| test_ok(a == [1])}
-def f; yield []; end; f {|*a| test_ok(a == [[]])}
-def f; yield [1]; end; f {|*a| test_ok(a == [[1]])}
-def f; yield [nil]; end; f {|*a| test_ok(a == [[nil]])}
-def f; yield [[]]; end; f {|*a| test_ok(a == [[[]]])}
-def f; yield [1,2]; end; f {|*a| test_ok(a == [[1,2]])}
-def f; yield [*[]]; end; f {|*a| test_ok(a == [[]])}
-def f; yield [*[1]]; end; f {|*a| test_ok(a == [[1]])}
-def f; yield [*[1,2]]; end; f {|*a| test_ok(a == [[1,2]])}
+def f; yield []; end; f {|*a| test_ok(a == [])}
+def f; yield [1]; end; f {|*a| test_ok(a == [1])}
+def f; yield [nil]; end; f {|*a| test_ok(a == [nil])}
+def f; yield [[]]; end; f {|*a| test_ok(a == [[]])}
+def f; yield [1,2]; end; f {|*a| test_ok(a == [1,2])}
+def f; yield [*[]]; end; f {|*a| test_ok(a == [])}
+def f; yield [*[1]]; end; f {|*a| test_ok(a == [1])}
+def f; yield [*[1,2]]; end; f {|*a| test_ok(a == [1,2])}
 
 def f; yield *[]; end; f {|*a| test_ok(a == [])}
 def f; yield *[1]; end; f {|*a| test_ok(a == [1])}
@@ -209,39 +204,39 @@ def r; return [*[]]; end; a = r(); test_ok(a == [])
 def r; return [*[1]]; end; a = r(); test_ok(a == [1])
 def r; return [*[1,2]]; end; a = r(); test_ok(a == [1,2])
 
-def r; return *[]; end; a = r(); test_ok(a == nil)
-def r; return *[1]; end; a = r(); test_ok(a == 1)
-def r; return *[nil]; end; a = r(); test_ok(a == nil)
-def r; return *[[]]; end; a = r(); test_ok(a == [])
-def r; return *[*[]]; end; a = r(); test_ok(a == nil)
-def r; return *[*[1]]; end; a = r(); test_ok(a == 1)
+def r; return *[]; end; a = r(); test_ok(a == [])
+def r; return *[1]; end; a = r(); test_ok(a == [1])
+def r; return *[nil]; end; a = r(); test_ok(a == [nil])
+def r; return *[[]]; end; a = r(); test_ok(a == [[]])
+def r; return *[*[]]; end; a = r(); test_ok(a == [])
+def r; return *[*[1]]; end; a = r(); test_ok(a == [1])
 def r; return *[*[1,2]]; end; a = r(); test_ok(a == [1,2])
 
-def r; return *[[]]; end; a = *r(); test_ok(a == nil)
+def r; return *[[]]; end; a = *r(); test_ok(a == [[]])
 def r; return *[*[1,2]]; end; a = *r(); test_ok(a == [1,2])
 
 def r; return; end; *a = r(); test_ok(a == [nil])
 def r; return nil; end; *a = r(); test_ok(a == [nil])
 def r; return 1; end; *a = r(); test_ok(a == [1])
-def r; return []; end; *a = r(); test_ok(a == [[]])
-def r; return [1]; end; *a = r(); test_ok(a == [[1]])
-def r; return [nil]; end; *a = r(); test_ok(a == [[nil]])
-def r; return [[]]; end; *a = r(); test_ok(a == [[[]]])
-def r; return [1,2]; end; *a = r(); test_ok(a == [[1,2]])
-def r; return [*[]]; end; *a = r(); test_ok(a == [[]])
-def r; return [*[1]]; end; *a = r(); test_ok(a == [[1]])
-def r; return [*[1,2]]; end; *a = r(); test_ok(a == [[1,2]])
-
-def r; return *[]; end; *a = r(); test_ok(a == [nil])
+def r; return []; end; *a = r(); test_ok(a == [])
+def r; return [1]; end; *a = r(); test_ok(a == [1])
+def r; return [nil]; end; *a = r(); test_ok(a == [nil])
+def r; return [[]]; end; *a = r(); test_ok(a == [[]])
+def r; return [1,2]; end; *a = r(); test_ok(a == [1,2])
+def r; return [*[]]; end; *a = r(); test_ok(a == [])
+def r; return [*[1]]; end; *a = r(); test_ok(a == [1])
+def r; return [*[1,2]]; end; *a = r(); test_ok(a == [1,2])
+
+def r; return *[]; end; *a = r(); test_ok(a == [])
 def r; return *[1]; end; *a = r(); test_ok(a == [1])
 def r; return *[nil]; end; *a = r(); test_ok(a == [nil])
 def r; return *[[]]; end; *a = r(); test_ok(a == [[]])
-def r; return *[1,2]; end; *a = r(); test_ok(a == [[1,2]])
-def r; return *[*[]]; end; *a = r(); test_ok(a == [nil])
+def r; return *[1,2]; end; *a = r(); test_ok(a == [1,2])
+def r; return *[*[]]; end; *a = r(); test_ok(a == [])
 def r; return *[*[1]]; end; *a = r(); test_ok(a == [1])
-def r; return *[*[1,2]]; end; *a = r(); test_ok(a == [[1,2]])
+def r; return *[*[1,2]]; end; *a = r(); test_ok(a == [1,2])
 
-def r; return *[[]]; end; *a = *r(); test_ok(a == [])
+def r; return *[[]]; end; *a = *r(); test_ok(a == [[]])
 def r; return *[1,2]; end; *a = *r(); test_ok(a == [1,2])
 def r; return *[*[1,2]]; end; *a = *r(); test_ok(a == [1,2])
 
@@ -260,7 +255,7 @@ def r; return [*[1,2]]; end; a,b,*c = r(); test_ok([a,b,c] == [1,2,[]])
 def r; return *[]; end; a,b,*c = r(); test_ok([a,b,c] == [nil,nil,[]])
 def r; return *[1]; end; a,b,*c = r(); test_ok([a,b,c] == [1,nil,[]])
 def r; return *[nil]; end; a,b,*c = r(); test_ok([a,b,c] == [nil,nil,[]])
-def r; return *[[]]; end; a,b,*c = r(); test_ok([a,b,c] == [nil,nil,[]])
+def r; return *[[]]; end; a,b,*c = r(); test_ok([a,b,c] == [[],nil,[]])
 def r; return *[1,2]; end; a,b,*c = r(); test_ok([a,b,c] == [1,2,[]])
 def r; return *[*[]]; end; a,b,*c = r(); test_ok([a,b,c] == [nil,nil,[]])
 def r; return *[*[1]]; end; a,b,*c = r(); test_ok([a,b,c] == [1,nil,[]])
@@ -316,36 +311,36 @@ a = loop do break [*[]]; end; test_ok(a == [])
 a = loop do break [*[1]]; end; test_ok(a == [1])
 a = loop do break [*[1,2]]; end; test_ok(a == [1,2])
 
-a = loop do break *[]; end; test_ok(a == nil)
-a = loop do break *[1]; end; test_ok(a == 1)
-a = loop do break *[nil]; end; test_ok(a == nil)
-a = loop do break *[[]]; end; test_ok(a == [])
-a = loop do break *[*[]]; end; test_ok(a == nil)
-a = loop do break *[*[1]]; end; test_ok(a == 1)
+a = loop do break *[]; end; test_ok(a == [])
+a = loop do break *[1]; end; test_ok(a == [1])
+a = loop do break *[nil]; end; test_ok(a == [nil])
+a = loop do break *[[]]; end; test_ok(a == [[]])
+a = loop do break *[*[]]; end; test_ok(a == [])
+a = loop do break *[*[1]]; end; test_ok(a == [1])
 a = loop do break *[*[1,2]]; end; test_ok(a == [1,2])
 
 *a = loop do break; end; test_ok(a == [nil])
 *a = loop do break nil; end; test_ok(a == [nil])
 *a = loop do break 1; end; test_ok(a == [1])
-*a = loop do break []; end; test_ok(a == [[]])
-*a = loop do break [1]; end; test_ok(a == [[1]])
-*a = loop do break [nil]; end; test_ok(a == [[nil]])
-*a = loop do break [[]]; end; test_ok(a == [[[]]])
-*a = loop do break [1,2]; end; test_ok(a == [[1,2]])
-*a = loop do break [*[]]; end; test_ok(a == [[]])
-*a = loop do break [*[1]]; end; test_ok(a == [[1]])
-*a = loop do break [*[1,2]]; end; test_ok(a == [[1,2]])
-
-*a = loop do break *[]; end; test_ok(a == [nil])
+*a = loop do break []; end; test_ok(a == [])
+*a = loop do break [1]; end; test_ok(a == [1])
+*a = loop do break [nil]; end; test_ok(a == [nil])
+*a = loop do break [[]]; end; test_ok(a == [[]])
+*a = loop do break [1,2]; end; test_ok(a == [1,2])
+*a = loop do break [*[]]; end; test_ok(a == [])
+*a = loop do break [*[1]]; end; test_ok(a == [1])
+*a = loop do break [*[1,2]]; end; test_ok(a == [1,2])
+
+*a = loop do break *[]; end; test_ok(a == [])
 *a = loop do break *[1]; end; test_ok(a == [1])
 *a = loop do break *[nil]; end; test_ok(a == [nil])
 *a = loop do break *[[]]; end; test_ok(a == [[]])
-*a = loop do break *[1,2]; end; test_ok(a == [[1,2]])
-*a = loop do break *[*[]]; end; test_ok(a == [nil])
+*a = loop do break *[1,2]; end; test_ok(a == [1,2])
+*a = loop do break *[*[]]; end; test_ok(a == [])
 *a = loop do break *[*[1]]; end; test_ok(a == [1])
-*a = loop do break *[*[1,2]]; end; test_ok(a == [[1,2]])
+*a = loop do break *[*[1,2]]; end; test_ok(a == [1,2])
 
-*a = *loop do break *[[]]; end; test_ok(a == [])
+*a = *loop do break *[[]]; end; test_ok(a == [[]])
 *a = *loop do break *[1,2]; end; test_ok(a == [1,2])
 *a = *loop do break *[*[1,2]]; end; test_ok(a == [1,2])
 
@@ -364,7 +359,7 @@ a,b,*c = loop do break [*[1,2]]; end; test_ok([a,b,c] == [1,2,[]])
 a,b,*c = loop do break *[]; end; test_ok([a,b,c] == [nil,nil,[]])
 a,b,*c = loop do break *[1]; end; test_ok([a,b,c] == [1,nil,[]])
 a,b,*c = loop do break *[nil]; end; test_ok([a,b,c] == [nil,nil,[]])
-a,b,*c = loop do break *[[]]; end; test_ok([a,b,c] == [nil,nil,[]])
+a,b,*c = loop do break *[[]]; end; test_ok([a,b,c] == [[],nil,[]])
 a,b,*c = loop do break *[1,2]; end; test_ok([a,b,c] == [1,2,[]])
 a,b,*c = loop do break *[*[]]; end; test_ok([a,b,c] == [nil,nil,[]])
 a,b,*c = loop do break *[*[1]]; end; test_ok([a,b,c] == [1,nil,[]])
@@ -382,29 +377,29 @@ r([]){next [*[]]}
 r([1]){next [*[1]]}
 r([1,2]){next [*[1,2]]}
 
-r(nil){next *[]}
-r(1){next *[1]}
-r(nil){next *[nil]}
-r([]){next *[[]]}
-r(nil){next *[*[]]}
-r(1){next *[*[1]]}
+r([]){next *[]}
+r([1]){next *[1]}
+r([nil]){next *[nil]}
+r([[]]){next *[[]]}
+r([]){next *[*[]]}
+r([1]){next *[*[1]]}
 r([1,2]){next *[*[1,2]]}
 
 def r(val); *a = yield(); test_ok(a == val, 2); end
 r([nil]){next}
 r([nil]){next nil}
 r([1]){next 1}
-r([[]]){next []}
-r([[1]]){next [1]}
-r([[nil]]){next [nil]}
-r([[[]]]){next [[]]}
-r([[1,2]]){next [1,2]}
-r([[]]){next [*[]]}
-r([[1]]){next [*[1]]}
-r([[1,2]]){next [*[1,2]]}
+r([]){next []}
+r([1]){next [1]}
+r([nil]){next [nil]}
+r([[]]){next [[]]}
+r([1,2]){next [1,2]}
+r([]){next [*[]]}
+r([1]){next [*[1]]}
+r([1,2]){next [*[1,2]]}
 
 def r(val); *a = *yield(); test_ok(a == val, 2); end
-r([]){next *[[]]}
+r([[]]){next *[[]]}
 r([1,2]){next *[1,2]}
 r([1,2]){next *[*[1,2]]}
 
@@ -422,7 +417,7 @@ r([1,nil,[]]){next [*[1]]}
 r([1,2,[]]){next [*[1,2]]}
 
 def r(val); a,b,*c = *yield(); test_ok([a,b,c] == val, 2); end
-r([nil,nil,[]]){next *[[]]}
+r([[],nil,[]]){next *[[]]}
 r([1,2,[]]){next *[1,2]}
 r([1,2,[]]){next *[*[1,2]]}
 
@@ -963,22 +958,22 @@ IterTest.new([2]).each2 {|x| test_ok(x == [2])}
 #IterTest.new([3]).each3 {|x| test_ok(x == 3)}
 IterTest.new([4]).each4 {|x| test_ok(x == 4)}
 IterTest.new([5]).each5 {|x| test_ok(x == 5)}
-IterTest.new([6]).each6 {|x| test_ok(x == [6])}
+IterTest.new([6]).each6 {|x| test_ok(x == 6)}
 #IterTest.new([7]).each7 {|x| test_ok(x == 7)}
 IterTest.new([8]).each8 {|x| test_ok(x == 8)}
 
-IterTest.new([[0]]).each0 {|x| test_ok(x == [0])}
-IterTest.new([[1]]).each1 {|x| test_ok(x == [1])}
-IterTest.new([[2]]).each2 {|x| test_ok(x == [[2]])}
+IterTest.new([[0]]).each0 {|x| test_ok(x == 0)}
+IterTest.new([[1]]).each1 {|x| test_ok(x == 1)}
+IterTest.new([[2]]).each2 {|x| test_ok(x == [2])}
 IterTest.new([[3]]).each3 {|x| test_ok(x == 3)}
-IterTest.new([[4]]).each4 {|x| test_ok(x == [4])}
-IterTest.new([[5]]).each5 {|x| test_ok(x == [5])}
-IterTest.new([[6]]).each6 {|x| test_ok(x == [[6]])}
+IterTest.new([[4]]).each4 {|x| test_ok(x == 4)}
+IterTest.new([[5]]).each5 {|x| test_ok(x == 5)}
+IterTest.new([[6]]).each6 {|x| test_ok(x == 6)}
 IterTest.new([[7]]).each7 {|x| test_ok(x == 7)}
-IterTest.new([[8]]).each8 {|x| test_ok(x == [8])}
+IterTest.new([[8]]).each8 {|x| test_ok(x == 8)}
 
-IterTest.new([[0,0]]).each0 {|x| test_ok(x == [0,0])}
-IterTest.new([[8,8]]).each8 {|x| test_ok(x == [8,8])}
+IterTest.new([[0,0]]).each0 {|*x| test_ok(x == [0,0])}
+IterTest.new([[8,8]]).each8 {|*x| test_ok(x == [8])}
 
 def m0(v)
   v
@@ -1018,7 +1013,7 @@ end
 block_test(NilClass)
 block_test(Proc){}
 
-def argument_test(state, proc, *args)
+def call_argument_test(state, proc, *args)
   x = state
   begin
     proc.call(*args)
@@ -1028,27 +1023,43 @@ def argument_test(state, proc, *args)
   test_ok(x,2)
 end
 
-argument_test(true, lambda{||})
-argument_test(false, lambda{||}, 1)
-argument_test(true, lambda{|a,|}, 1)
-argument_test(false, lambda{|a,|})
-argument_test(false, lambda{|a,|}, 1,2)
+def yield_argument_test(state, proc, *args)
+  x = state
+  begin
+    proc.yield(*args)
+  rescue ArgumentError
+    x = !x
+  end
+  test_ok(x,2)
+end
+
+call_argument_test(true, lambda{||})
+call_argument_test(false, lambda{||}, 1)
+call_argument_test(true, lambda{|a,|}, 1)
+call_argument_test(false, lambda{|a,|})
+call_argument_test(false, lambda{|a,|}, 1,2)
+
+yield_argument_test(true, lambda{||})
+yield_argument_test(true, lambda{||}, 1)
+yield_argument_test(true, lambda{|a,|}, 1)
+yield_argument_test(true, lambda{|a,|})
+yield_argument_test(true, lambda{|a,|}, 1,2)
 
 def get_block(&amp;block)
   block
 end
 
 test_ok(Proc == get_block{}.class)
-argument_test(true, get_block{||})
-argument_test(true, get_block{||}, 1)
-argument_test(true, get_block{|a,|}, 1)
-argument_test(true, get_block{|a,|})
-argument_test(true, get_block{|a,|}, 1,2)
+yield_argument_test(true, get_block{||})
+yield_argument_test(true, get_block{||}, 1)
+yield_argument_test(true, get_block{|a,|}, 1)
+yield_argument_test(true, get_block{|a,|})
+yield_argument_test(true, get_block{|a,|}, 1,2)
 
-argument_test(true, get_block(&amp;lambda{||}))
-argument_test(false, get_block(&amp;lambda{||}),1)
-argument_test(true, get_block(&amp;lambda{|a,|}),1)
-argument_test(false, get_block(&amp;lambda{|a,|}),1,2)
+call_argument_test(true, get_block(&amp;lambda{||}))
+call_argument_test(false, get_block(&amp;lambda{||}),1)
+call_argument_test(true, get_block(&amp;lambda{|a,|}),1)
+call_argument_test(false, get_block(&amp;lambda{|a,|}),1,2)
 
 blk = get_block{11}
 test_ok(blk.class == Proc)
@@ -1062,8 +1073,8 @@ test_ok(lmd.to_proc.class == Proc)
 test_ok(lmd.clone.call == 44)
 test_ok(get_block(&amp;lmd).class == Proc)
 
-test_ok(Proc.new{|a,| a}.call(1,2,3) == 1)
-argument_test(true, Proc.new{|a,|}, 1,2)
+test_ok(Proc.new{|a,| a}.yield(1,2,3) == 1)
+yield_argument_test(true, Proc.new{|a,|}, 1,2)
 
 test_ok(Proc.new{|&amp;b| b.call(10)}.call {|x| x} == 10)
 test_ok(Proc.new{|a,&amp;b| b.call(a)}.call(12) {|x| x} == 12)
@@ -1071,7 +1082,7 @@ test_ok(Proc.new{|a,&amp;b| b.call(a)}.call(12) {|x| x} == 12)
 def test_return1
   Proc.new {
     return 55
-  }.call + 5
+  }.yield + 5
 end
 test_ok(test_return1() == 55)
 def test_return2
@@ -1090,7 +1101,7 @@ end
 def proc_return1
   proc_call{return 42}+1
 end
-test_ok(proc_return1() == 42)
+test_ok(proc_return1() == 43)
 def proc_return2
   proc_yield{return 42}+1
 end
@@ -1106,7 +1117,7 @@ def ljump_test(state, proc, *args)
   test_ok(x,2)
 end
 
-ljump_test(false, get_block{break})
+ljump_test(true, get_block{break})
 ljump_test(true, lambda{break})
 
 def exit_value_test(&amp;block)
@@ -1149,11 +1160,11 @@ def test_b2
     block_get{break 21}.call
   end
 end
-test_ok(test_b2() == 22)
+test_ok(test_b2() == 21)
 
 def test_b3
   ljump_rescue(33) do
-    Proc.new{break 31}.call
+    Proc.new{break 31}.yield
   end
 end
 test_ok(test_b3() == 33)
@@ -1169,7 +1180,7 @@ def test_b5
     block_call(&amp;b)
   end
 end
-test_ok(test_b5() == 55)
+test_ok(test_b5() == 54)
 
 def test_b6
   b = lambda{break 67}
@@ -1188,7 +1199,7 @@ def test_b7
     block_call(&amp;b)
   end
 end
-test_ok(test_b7() == 77)
+test_ok(test_b7() == 78)
 
 def util_b8(&amp;block)
   block_call(&amp;block)
@@ -1220,7 +1231,7 @@ test_ok(test_b10() == 100)
 def test_b11
   ljump_rescue(111) do
     loop do
-      Proc.new{break 110}.call
+      Proc.new{break 110}.yield
       break 112
     end
   end
@@ -1238,7 +1249,7 @@ test_ok(test_b12() == 122)
 def test_b13
   ljump_rescue(133) do
     while true
-      Proc.new{break 130}.call
+      Proc.new{break 130}.yield
       break 131
     end
   end
@@ -1260,7 +1271,7 @@ end
 test_ok(test_b15{|e| break 155 } == 155)
 
 def marity_test(m)
-  method = self.method(m)
+  method = method(m)
   test_ok(method.arity == method.to_proc.arity, 2)
 end
 marity_test(:test_ok)
@@ -1421,7 +1432,6 @@ $good = true;
 for i in 4000..4096
   n1 = 1 &lt;&lt; i;
   if (n1**2-1) / (n1+1) != (n1-1)
-    p i
     $good = false
   end
 end
@@ -1525,9 +1535,9 @@ test_ok($x.sub(/.*\.([^\.]+)$/, '&lt;\&amp;&gt;') == &quot;&lt;a.gif&gt;&quot;)
 # character constants(assumes ASCII)
 test_ok(&quot;a&quot;[0] == ?a)
 test_ok(?a == ?a)
-test_ok(?\C-a == 1)
-test_ok(?\M-a == 225)
-test_ok(?\M-\C-a == 129)
+test_ok(?\C-a == &quot;\1&quot;)
+test_ok(?\M-a == &quot;\341&quot;)
+test_ok(?\M-\C-a == &quot;\201&quot;)
 test_ok(&quot;a&quot;.upcase![0] == ?A)
 test_ok(&quot;A&quot;.downcase![0] == ?a)
 test_ok(&quot;abc&quot;.tr!(&quot;a-z&quot;, &quot;A-Z&quot;) == &quot;ABC&quot;)
@@ -1539,7 +1549,7 @@ $x = &quot;abcdef&quot;
 $y = [ ?a, ?b, ?c, ?d, ?e, ?f ]
 $bad = false
 $x.each_byte {|i|
-  if i != $y.shift
+  if i.chr != $y.shift
     $bad = true
     break
   end
@@ -1927,7 +1937,7 @@ module M003; include M002; end
 module M002; include M001; end
 module M003; include M002; end
 
-test_ok(M003.ancestors == [M003, M002, M001])
+test_ok(M003.ancestors == [M003, M002, M001, M002])
 
 test_check &quot;marshal&quot;
 $x = [1,2,3,[4,5,&quot;foo&quot;],{1=&gt;&quot;bar&quot;},2.5,fact(30)]</diff>
      <filename>sample/test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -226,7 +226,7 @@ rb_f_kill(int argc, VALUE *argv)
     int negative = 0;
     int sig;
     int i;
-    char *s;
+    const char *s;
 
     rb_secure(2);
     if (argc &lt; 2)
@@ -564,7 +564,7 @@ trap(struct trap_arg *arg)
     sighandler_t func, oldfunc;
     VALUE command, oldcmd;
     int sig = -1;
-    char *s;
+    const char *s;
 
     func = sighandler;
     if (NIL_P(arg-&gt;cmd)) {
@@ -630,7 +630,7 @@ trap(struct trap_arg *arg)
 	    rb_raise(rb_eArgError, &quot;unsupported signal SIG%s&quot;, s);
     }
 
-    if (sig &lt; 0 || sig &gt; NSIG) {
+    if (sig &lt; 0 || sig &gt;= NSIG) {
 	rb_raise(rb_eArgError, &quot;invalid signal number (%d)&quot;, sig);
     }
 #if defined(HAVE_SETITIMER)</diff>
      <filename>signal.c</filename>
    </modified>
    <modified>
      <diff>@@ -394,7 +394,15 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
 		VALUE val = GETARG();
 		char c;
 
-		c = NUM2INT(val) &amp; 0xff;
+		if (rb_check_string_type(val)) {
+		    if (RSTRING(val)-&gt;len != 1) {
+			rb_raise(rb_eArgError, &quot;%%c requires a character&quot;);
+		    }
+		    c = RSTRING(val)-&gt;ptr[0];
+		}
+		else {
+		    c = NUM2INT(val) &amp; 0xff;
+		}
 		if (!(flags &amp; FWIDTH)) {
 		    PUSH(&amp;c, 1);
 		}</diff>
      <filename>sprintf.c</filename>
    </modified>
    <modified>
      <diff>@@ -490,42 +490,97 @@ st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg)
     return 0;
 }
 
+/*
+ * hash_32 - 32 bit Fowler/Noll/Vo FNV-1a hash code
+ *
+ * @(#) $Revision$
+ * @(#) $Id$
+ * @(#) $Source$
+ *
+ ***
+ *
+ * Fowler/Noll/Vo hash
+ *
+ * The basis of this hash algorithm was taken from an idea sent
+ * as reviewer comments to the IEEE POSIX P1003.2 committee by:
+ *
+ *      Phong Vo (http://www.research.att.com/info/kpv/)
+ *      Glenn Fowler (http://www.research.att.com/~gsf/)
+ *
+ * In a subsequent ballot round:
+ *
+ *      Landon Curt Noll (http://www.isthe.com/chongo/)
+ *
+ * improved on their algorithm.  Some people tried this hash
+ * and found that it worked rather well.  In an EMail message
+ * to Landon, they named it the ``Fowler/Noll/Vo'' or FNV hash.
+ *
+ * FNV hashes are designed to be fast while maintaining a low
+ * collision rate. The FNV speed allows one to quickly hash lots
+ * of data while maintaining a reasonable collision rate.  See:
+ *
+ *      http://www.isthe.com/chongo/tech/comp/fnv/index.html
+ *
+ * for more details as well as other forms of the FNV hash.
+ ***
+ *
+ * To use the recommended 32 bit FNV-1a hash, pass FNV1_32A_INIT as the
+ * Fnv32_t hashval argument to fnv_32a_buf() or fnv_32a_str().
+ *
+ ***
+ *
+ * Please do not copyright this code.  This code is in the public domain.
+ *
+ * LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
+ * EVENT SHALL LANDON CURT NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * By:
+ *	chongo &lt;Landon Curt Noll&gt; /\oo/\
+ *      http://www.isthe.com/chongo/
+ *
+ * Share and Enjoy!	:-)
+ */
+
+/*
+ * 32 bit FNV-1 and FNV-1a non-zero initial basis
+ *
+ * The FNV-1 initial basis is the FNV-0 hash of the following 32 octets:
+ *
+ *              chongo &lt;Landon Curt Noll&gt; /\../\
+ *
+ * NOTE: The \'s above are not back-slashing escape characters.
+ * They are literal ASCII  backslash 0x5c characters.
+ *
+ * NOTE: The FNV-1a initial basis is the same value as FNV-1 by definition.
+ */
+#define FNV1_32A_INIT 0x811c9dc5
+
+/*
+ * 32 bit magic FNV-1a prime
+ */
+#define FNV_32_PRIME 0x01000193
+
 static int
 strhash(register const char *string)
 {
-    register int c;
+    register int hval = FNV1_32A_INIT;
 
-#ifdef HASH_ELFHASH
-    register unsigned int h = 0, g;
-
-    while ((c = *string++) != '\0') {
-	h = ( h &lt;&lt; 4 ) + c;
-	if ( g = h &amp; 0xF0000000 )
-	    h ^= g &gt;&gt; 24;
-	h &amp;= ~g;
-    }
-    return h;
-#elif HASH_PERL
-    register int val = 0;
-
-    while ((c = *string++) != '\0') {
-	val += c;
-	val += (val &lt;&lt; 10);
-	val ^= (val &gt;&gt; 6);
-    }
-    val += (val &lt;&lt; 3);
-    val ^= (val &gt;&gt; 11);
-
-    return val + (val &lt;&lt; 15);
-#else
-    register int val = 0;
+    /*
+     * FNV-1a hash each octet in the buffer
+     */
+    while (*string) {
+	/* xor the bottom with the current octet */
+	hval ^= (int)*string++;
 
-    while ((c = *string++) != '\0') {
-	val = val*997 + c;
+	/* multiply by the 32 bit FNV magic prime mod 2^32 */
+	hval *= FNV_32_PRIME;
     }
-
-    return val + (val&gt;&gt;5);
-#endif
+    return hval;
 }
 
 static int</diff>
      <filename>st.c</filename>
    </modified>
    <modified>
      <diff>@@ -765,39 +765,103 @@ rb_str_concat(VALUE str1, VALUE str2)
     return str1;
 }
 
+/*
+ * hash_32 - 32 bit Fowler/Noll/Vo FNV-1a hash code
+ *
+ * @(#) $Revision$
+ * @(#) $Id$
+ * @(#) $Source$
+ *
+ ***
+ *
+ * Fowler/Noll/Vo hash
+ *
+ * The basis of this hash algorithm was taken from an idea sent
+ * as reviewer comments to the IEEE POSIX P1003.2 committee by:
+ *
+ *      Phong Vo (http://www.research.att.com/info/kpv/)
+ *      Glenn Fowler (http://www.research.att.com/~gsf/)
+ *
+ * In a subsequent ballot round:
+ *
+ *      Landon Curt Noll (http://www.isthe.com/chongo/)
+ *
+ * improved on their algorithm.  Some people tried this hash
+ * and found that it worked rather well.  In an EMail message
+ * to Landon, they named it the ``Fowler/Noll/Vo'' or FNV hash.
+ *
+ * FNV hashes are designed to be fast while maintaining a low
+ * collision rate. The FNV speed allows one to quickly hash lots
+ * of data while maintaining a reasonable collision rate.  See:
+ *
+ *      http://www.isthe.com/chongo/tech/comp/fnv/index.html
+ *
+ * for more details as well as other forms of the FNV hash.
+ ***
+ *
+ * To use the recommended 32 bit FNV-1a hash, pass FNV1_32A_INIT as the
+ * Fnv32_t hashval argument to fnv_32a_buf() or fnv_32a_str().
+ *
+ ***
+ *
+ * Please do not copyright this code.  This code is in the public domain.
+ *
+ * LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
+ * EVENT SHALL LANDON CURT NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * By:
+ *	chongo &lt;Landon Curt Noll&gt; /\oo/\
+ *      http://www.isthe.com/chongo/
+ *
+ * Share and Enjoy!	:-)
+ */
+
+/*
+ * 32 bit FNV-1 and FNV-1a non-zero initial basis
+ *
+ * The FNV-1 initial basis is the FNV-0 hash of the following 32 octets:
+ *
+ *              chongo &lt;Landon Curt Noll&gt; /\../\
+ *
+ * NOTE: The \'s above are not back-slashing escape characters.
+ * They are literal ASCII  backslash 0x5c characters.
+ *
+ * NOTE: The FNV-1a initial basis is the same value as FNV-1 by definition.
+ */
+#define FNV1_32A_INIT 0x811c9dc5
+
+/*
+ * 32 bit magic FNV-1a prime
+ */
+#define FNV_32_PRIME 0x01000193
+
 int
 rb_str_hash(VALUE str)
 {
     register long len = RSTRING(str)-&gt;len;
     register char *p = RSTRING(str)-&gt;ptr;
-    register int key = 0;
-
-#ifdef HASH_ELFHASH
-    register unsigned int g;
+    register int hval = FNV1_32A_INIT;
 
+    /*
+     * FNV-1a hash each octet in the buffer
+     */
     while (len--) {
-	key = (key &lt;&lt; 4) + *p++;
-	if (g = key &amp; 0xF0000000)
-	    key ^= g &gt;&gt; 24;
-	key &amp;= ~g;
-    }
-#elif HASH_PERL
-    while (len--) {
-	key += *p++;
-	key += (key &lt;&lt; 10);
-	key ^= (key &gt;&gt; 6);
-    }
-    key += (key &lt;&lt; 3);
-    key ^= (key &gt;&gt; 11);
-    key += (key &lt;&lt; 15);
+	/* xor the bottom with the current octet */
+	hval ^= (int)*p++;
+
+	/* multiply by the 32 bit FNV magic prime mod 2^32 */
+#if defined(FNV_GCC_OPTIMIZATION)
+	hval += (hval&lt;&lt;1) + (hval&lt;&lt;4) + (hval&lt;&lt;7) + (hval&lt;&lt;8) + (hval&lt;&lt;24);
 #else
-    while (len--) {
-	key = key*65599 + *p;
-	p++;
-    }
-    key = key + (key&gt;&gt;5);
+	hval *= FNV_32_PRIME;
 #endif
-    return key;
+    }
+    return hval;
 }
 
 /*
@@ -810,8 +874,8 @@ rb_str_hash(VALUE str)
 static VALUE
 rb_str_hash_m(VALUE str)
 {
-    int key = rb_str_hash(str);
-    return INT2FIX(key);
+    int hval = rb_str_hash(str);
+    return INT2FIX(hval);
 }
 
 #define lesser(a,b) (((a)&gt;(b))?(b):(a))
@@ -1414,13 +1478,7 @@ rb_str_aref(VALUE str, VALUE indx)
 	idx = FIX2LONG(indx);
 
       num_index:
-	if (idx &lt; 0) {
-	    idx = RSTRING(str)-&gt;len + idx;
-	}
-	if (idx &lt; 0 || RSTRING(str)-&gt;len &lt;= idx) {
-	    return Qnil;
-	}
-	return INT2FIX(RSTRING(str)-&gt;ptr[idx] &amp; 0xff);
+	return rb_str_substr(str, idx, 1);
 
       case T_REGEXP:
 	return rb_str_subpat(str, indx, 0);
@@ -1456,21 +1514,21 @@ rb_str_aref(VALUE str, VALUE indx)
 
 /*
  *  call-seq:
- *     str[fixnum]                 =&gt; fixnum or nil
+ *     str[fixnum]                 =&gt; new_str or nil
  *     str[fixnum, fixnum]         =&gt; new_str or nil
  *     str[range]                  =&gt; new_str or nil
  *     str[regexp]                 =&gt; new_str or nil
  *     str[regexp, fixnum]         =&gt; new_str or nil
  *     str[other_str]              =&gt; new_str or nil
- *     str.slice(fixnum)           =&gt; fixnum or nil
+ *     str.slice(fixnum)           =&gt; new_str or nil
  *     str.slice(fixnum, fixnum)   =&gt; new_str or nil
  *     str.slice(range)            =&gt; new_str or nil
  *     str.slice(regexp)           =&gt; new_str or nil
  *     str.slice(regexp, fixnum)   =&gt; new_str or nil
  *     str.slice(other_str)        =&gt; new_str or nil
  *  
- *  Element Reference---If passed a single &lt;code&gt;Fixnum&lt;/code&gt;, returns the code
- *  of the character at that position. If passed two &lt;code&gt;Fixnum&lt;/code&gt;
+ *  Element Reference---If passed a single &lt;code&gt;Fixnum&lt;/code&gt;, returns a
+ *  substring of one character at that position. If passed two &lt;code&gt;Fixnum&lt;/code&gt;
  *  objects, returns a substring starting at the offset given by the first, and
  *  a length given by the second. If given a range, a substring containing
  *  characters at offsets given by the range is returned. In all three cases, if
@@ -1486,7 +1544,7 @@ rb_str_aref(VALUE str, VALUE indx)
  *  match.
  *     
  *     a = &quot;hello there&quot;
- *     a[1]                   #=&gt; 101
+ *     a[1]                   #=&gt; &quot;e&quot;
  *     a[1,3]                 #=&gt; &quot;ell&quot;
  *     a[1..3]                #=&gt; &quot;ell&quot;
  *     a[-3,2]                #=&gt; &quot;er&quot;
@@ -1615,17 +1673,7 @@ rb_str_aset(VALUE str, VALUE indx, VALUE val)
 		goto out_of_range;
 	    idx += RSTRING(str)-&gt;len;
 	}
-	if (FIXNUM_P(val)) {
-	    rb_str_modify(str);
-	    if (RSTRING(str)-&gt;len == idx) {
-		RSTRING(str)-&gt;len += 1;
-		RESIZE_CAPA(str, RSTRING(str)-&gt;len);
-	    }
-	    RSTRING(str)-&gt;ptr[idx] = FIX2INT(val) &amp; 0xff;
-	}
-	else {
-	    rb_str_splice(str, idx, 1, val);
-	}
+	rb_str_splice(str, idx, 1, val);
 	return val;
 
       case T_REGEXP:
@@ -1656,7 +1704,6 @@ rb_str_aset(VALUE str, VALUE indx, VALUE val)
 
 /*
  *  call-seq:
- *     str[fixnum] = fixnum
  *     str[fixnum] = new_str
  *     str[fixnum, fixnum] = new_str
  *     str[range] = aString
@@ -2160,6 +2207,22 @@ rb_str_clear(VALUE str)
 
 /*
  *  call-seq:
+ *     string.chr    -&gt;  string
+ *
+ *  Returns a one-character string at the beginning of the string.
+ *
+ *     a = &quot;abcde&quot;
+ *     a.chr    #=&gt; &quot;a&quot;
+ */
+
+static VALUE
+rb_str_chr(VALUE str)
+{
+    return rb_str_substr(str, 0, 1);
+}
+
+/*
+ *  call-seq:
  *     str.reverse!   =&gt; str
  *  
  *  Reverses &lt;i&gt;str&lt;/i&gt; in place.
@@ -4217,6 +4280,7 @@ Init_String(void)
     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);
     rb_define_method(rb_cString, &quot;clear&quot;, rb_str_clear, 0);
+    rb_define_method(rb_cString, &quot;chr&quot;, rb_str_chr, 0);
 
     rb_define_method(rb_cString, &quot;to_i&quot;, rb_str_to_i, -1);
     rb_define_method(rb_cString, &quot;to_f&quot;, rb_str_to_f, 0);</diff>
      <filename>string.c</filename>
    </modified>
    <modified>
      <diff>@@ -451,7 +451,7 @@ inspect_struct(VALUE s, VALUE dummy, int recur)
     for (i=0; i&lt;RSTRUCT_LEN(s); i++) {
 	VALUE slot;
 	ID id;
-	char *p;
+	const char *p;
 
 	if (i &gt; 0) {
 	    rb_str_cat2(str, &quot;, &quot;);</diff>
      <filename>struct.c</filename>
    </modified>
    <modified>
      <diff>@@ -29,25 +29,25 @@ class TestAssignment &lt; Test::Unit::TestCase
     a = [*[1]]; assert_equal([1], a)
     a = [*[1,2]]; assert_equal([1,2], a)
 
-    a = *[]; assert_nil(a)
-    a = *[1]; assert_equal(1, a)
-    a = *[nil]; assert_nil(a)
-    a = *[[]]; assert_equal([], a)
+    a = *[]; assert_equal([], a)
+    a = *[1]; assert_equal([1], a)
+    a = *[nil]; assert_equal([nil], a)
+    a = *[[]]; assert_equal([[]], a)
     a = *[1,2]; assert_equal([1,2], a)
-    a = *[*[]]; assert_nil(a)
-    a = *[*[1]]; assert_equal(1, a)
+    a = *[*[]]; assert_equal([], a)
+    a = *[*[1]]; assert_equal([1], a)
     a = *[*[1,2]]; assert_equal([1,2], a)
 
     *a = nil; assert_equal([nil], a)
     *a = 1; assert_equal([1], a)
-    *a = []; assert_equal([[]], a)
-    *a = [1]; assert_equal([[1]], a)
-    *a = [nil]; assert_equal([[nil]], a)
-    *a = [[]]; assert_equal([[[]]], a)
-    *a = [1,2]; assert_equal([[1,2]], a)
-    *a = [*[]]; assert_equal([[]], a)
-    *a = [*[1]]; assert_equal([[1]], a)
-    *a = [*[1,2]]; assert_equal([[1,2]], a)
+    *a = []; assert_equal([], a)
+    *a = [1]; assert_equal([1], a)
+    *a = [nil]; assert_equal([nil], a)
+    *a = [[]]; assert_equal([[]], a)
+    *a = [1,2]; assert_equal([1,2], a)
+    *a = [*[]]; assert_equal([], a)
+    *a = [*[1]]; assert_equal([1], a)
+    *a = [*[1,2]]; assert_equal([1,2], a)
 
     *a = *[]; assert_equal([], a)
     *a = *[1]; assert_equal([1], a)
@@ -82,13 +82,13 @@ class TestAssignment &lt; Test::Unit::TestCase
   def test_yield
     def f; yield(nil); end; f {|a| assert_nil(a)}; undef f
     def f; yield(1); end; f {|a| assert_equal(1, a)}; undef f
-    def f; yield([]); end; f {|a| assert_equal([], a)}; undef f
-    def f; yield([1]); end; f {|a| assert_equal([1], a)}; undef f
-    def f; yield([nil]); end; f {|a| assert_equal([nil], a)}; undef f
-    def f; yield([[]]); end; f {|a| assert_equal([[]], a)}; undef f
-    def f; yield([*[]]); end; f {|a| assert_equal([], a)}; undef f
-    def f; yield([*[1]]); end; f {|a| assert_equal([1], a)}; undef f
-    def f; yield([*[1,2]]); end; f {|a| assert_equal([1,2], a)}; undef f
+    def f; yield([]); end; f {|a| assert_equal(nil, a)}; undef f
+    def f; yield([1]); end; f {|a| assert_equal(1, a)}; undef f
+    def f; yield([nil]); end; f {|a| assert_equal(nil, a)}; undef f
+    def f; yield([[]]); end; f {|a| assert_equal([], a)}; undef f
+    def f; yield([*[]]); end; f {|a| assert_equal(nil, a)}; undef f
+    def f; yield([*[1]]); end; f {|a| assert_equal(1, a)}; undef f
+    def f; yield([*[1,2]]); end; f {|a| assert_equal(1, a)}; undef f
 
     def f; yield(*[1]); end; f {|a| assert_equal(1, a)}; undef f
     def f; yield(*[nil]); end; f {|a| assert_nil(a)}; undef f
@@ -98,14 +98,14 @@ class TestAssignment &lt; Test::Unit::TestCase
     def f; yield; end; f {|*a| assert_equal([], a)}; undef f
     def f; yield(nil); end; f {|*a| assert_equal([nil], a)}; undef f
     def f; yield(1); end; f {|*a| assert_equal([1], a)}; undef f
-    def f; yield([]); end; f {|*a| assert_equal([[]], a)}; undef f
-    def f; yield([1]); end; f {|*a| assert_equal([[1]], a)}; undef f
-    def f; yield([nil]); end; f {|*a| assert_equal([[nil]], a)}; undef f
-    def f; yield([[]]); end; f {|*a| assert_equal([[[]]], a)}; undef f
-    def f; yield([1,2]); end; f {|*a| assert_equal([[1,2]], a)}; undef f
-    def f; yield([*[]]); end; f {|*a| assert_equal([[]], a)}; undef f
-    def f; yield([*[1]]); end; f {|*a| assert_equal([[1]], a)}; undef f
-    def f; yield([*[1,2]]); end; f {|*a| assert_equal([[1,2]], a)}; undef f
+    def f; yield([]); end; f {|*a| assert_equal([], a)}; undef f
+    def f; yield([1]); end; f {|*a| assert_equal([1], a)}; undef f
+    def f; yield([nil]); end; f {|*a| assert_equal([nil], a)}; undef f
+    def f; yield([[]]); end; f {|*a| assert_equal([[]], a)}; undef f
+    def f; yield([1,2]); end; f {|*a| assert_equal([1,2], a)}; undef f
+    def f; yield([*[]]); end; f {|*a| assert_equal([], a)}; undef f
+    def f; yield([*[1]]); end; f {|*a| assert_equal([1], a)}; undef f
+    def f; yield([*[1,2]]); end; f {|*a| assert_equal([1,2], a)}; undef f
 
     def f; yield(*[]); end; f {|*a| assert_equal([], a)}; undef f
     def f; yield(*[1]); end; f {|*a| assert_equal([1], a)}; undef f
@@ -147,39 +147,39 @@ class TestAssignment &lt; Test::Unit::TestCase
     def r; return [*[1]]; end; a = r(); assert_equal([1], a); undef r
     def r; return [*[1,2]]; end; a = r(); assert_equal([1,2], a); undef r
 
-    def r; return *[]; end; a = r(); assert_nil(a); undef r
-    def r; return *[1]; end; a = r(); assert_equal(1, a); undef r
-    def r; return *[nil]; end; a = r(); assert_nil(a); undef r
-    def r; return *[[]]; end; a = r(); assert_equal([], a); undef r
-    def r; return *[*[]]; end; a = r(); assert_nil(a); undef r
-    def r; return *[*[1]]; end; a = r(); assert_equal(1, a); undef r
+    def r; return *[]; end; a = r(); assert_equal([], a); undef r
+    def r; return *[1]; end; a = r(); assert_equal([1], a); undef r
+    def r; return *[nil]; end; a = r(); assert_equal([nil], a); undef r
+    def r; return *[[]]; end; a = r(); assert_equal([[]], a); undef r
+    def r; return *[*[]]; end; a = r(); assert_equal([], a); undef r
+    def r; return *[*[1]]; end; a = r(); assert_equal([1], a); undef r
     def r; return *[*[1,2]]; end; a = r(); assert_equal([1,2], a); undef r
 
-    def r; return *[[]]; end; a = *r(); assert_nil(a); undef r
+    def r; return *[[]]; end; a = *r(); assert_equal([[]], a); undef r
     def r; return *[*[1,2]]; end; a = *r(); assert_equal([1,2], a); undef r
 
     def r; return; end; *a = r(); assert_equal([nil], a); undef r
     def r; return nil; end; *a = r(); assert_equal([nil], a); undef r
     def r; return 1; end; *a = r(); assert_equal([1], a); undef r
-    def r; return []; end; *a = r(); assert_equal([[]], a); undef r
-    def r; return [1]; end; *a = r(); assert_equal([[1]], a); undef r
-    def r; return [nil]; end; *a = r(); assert_equal([[nil]], a); undef r
-    def r; return [[]]; end; *a = r(); assert_equal([[[]]], a); undef r
-    def r; return [1,2]; end; *a = r(); assert_equal([[1,2]], a); undef r
-    def r; return [*[]]; end; *a = r(); assert_equal([[]], a); undef r
-    def r; return [*[1]]; end; *a = r(); assert_equal([[1]], a); undef r
-    def r; return [*[1,2]]; end; *a = r(); assert_equal([[1,2]], a); undef r
-
-    def r; return *[]; end; *a = r(); assert_equal([nil], a); undef r
+    def r; return []; end; *a = r(); assert_equal([], a); undef r
+    def r; return [1]; end; *a = r(); assert_equal([1], a); undef r
+    def r; return [nil]; end; *a = r(); assert_equal([nil], a); undef r
+    def r; return [[]]; end; *a = r(); assert_equal([[]], a); undef r
+    def r; return [1,2]; end; *a = r(); assert_equal([1,2], a); undef r
+    def r; return [*[]]; end; *a = r(); assert_equal([], a); undef r
+    def r; return [*[1]]; end; *a = r(); assert_equal([1], a); undef r
+    def r; return [*[1,2]]; end; *a = r(); assert_equal([1,2], a); undef r
+
+    def r; return *[]; end; *a = r(); assert_equal([], a); undef r
     def r; return *[1]; end; *a = r(); assert_equal([1], a); undef r
     def r; return *[nil]; end; *a = r(); assert_equal([nil], a); undef r
     def r; return *[[]]; end; *a = r(); assert_equal([[]], a); undef r
-    def r; return *[1,2]; end; *a = r(); assert_equal([[1,2]], a); undef r
-    def r; return *[*[]]; end; *a = r(); assert_equal([nil], a); undef r
+    def r; return *[1,2]; end; *a = r(); assert_equal([1,2], a); undef r
+    def r; return *[*[]]; end; *a = r(); assert_equal([], a); undef r
     def r; return *[*[1]]; end; *a = r(); assert_equal([1], a); undef r
-    def r; return *[*[1,2]]; end; *a = r(); assert_equal([[1,2]], a); undef r
+    def r; return *[*[1,2]]; end; *a = r(); assert_equal([1,2], a); undef r
 
-    def r; return *[[]]; end; *a = *r(); assert_equal([], a); undef r
+    def r; return *[[]]; end; *a = *r(); assert_equal([[]], a); undef r
     def r; return *[1,2]; end; *a = *r(); assert_equal([1,2], a); undef r
     def r; return *[*[1,2]]; end; *a = *r(); assert_equal([1,2], a); undef r
 
@@ -198,7 +198,7 @@ class TestAssignment &lt; Test::Unit::TestCase
     def r; return *[]; end; a,b,*c = r(); assert_equal([nil,nil,[]], [a,b,c]); undef r
     def r; return *[1]; end; a,b,*c = r(); assert_equal([1,nil,[]], [a,b,c]); undef r
     def r; return *[nil]; end; a,b,*c = r(); assert_equal([nil,nil,[]], [a,b,c]); undef r
-    def r; return *[[]]; end; a,b,*c = r(); assert_equal([nil,nil,[]], [a,b,c]); undef r
+    def r; return *[[]]; end; a,b,*c = r(); assert_equal([[],nil,[]], [a,b,c]); undef r
     def r; return *[1,2]; end; a,b,*c = r(); assert_equal([1,2,[]], [a,b,c]); undef r
     def r; return *[*[]]; end; a,b,*c = r(); assert_equal([nil,nil,[]], [a,b,c]); undef r
     def r; return *[*[1]]; end; a,b,*c = r(); assert_equal([1,nil,[]], [a,b,c]); undef r
@@ -260,36 +260,36 @@ class TestAssignment &lt; Test::Unit::TestCase
     a = loop do break [*[1]]; end; assert_equal([1], a)
     a = loop do break [*[1,2]]; end; assert_equal([1,2], a)
 
-    a = loop do break *[]; end; assert_nil(a)
-    a = loop do break *[1]; end; assert_equal(1, a)
-    a = loop do break *[nil]; end; assert_nil(a)
-    a = loop do break *[[]]; end; assert_equal([], a)
-    a = loop do break *[*[]]; end; assert_nil(a)
-    a = loop do break *[*[1]]; end; assert_equal(1, a)
+    a = loop do break *[]; end; assert_equal([], a)
+    a = loop do break *[1]; end; assert_equal([1], a)
+    a = loop do break *[nil]; end; assert_equal([nil], a)
+    a = loop do break *[[]]; end; assert_equal([[]], a)
+    a = loop do break *[*[]]; end; assert_equal([], a)
+    a = loop do break *[*[1]]; end; assert_equal([1], a)
     a = loop do break *[*[1,2]]; end; assert_equal([1,2], a)
 
     *a = loop do break; end; assert_equal([nil], a)
     *a = loop do break nil; end; assert_equal([nil], a)
     *a = loop do break 1; end; assert_equal([1], a)
-    *a = loop do break []; end; assert_equal([[]], a)
-    *a = loop do break [1]; end; assert_equal([[1]], a)
-    *a = loop do break [nil]; end; assert_equal([[nil]], a)
-    *a = loop do break [[]]; end; assert_equal([[[]]], a)
-    *a = loop do break [1,2]; end; assert_equal([[1,2]], a)
-    *a = loop do break [*[]]; end; assert_equal([[]], a)
-    *a = loop do break [*[1]]; end; assert_equal([[1]], a)
-    *a = loop do break [*[1,2]]; end; assert_equal([[1,2]], a)
-
-    *a = loop do break *[]; end; assert_equal([nil], a)
+    *a = loop do break []; end; assert_equal([], a)
+    *a = loop do break [1]; end; assert_equal([1], a)
+    *a = loop do break [nil]; end; assert_equal([nil], a)
+    *a = loop do break [[]]; end; assert_equal([[]], a)
+    *a = loop do break [1,2]; end; assert_equal([1,2], a)
+    *a = loop do break [*[]]; end; assert_equal([], a)
+    *a = loop do break [*[1]]; end; assert_equal([1], a)
+    *a = loop do break [*[1,2]]; end; assert_equal([1,2], a)
+
+    *a = loop do break *[]; end; assert_equal([], a)
     *a = loop do break *[1]; end; assert_equal([1], a)
     *a = loop do break *[nil]; end; assert_equal([nil], a)
     *a = loop do break *[[]]; end; assert_equal([[]], a)
-    *a = loop do break *[1,2]; end; assert_equal([[1,2]], a)
-    *a = loop do break *[*[]]; end; assert_equal([nil], a)
+    *a = loop do break *[1,2]; end; assert_equal([1,2], a)
+    *a = loop do break *[*[]]; end; assert_equal([], a)
     *a = loop do break *[*[1]]; end; assert_equal([1], a)
-    *a = loop do break *[*[1,2]]; end; assert_equal([[1,2]], a)
+    *a = loop do break *[*[1,2]]; end; assert_equal([1,2], a)
 
-    *a = *loop do break *[[]]; end; assert_equal([], a)
+    *a = *loop do break *[[]]; end; assert_equal([[]], a)
     *a = *loop do break *[1,2]; end; assert_equal([1,2], a)
     *a = *loop do break *[*[1,2]]; end; assert_equal([1,2], a)
 
@@ -308,7 +308,7 @@ class TestAssignment &lt; Test::Unit::TestCase
     a,b,*c = loop do break *[]; end; assert_equal([nil,nil,[]], [a,b,c])
     a,b,*c = loop do break *[1]; end; assert_equal([1,nil,[]], [a,b,c])
     a,b,*c = loop do break *[nil]; end; assert_equal([nil,nil,[]], [a,b,c])
-    a,b,*c = loop do break *[[]]; end; assert_equal([nil,nil,[]], [a,b,c])
+    a,b,*c = loop do break *[[]]; end; assert_equal([[],nil,[]], [a,b,c])
     a,b,*c = loop do break *[1,2]; end; assert_equal([1,2,[]], [a,b,c])
     a,b,*c = loop do break *[*[]]; end; assert_equal([nil,nil,[]], [a,b,c])
     a,b,*c = loop do break *[*[1]]; end; assert_equal([1,nil,[]], [a,b,c])
@@ -328,12 +328,12 @@ class TestAssignment &lt; Test::Unit::TestCase
     r([1]){next [*[1]]}
     r([1,2]){next [*[1,2]]}
 
-    r(nil){next *[]}
-    r(1){next *[1]}
-    r(nil){next *[nil]}
-    r([]){next *[[]]}
-    r(nil){next *[*[]]}
-    r(1){next *[*[1]]}
+    r([]){next *[]}
+    r([1]){next *[1]}
+    r([nil]){next *[nil]}
+    r([[]]){next *[[]]}
+    r([]){next *[*[]]}
+    r([1]){next *[*[1]]}
     r([1,2]){next *[*[1,2]]}
     undef r
 
@@ -341,18 +341,18 @@ class TestAssignment &lt; Test::Unit::TestCase
     r([nil]){next}
     r([nil]){next nil}
     r([1]){next 1}
-    r([[]]){next []}
-    r([[1]]){next [1]}
-    r([[nil]]){next [nil]}
-    r([[[]]]){next [[]]}
-    r([[1,2]]){next [1,2]}
-    r([[]]){next [*[]]}
-    r([[1]]){next [*[1]]}
-    r([[1,2]]){next [*[1,2]]}
+    r([]){next []}
+    r([1]){next [1]}
+    r([nil]){next [nil]}
+    r([[]]){next [[]]}
+    r([1,2]){next [1,2]}
+    r([]){next [*[]]}
+    r([1]){next [*[1]]}
+    r([1,2]){next [*[1,2]]}
     undef r
 
     def r(val); *a = *yield(); assert_equal(val, a); end
-    r([]){next *[[]]}
+    r([[]]){next *[[]]}
     r([1,2]){next *[1,2]}
     r([1,2]){next *[*[1,2]]}
     undef r
@@ -372,7 +372,7 @@ class TestAssignment &lt; Test::Unit::TestCase
     undef r
 
     def r(val); a,b,*c = *yield(); assert_equal(val, [a,b,c]); end
-    r([nil,nil,[]]){next *[[]]}
+    r([[],nil,[]]){next *[[]]}
     r([1,2,[]]){next *[1,2]}
     r([1,2,[]]){next *[*[1,2]]}
     undef r</diff>
      <filename>test/ruby/test_assignment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,6 +23,6 @@ class TestClone &lt; Test::Unit::TestCase
 
     assert_raises(NoMethodError) {foo.test2}
 
-    assert_equal([M003, M002, M001], M003.ancestors)
+    assert_equal([M003, M002, M001, M002], M003.ancestors)
   end
 end</diff>
      <filename>test/ruby/test_clone.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,9 +31,9 @@ class TestDir &lt; Test::Unit::TestCase
         break unless name = dir.read
         cache &lt;&lt; [pos, name]
       end
-      for x in cache.sort_by {|x| x[0] % 3 } # shuffle
-        dir.seek(x[0])
-        assert_equal(x[1], dir.read)
+      for x,y in cache.sort_by {|x| x[0] % 3 } # shuffle
+        dir.seek(x)
+        assert_equal(y, dir.read)
       end
     ensure
       dir.close</diff>
      <filename>test/ruby/test_dir.rb</filename>
    </modified>
    <modified>
      <diff>@@ -88,7 +88,7 @@ class TestFile &lt; Test::Unit::TestCase
     assert_nil(f.getc)
     open(f.path, &quot;w&quot;) {|g| g.print &quot;a&quot; }
     result = []
-    f.each_byte {|b| result &lt;&lt; b }
+    f.each_byte {|b| result &lt;&lt; b.chr }
     assert_equal([?a], result)
   end
 </diff>
      <filename>test/ruby/test_file.rb</filename>
    </modified>
    <modified>
      <diff>@@ -87,4 +87,32 @@ class TestFloat &lt; Test::Unit::TestCase
     assert_raise(ArgumentError){Float(&quot;1e&quot;)}
     # add expected behaviour here.
   end
+
+  def test_divmod
+    assert_equal([2, 3.5], 11.5.divmod(4))
+    assert_equal([-3, -0.5], 11.5.divmod(-4))
+    assert_equal([-3, 0.5], (-11.5).divmod(4))
+    assert_equal([2, -3.5], (-11.5).divmod(-4))
+  end
+
+  def test_div
+    assert_equal(2, 11.5.div(4))
+    assert_equal(-3, 11.5.div(-4))
+    assert_equal(-3, (-11.5).div(4))
+    assert_equal(2, (-11.5).div(-4))
+  end
+
+  def test_modulo
+    assert_equal(3.5, 11.5.modulo(4))
+    assert_equal(-0.5, 11.5.modulo(-4))
+    assert_equal(0.5, (-11.5).modulo(4))
+    assert_equal(-3.5, (-11.5).modulo(-4))
+  end
+
+  def test_remainder
+    assert_equal(3.5, 11.5.remainder(4))
+    assert_equal(3.5, 11.5.remainder(-4))
+    assert_equal(-3.5, (-11.5).remainder(4))
+    assert_equal(-3.5, (-11.5).remainder(-4))
+  end
 end</diff>
      <filename>test/ruby/test_float.rb</filename>
    </modified>
    <modified>
      <diff>@@ -151,21 +151,21 @@ class TestIterator &lt; Test::Unit::TestCase
     IterTest.new([2]).each2 {|x| assert_equal([2], x)}
     IterTest.new([4]).each4 {|x| assert_equal(4, x)}
     IterTest.new([5]).each5 {|x| assert_equal(5, x)}
-    IterTest.new([6]).each6 {|x| assert_equal([6], x)}
+    IterTest.new([6]).each6 {|x| assert_equal(6, x)}
     IterTest.new([8]).each8 {|x| assert_equal(8, x)}
 
-    IterTest.new([[0]]).each0 {|x| assert_equal([0], x)}
-    IterTest.new([[1]]).each1 {|x| assert_equal([1], x)}
-    IterTest.new([[2]]).each2 {|x| assert_equal([[2]], x)}
+    IterTest.new([[0]]).each0 {|x| assert_equal(0, x)}
+    IterTest.new([[1]]).each1 {|x| assert_equal(1, x)}
+    IterTest.new([[2]]).each2 {|x| assert_equal([2], x)}
     IterTest.new([[3]]).each3 {|x| assert_equal(3, x)}
-    IterTest.new([[4]]).each4 {|x| assert_equal([4], x)}
-    IterTest.new([[5]]).each5 {|x| assert_equal([5], x)}
-    IterTest.new([[6]]).each6 {|x| assert_equal([[6]], x)}
+    IterTest.new([[4]]).each4 {|x| assert_equal(4, x)}
+    IterTest.new([[5]]).each5 {|x| assert_equal(5, x)}
+    IterTest.new([[6]]).each6 {|x| assert_equal(6, x)}
     IterTest.new([[7]]).each7 {|x| assert_equal(7, x)}
-    IterTest.new([[8]]).each8 {|x| assert_equal([8], x)}
+    IterTest.new([[8]]).each8 {|x| assert_equal(8, x)}
 
-    IterTest.new([[0,0]]).each0 {|x| assert_equal([0,0], x)}
-    IterTest.new([[8,8]]).each8 {|x| assert_equal([8,8], x)}
+    IterTest.new([[0,0]]).each0 {|*x| assert_equal([0,0], x)}
+    IterTest.new([[8,8]]).each8 {|*x| assert_equal([8], x)}
   end
 
   def m(var)
@@ -346,10 +346,10 @@ class TestIterator &lt; Test::Unit::TestCase
   end
 
   def foo
-    yield([:key, :value])
+    yield(:key, :value)
   end
   def bar(&amp;blk)
-    blk.call([:key, :value])
+    blk.call(:key, :value)
   end
 
   def test_yield_vs_call
@@ -359,14 +359,14 @@ class TestIterator &lt; Test::Unit::TestCase
 
   class H
     def each
-      yield [:key, :value]
+      yield :key, :value
     end
   end
 
   def test_assoc_yield
     [{:key=&gt;:value}, H.new].each {|h|
-      h.each{|a| assert_equal([:key, :value], a)}
-      h.each{|*a| assert_equal([[:key, :value]], a)}
+      h.each{|a| assert_equal(:key, a)}
+      h.each{|*a| assert_equal([:key, :value], a)}
       h.each{|k,v| assert_equal([:key, :value], [k,v])}
     }
   end</diff>
      <filename>test/ruby/test_iterator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -68,9 +68,9 @@ END
     # character constants(assumes ASCII)
     assert_equal(?a, &quot;a&quot;[0])
     assert_equal(?a, ?a)
-    assert_equal(1, ?\C-a)
-    assert_equal(225, ?\M-a)
-    assert_equal(129, ?\M-\C-a)
+    assert_equal(&quot;\1&quot;, ?\C-a)
+    assert_equal(&quot;\341&quot;, ?\M-a)
+    assert_equal(&quot;\201&quot;, ?\M-\C-a)
     assert_equal(?A, &quot;a&quot;.upcase![0])
     assert_equal(?a, &quot;A&quot;.downcase![0])
     assert_equal(&quot;ABC&quot;, &quot;abc&quot;.tr!(&quot;a-z&quot;, &quot;A-Z&quot;))
@@ -82,7 +82,7 @@ END
     $y = [ ?a, ?b, ?c, ?d, ?e, ?f ]
     $bad = false
     $x.each_byte {|i|
-      if i != $y.shift
+      if i.chr != $y.shift
         $bad = true
         break
       end</diff>
      <filename>test/ruby/test_stringchar.rb</filename>
    </modified>
    <modified>
      <diff>@@ -157,7 +157,7 @@ static struct timeval
 time_timeval(VALUE time, 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;
@@ -182,7 +182,7 @@ time_timeval(VALUE time, int interval)
 	    if (f != t.tv_sec) {
 		rb_raise(rb_eRangeError, &quot;%f out of Time range&quot;, RFLOAT(time)-&gt;value);
 	    }
-	    t.tv_usec = (time_t)(d*1e6);
+	    t.tv_usec = (time_t)(d*1e6+0.5);
 	}
 	break;
 
@@ -1229,7 +1229,7 @@ time_add(struct time_object *tobj, VALUE offset, int sign)
     if (f != (double)sec_off)
 	rb_raise(rb_eRangeError, &quot;time %s %f out of Time range&quot;,
 		 sign &lt; 0 ? &quot;-&quot; : &quot;+&quot;, v);
-    usec_off = (time_t)(d*1e6);
+    usec_off = (time_t)(d*1e6+0.5);
 
     if (sign &lt; 0) {
 	sec = tobj-&gt;tv.tv_sec - sec_off;</diff>
      <filename>time.c</filename>
    </modified>
    <modified>
      <diff>@@ -15,6 +15,8 @@
 #include &lt;ctype.h&gt;
 #include &lt;stdio.h&gt;
 #include &lt;errno.h&gt;
+#include &lt;math.h&gt;
+#include &lt;float.h&gt;
 
 #ifdef _WIN32
 #include &quot;missing/file.h&quot;
@@ -664,11 +666,9 @@ ruby_getcwd(void)
  *
  */
 
-#define TRUE 1
-#define FALSE 0
+#define MDMINEXPT DBL_MIN_EXP
+#define MDMAXEXPT DBL_MAX_EXP
 
-static  int     MDMINEXPT       = -323;
-static  int     MDMAXEXPT       =  309;
 static double powersOf10[] = {	/* Table giving binary powers of 10.  Entry */
     10.0,			/* is 10^2^i.  Used to convert decimal */
     100.0,			/* exponents into floating-point numbers. */
@@ -720,8 +720,8 @@ ruby_strtod(
     char **endPtr)		/* If non-NULL, store terminating character's
 				 * address here. */
 {
-    int sign, expSign = FALSE;
-    double fraction, dblExp, *d;
+    int sign, expSign = Qfalse;
+    double fraction = 0.0, dblExp, *d;
     register const char *p;
     register int c;
     int exp = 0;		/* Exponent read from &quot;EX&quot; field. */
@@ -735,8 +735,8 @@ ruby_strtod(
 				 * case, fracExp is incremented one for each
 				 * dropped digit. */
     int mantSize = 0;		/* Number of digits in mantissa. */
-    int hasPoint = FALSE;	/* Decimal point exists. */
-    int hasDigit = FALSE;	/* I or F exists. */
+    int hasPoint = Qfalse;	/* Decimal point exists. */
+    int hasDigit = Qfalse;	/* I or F exists. */
     const char *pMant;		/* Temporarily holds location of mantissa
 				 * in string. */
     const char *pExp;		/* Temporarily holds location of exponent
@@ -748,44 +748,43 @@ ruby_strtod(
 
     errno = 0;
     p = string;
-    while (ISSPACE(*p)) {
-	p += 1;
-    }
+    while (ISSPACE(*p)) p++;
     if (*p == '-') {
-	sign = TRUE;
-	p += 1;
+	sign = Qtrue;
+	p++;
     }
     else {
-	if (*p == '+') {
-	    p += 1;
-	}
-	sign = FALSE;
+	if (*p == '+') p++;
+	sign = Qfalse;
     }
 
+    fraction = 0.;
+    exp = 0;
+
     /*
      * Count the number of digits in the mantissa
      * and also locate the decimal point.
      */
 
-    for ( ; c = *p; p += 1) {
+    for ( ; c = *p; p++) {
 	if (!ISDIGIT(c)) {
 	    if (c != '.' || hasPoint) {
 		break;
 	    }
-	    hasPoint = TRUE;
+	    hasPoint = Qtrue;
 	}
 	else {
 	    if (hasPoint) { /* already in fractional part */
-		fracExp -= 1;
+		fracExp--;
 	    }
 	    if (mantSize) { /* already in mantissa */
-		mantSize += 1;
+		mantSize++;
 	    }
 	    else if (c != '0') { /* have entered mantissa */
-		mantSize += 1;
+		mantSize++;
 		pMant = p;
 	    }
-	    hasDigit = TRUE;
+	    hasDigit = Qtrue;
 	}
     }
 
@@ -796,7 +795,7 @@ ruby_strtod(
      * they can't affect the value anyway.
      */
     
-    pExp  = p;
+    pExp = p;
     if (mantSize) {
 	p = pMant;
     }
@@ -809,7 +808,7 @@ ruby_strtod(
 	p = string;
     }
     else {
-	int frac1, frac2;
+	double frac1, frac2;
 	frac1 = 0;
 	for ( ; mantSize &gt; 9; mantSize -= 1) {
 	    c = *p;
@@ -837,21 +836,20 @@ ruby_strtod(
 
 	p = pExp;
 	if ((*p == 'E') || (*p == 'e')) {
-	    p += 1;
+	    p++;
 	    if (*p == '-') {
-		expSign = TRUE;
-		p += 1;
+		expSign = Qtrue;
+		p++;
 	    }
 	    else {
 		if (*p == '+') {
-		    p += 1;
+		    p++;
 		}
-		expSign = FALSE;
+		expSign = Qfalse;
 	    }
 	    if (ISDIGIT(*p)) {
 		do {
-		    exp = exp * 10 + (*p - '0');
-		    p += 1;
+		    exp = exp * 10 + (*p++ - '0');
 		}
 		while (ISDIGIT(*p));
 	    }
@@ -873,22 +871,22 @@ ruby_strtod(
 	 * fraction.
 	 */
     
-	if (exp &gt;= MDMAXEXPT - 18) {
-	    exp = MDMAXEXPT;
+	if (exp &gt;= MDMAXEXPT) {
 	    errno = ERANGE;
+	    return HUGE_VAL * (sign ? -1.0 : 1.0);
 	}
-	else if (exp &lt; MDMINEXPT + 18) {
-	    exp = MDMINEXPT;
+	else if (exp &lt; MDMINEXPT) {
 	    errno = ERANGE;
+	    return 0.0 * (sign ? -1.0 : 1.0);
 	}
 	fracExp = exp;
 	exp += 9;
 	if (exp &lt; 0) {
-	    expSign = TRUE;
+	    expSign = Qtrue;
 	    exp = -exp;
 	}
 	else {
-	    expSign = FALSE;
+	    expSign = Qfalse;
 	}
 	dblExp = 1.0;
 	for (d = powersOf10; exp != 0; exp &gt;&gt;= 1, d += 1) {
@@ -897,18 +895,18 @@ ruby_strtod(
 	    }
 	}
 	if (expSign) {
-	    fraction = frac1 / dblExp;
+	    frac1 /= dblExp;
 	}
 	else {
-	    fraction = frac1 * dblExp;
+	    frac1 *= dblExp;
 	}
 	exp = fracExp;
 	if (exp &lt; 0) {
-	    expSign = TRUE;
+	    expSign = Qtrue;
 	    exp = -exp;
 	}
 	else {
-	    expSign = FALSE;
+	    expSign = Qfalse;
 	}
 	dblExp = 1.0;
 	for (d = powersOf10; exp != 0; exp &gt;&gt;= 1, d += 1) {
@@ -917,17 +915,17 @@ ruby_strtod(
 	    }
 	}
 	if (expSign) {
-	    fraction += frac2 / dblExp;
+	    frac2 /= dblExp;
 	}
 	else {
-	    fraction += frac2 * dblExp;
+	    frac2 *= dblExp;
 	}
+	fraction = frac1 + frac2;
     }
 
     if (endPtr != NULL) {
-	*endPtr = (char *) p;
+	*endPtr = (char *)p;
     }
-
     if (sign) {
 	return -fraction;
     }</diff>
      <filename>util.c</filename>
    </modified>
    <modified>
      <diff>@@ -186,7 +186,7 @@ rb_class_path(VALUE klass)
 	return path;
     }
     else {
-	char *s = &quot;Class&quot;;
+	const char *s = &quot;Class&quot;;
 
 	if (TYPE(klass) == T_MODULE) {
 	    if (rb_obj_class(klass) == rb_cModule) {
@@ -711,7 +711,7 @@ rb_f_global_variables(void)
 {
     VALUE ary = rb_ary_new();
     char buf[4];
-    char *s = &quot;&amp;`'+123456789&quot;;
+    const char *s = &quot;&amp;`'+123456789&quot;;
 
     st_foreach_safe(rb_global_tbl, gvar_i, ary);
     if (!NIL_P(rb_backref_get())) {
@@ -1282,7 +1282,7 @@ rb_const_get_0(VALUE klass, ID id, int exclude, int recurse, NODE *fallback)
 
     tmp = klass;
   retry:
-    while (tmp) {
+    while (tmp &amp;&amp; !NIL_P(tmp)) {
 	while (RCLASS(tmp)-&gt;iv_tbl &amp;&amp; st_lookup(RCLASS(tmp)-&gt;iv_tbl,id,&amp;value)) {
 	    if (value == Qundef) {
 		if (!RTEST(rb_autoload_load(tmp, id))) break;
@@ -1510,7 +1510,7 @@ rb_const_defined_fallback(VALUE klass, ID id, NODE *fallback)
 static void
 mod_av_set(VALUE klass, ID id, 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);
@@ -1542,6 +1542,10 @@ mod_av_set(VALUE klass, ID id, VALUE val, int isconst)
 void
 rb_const_set(VALUE klass, ID id, VALUE val)
 {
+    if (NIL_P(klass)) {
+	rb_raise(rb_eTypeError, &quot;no class/module to define constant %s&quot;,
+		 rb_id2name(id));
+    }
     mod_av_set(klass, id, val, Qtrue);
 }
 </diff>
      <filename>variable.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>48af1303b4c3ea553bbc25b831a606ecf7dc8535</id>
    </parent>
  </parents>
  <author>
    <name>matz</name>
    <email>matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
  </author>
  <url>http://github.com/ice799/matzruby/commit/d6747bbf0e440fb3301a19640c9b3433f0676073</url>
  <id>d6747bbf0e440fb3301a19640c9b3433f0676073</id>
  <committed-date>2006-06-09T14:20:17-07:00</committed-date>
  <authored-date>2006-06-09T14:20:17-07:00</authored-date>
  <message>* sprintf.c (rb_str_format): allow %c to print one character
  string (e.g. ?x).

* lib/tempfile.rb (Tempfile::make_tmpname): put dot between
  basename and pid.  [ruby-talk:196272]
* parse.y (do_block): remove -&gt; style block.

* parse.y (parser_yylex): remove tLAMBDA_ARG.

* eval.c (rb_call0): binding for the return event hook should have
  consistent scope.  [ruby-core:07928]

* eval.c (proc_invoke): return behavior should depend whether it
  is surrounded by a lambda or a mere block.

* eval.c (formal_assign): handles post splat arguments.

* eval.c (rb_call0): ditto.

* st.c (strhash): use FNV-1a hash.

* parse.y (parser_yylex): removed experimental ';;' terminator.

* eval.c (rb_node_arity): should be aware of post splat arguments.

* eval.c (rb_proc_arity): ditto.

* parse.y (f_args): syntax rule enhanced to support arguments
  after the splat.

* parse.y (block_param): ditto for block parameters.

* parse.y (f_post_arg): mandatory formal arguments after the splat
  argument.

* parse.y (new_args_gen): generate nodes for mandatory formal
  arguments after the splat argument.

* eval.c (rb_eval): dispatch mandatory formal arguments after the
  splat argument.

* parse.y (args): allow more than one splat in the argument list.

* parse.y (method_call): allow aref [] to accept all kind of
  method argument, including assocs, splat, and block argument.

* eval.c (SETUP_ARGS0): prepare block argument as well.

* lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931]

* eval.c (error_line): print receivers true/false/nil specially.

* eval.c (rb_proc_yield): handles parameters in yield semantics.

* eval.c (nil_yield): gives LocalJumpError to denote no block
  error.

* io.c (rb_io_getc): now takes one-character string.

* string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo
  hashing algorithm.

* string.c (rb_str_aref): str[0] now returns 1 character string,
  instead of a fixnum.	[Ruby2]

* parse.y (parser_yylex): ?c now returns 1 character string,
  instead of a fixnum.	[Ruby2]

* string.c (rb_str_aset): no longer support fixnum insertion.

* eval.c (umethod_bind): should not update original class.
  [ruby-dev:28636]

* eval.c (ev_const_get): should support constant access from
  within instance_eval().  [ruby-dev:28327]

* time.c (time_timeval): should round for usec floating
  number.  [ruby-core:07896]

* time.c (time_add): ditto.

* dir.c (sys_warning): should not call a vararg function
  rb_sys_warning() indirectly.	[ruby-core:07886]

* numeric.c (flo_divmod): the first element of Float#divmod should
  be an integer. [ruby-dev:28589]

* test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder.

* re.c (rb_reg_initialize): should not allow modifying literal
  regexps.  frozen check moved from rb_reg_initialize_m as well.

* re.c (rb_reg_initialize): should not modify untainted objects in
  safe levels higher than 3.

* re.c (rb_memcmp): type change from char* to const void*.

* dir.c (dir_close): should not close untainted dir stream.

* dir.c (GetDIR): add tainted/frozen check for each dir operation.

* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg):
  typo fixed.  a patch from Florian Gross &lt;florg at florg.net&gt;.

* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
  event_hooks.	no guarantee for arbitrary hook deletion.
  [ruby-dev:28632]

* util.c (ruby_strtod): differ addition to minimize error.
  [ruby-dev:28619]

* util.c (ruby_strtod): should not raise ERANGE when the input
  string does not have any digits.  [ruby-dev:28629]

* eval.c (proc_invoke): should restore old ruby_frame-&gt;block.
  thanks to ts &lt;decoux at moulon.inra.fr&gt;.  [ruby-core:07833]
  also fix [ruby-dev:28614] as well.

* signal.c (trap): sig should be less then NSIG.  Coverity found
  this bug.  a patch from Kevin Tew &lt;tewk at tewk.com&gt;.
  [ruby-core:07823]

* math.c (math_log2): add new method inspired by
  [ruby-talk:191237].

* math.c (math_log): add optional base argument to Math::log().
  [ruby-talk:191308]

* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
  uninitialized array element.	a patch from Pat Eyler
  &lt;rubypate at gmail.com&gt;.  [ruby-core:07809]

* array.c (rb_ary_fill): initialize local variables first.  a
  patch from Pat Eyler &lt;rubypate at gmail.com&gt;.	 [ruby-core:07810]

* ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free
  type_tag.  a patch from Pat Eyler &lt;rubypate at gmail.com&gt;.
  [ruby-core:07808]

* ext/socket/socket.c (make_hostent_internal): accept ai_family
  check from Sam Roberts &lt;sroberts at uniserve.com&gt;.
  [ruby-core:07691]

* util.c (ruby_strtod): should not cut off 18 digits for no
  reason.  [ruby-core:07796]

* array.c (rb_ary_fill): internalize local variable &quot;beg&quot; to
  pacify Coverity.  [ruby-core:07770]

* pack.c (pack_unpack): now supports CRLF newlines.  a patch from
  &lt;tommy at tmtm.org&gt;.	[ruby-dev:28601]

* applied code clean-up patch from Stefan Huehner
  &lt;stefan at huehner.org&gt;.  [ruby-core:07764]

* lib/jcode.rb (String::tr_s): should have translated non
  squeezing character sequence (i.e. a character) as well.  thanks
  to Hiroshi Ichikawa &lt;gimite at gimite.ddo.jp&gt; [ruby-list:42090]

* ext/socket/socket.c: document update patch from Sam Roberts
  &lt;sroberts at uniserve.com&gt;.  [ruby-core:07701]

* lib/mathn.rb (Integer): need not to remove gcd2.  a patch from
  NARUSE, Yui &lt;naruse at airemix.com&gt;.	[ruby-dev:28570]

* parse.y (arg): too much NEW_LIST()

* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen.

* eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1.
  [ruby-dev:28585]

* parse.y (arg): use NODE_ARGSCAT for placeholder.

* lib/getoptlong.rb (GetoptLong::get): RDoc update patch from
  mathew &lt;meta at pobox.com&gt;.  [ruby-core:07738]

* variable.c (rb_const_set): raise error when no target klass is
  supplied.  [ruby-dev:28582]

* prec.c (prec_prec_f): documentation patch from
  &lt;gerardo.santana at gmail.com&gt;.  [ruby-core:07689]

* bignum.c (rb_big_pow): second operand may be too big even if
  it's a Fixnum.  [ruby-talk:187984]

* README.EXT: update symbol description.  [ruby-talk:188104]

* COPYING: explicitly note GPLv2.  [ruby-talk:187922]

* parse.y: remove some obsolete syntax rules (unparenthesized
  method calls in argument list).

* eval.c (rb_call0): insecure calling should be checked for non
  NODE_SCOPE method invocations too.

* eval.c (rb_alias): should preserve the current safe level as
  well as method definition.

* process.c (rb_f_sleep): remove RDoc description about SIGALRM
  which is not valid on the current implementation. [ruby-dev:28464]

 Thu Mar 23 21:40:47 2006  K.Kosako  &lt;sndgk393 AT ybb.ne.jp&gt;

* eval.c (method_missing): should support argument splat in
  super.  a bug in combination of super, splat and
  method_missing.  [ruby-talk:185438]

* configure.in: Solaris SunPro compiler -rapth patch from
  &lt;kuwa at labs.fujitsu.com&gt;.  [ruby-dev:28443]

* configure.in: remove enable_rpath=no for Solaris.
  [ruby-dev:28440]

* ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior
  of converting  OLE Variant object with VT_ARRAY|VT_UI1 and Ruby
  String object.

* ruby.1: a clarification patch from David Lutterkort
  &lt;dlutter at redhat.com&gt;.  [ruby-core:7508]

* lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems
  directories.	a patch from Eric Hodel &lt;drbrain at segment7.net&gt;.
  [ruby-core:07423]

* eval.c (rb_clear_cache_by_class): clearing wrong cache.

* ext/extmk.rb: use :remove_destination to install extension libraries
  to avoid SEGV.  [ruby-dev:28417]

* eval.c (rb_thread_fd_writable): should not re-schedule output
  from KILLED thread (must be error printing).

* array.c (rb_ary_flatten_bang): allow specifying recursion
  level.  [ruby-talk:182170]

* array.c (rb_ary_flatten): ditto.

* gc.c (add_heap): a heap_slots may overflow.  a patch from Stefan
  Weil &lt;weil at mail.berlios.de&gt;.

* eval.c (rb_call): use separate cache for fcall/vcall
  invocation.

* eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local
  functions.

* eval.c (rb_mod_local): a new method to specify newly added
  visibility &quot;local&quot;.

* eval.c (search_method): search for local methods which are
  visible only from the current class.

* class.c (rb_class_local_methods): a method to list local methods.

* object.c (Init_Object): add BasicObject class as a top level
  BlankSlate class.

* ruby.h (SYM2ID): should not cast to signed long.
  [ruby-core:07414]

* class.c (rb_include_module): allow module duplication.


git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e</message>
  <tree>d7b9fafbf530e7f476187d90043eb60a2579f50e</tree>
  <committer>
    <name>matz</name>
    <email>matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
  </committer>
</commit>
