merge revision(s) 43112,43114,43117,43118: [Backport #8980]

	* io.c (rb_io_close_read): keep fptr in write_io to be discarded, to
	  fix freed pointer access when it is in use by other threads, and get
	  rid of potential memory/fd leak.

	* io.c (rb_io_close_write): detach tied IO for writing before closing
	  to get rid of race condition.  [ruby-list:49598]

	* io.c (rb_io_close_read): duplex IO should wait its child process
	  even after close_read.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 43177,43191: [Backport #8991]

	* lib/time.rb (Time.strptime): Use :offset.
	  Patch by Felipe Contreras.  [ruby-core:57694]

	* lib/time.rb (Time.strptime): Time.strptime('0', '%s') returns local
	  time Time object as Ruby 2.0 and before.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 43077,43078: [Backport #8999]

	* test/dl/test_base.rb: {libc, libm} detection now handle GNU/Hurd
	  correctly. Patch by Gabriele Giacone (1o5g4r8o@gmail.com).

	* test/fiddle/helper.rb: ditto.
	  [Bug #8937][ruby-core:57311]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (rb_obj_cmp): [DOC] patched by Keith Bennett
  <kbennett AT verisign.com>.  [ruby-core:57887] [Backport #9024]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 41808: [Backport #9066]

	* ext/openssl/ossl_pkey_ec.c: Ensure compatibility to builds of
	  OpenSSL with OPENSSL_NO_EC2M defined, but OPENSSL_NO_EC not
	  defined.

	* test/openssl/test_pkey_ec.rb: Iterate over built-in curves
	  (and assert their non-emptiness!) instead of hard-coding them, as
	  this may cause problems with respect to the different availability
	  of individual curves in individual OpenSSL builds.
	  [ruby-core:54881] [Bug #8384]
	  Thanks to Vit Ondruch for providing the patch!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 42713: [Backport #8792]

	* configure.in (sys/pstat.h): fix missing header check for
	  missing/setproctitle.c on HP-UX.  [ruby-core:56644] [Bug #8792]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 42908,42918: [Backport #8864]

	test_sprintf_comb.rb: split tests

	* test/ruby/test_sprintf_comb.rb (test_format_integer),
  (test_format_float): split huge tests by the formats.
	* vsnprintf.c (MAXEXP, MAXFRACT): calculate depending on constants in
	  float.h.

	* vsnprintf.c (BSD_vfprintf): limit length for cvt() to get rid of
	  buffer overflow.  [ruby-core:57023] [Bug #8864]

	* vsnprintf.c (exponent): make expbuf size more precise.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 42994: [Backport #8913]

	* lib/gserver.rb: [DOC] correct gserver.rb license [Bug #8913]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 43110,43155: [Backport #8768]

	* lib/tempfile.rb (Tempfile#unlink): finalizer is no longer needed
	  after unlinking.  patched by by normalperson (Eric Wong) at
	  [ruby-core:56521] [Bug #8768]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 42040,42041,42047,42068,42069: [Backport #8654]

	* array.c (rb_ary_count): iterate items appropriately.
	  [Bug #8654]

	* array.c (rb_ary_count): check length to avoid SEGV
	  while iterating. Remove other pointer loop when arg is given.

	* test/ruby/test_array.rb (test_count): add test for bug.
	  [ruby-core:56072] [Bug #8654]

	* test/ruby/test_array.rb (test_count): add a test case for #count
	  with an argument. See Bug #8654.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2013-11-01

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 43413: [Backport #9048]

	* parse.y: Remove +(binary) and -(binary) special cases
	  [Feature #9048]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 41829: [Backport #8384]

	* test/openssl/test_pkey_ec.rb: Skip tests for "Oakley" curves as
	  they are not suitable for ECDSA.
	  [ruby-core:54881] [Bug #8384]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 43775:

* util.c (ruby_strtod): ignore too long fraction part, which does not
  affect the result.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 43780:

* util.c (ruby_strtod): BigMath requires more precision.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e