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
* lib/rubygems.rb: 1.8.23.2.
  [ruby-core:58757] [Backport#9193] reported by Jeremy Evans and patched
  by Eric Hodel.


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

	* ext/tk/lib/tkextlib/tktable/tktable.rb: fix bug on arguments for Proc object.

	* ext/tk/sample/scrollframe.rb: forgot a Module definition.

	* ext/tk/extconf.rb: check unsupported version of tclConfig.sh/tkConfig.sh. It is because current Ruby/Tk doesn't support Tcl/Tk8.6.

	* ext/tk/extconf.rb: change search step of Tcl/Tk libraries.

	* ext/tk/lib/tk/namespace.rb: instance_exec() cannot accept a script string.

	* ext/tk/lib/tk/msgcat.rb: bug fix on treating encodings. Now, ext/tk/sample/tkmsgcat-load_rb*.rb will work.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@44336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (rb_obj_clone): protect FL_MARK of a dest object. A lazy
  sweeper free up a dest object if a marker is invoked immediately
  following allocate a dest object in rb_obj_alloc().
  [Backport #9206]


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

	* process.c (redirect_dup2): set standard handles when new fd is stdio,
	  because if there is no allocated console at the moment Windows does
	  not automatically associate it for child process's standard handle.
	  this is adhoc workaround.
	  reported by Martin Thiede at [ruby-core:48542] [Bug #7239].

	* io.c (rb_cloexec_dup2): ditto.


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

	* test/net/imap/cacert.pem: generate new CA cert, since the last one
	  expired. [Bug #9341] [ruby-core:59459]

	* test/net/imap/server.crt: new server cert signed with updated CA.

	* test/net/imap/Makefile: add `make regen_certs` to automate this
	  process.


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