merge revision(s) 43092: [Backport #8969]

	* gc.c (rb_gc_disable): do rest_sweep() before disable GC.
	  This fix may solve a failure of
	  TestTracepointObj#test_tracks_objspace_events
	  [test/-ext-/tracepoint/test_tracepoint.rb:43].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43220 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_2_0_0@43221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 43077,43078: [Backport #8937]

	* 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_2_0_0@43225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 43179,43180,43181,43192,43193: [Backport #8990] [Backport #9000]

	* configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions
	  from cont.c

	* cont.c (FIBER_USE_NATIVE): split long conditions.

	* cont.c: disable FIBER_USE_NATIVE on GNU/Hurd because it doesn't
	  support a combination getcontext() and threads. Patch by
	  Gabriele Giacone (1o5g4r8o@gmail.com). [Bug #8990][ruby-core:57685]


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

	* process.c (rb_fork_internal): remove cloexec setting on pipes
	  created by rb_cloexec_pipe.  patch by normalperson (Eric Wong) at
	  [ruby-core:56523].  [Bug #8769]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 42040,42041,42047: [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_2_0_0@43228 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_2_0_0@43229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 43208: [Backport #9003]

	* compar.c (cmp_eq): fail if recursion.  [ruby-core:57736] [Bug #9003]

	* thread.c (rb_exec_recursive_paired_outer): new function which is
	  combinnation of paired and outer variants.


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

	Suppress warnings.


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

	* win32/file.c (rb_file_expand_path_internal): fix memory leaks at
	  a non-absolute home exception.


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

	* vm_insnhelper.c (vm_call_method): set ci->me to 0 when the
	  original method of a refined method is undef to avoid SEGV.

	* vm_method.c (rb_method_entry_without_refinements): return 0 when
	  the original method of a refined method is undef to avoid SEGV.

	* test/ruby/test_refinement.rb: related test.


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

	* encoding.c (load_encoding): should preserve outer errinfo, so that
	  expected exception may not be lost.  [ruby-core:57949] [Bug #9038]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43414 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_2_0_0@43415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rubygems: Update to RubyGems 2.0.12. [ruby-core:57818]
  [Backport #9014]
  the patch is provided by drbrain (Eric Hodel).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (gc_prof_set_heap_info): fix compile error when
  GC_PROFILE_MORE_DETAIL != 0.
  the patch is provided by ko1 (Koichi Sasada).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rubygems: Update to RubyGems 2.0.13. [ruby-core:58031]
  [Backport #9052]
  the patch is provided by drbrain (Eric Hodel).


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

	* 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!

	* 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_2_0_0@43481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 43398,43407,43408,43417: [Backport #9044]

	* win32/Makefile.sub (config.h): VC 2013 supports C99 mathematics
	  functions.  [ruby-core:57981] [Bug #9044]

	* include/ruby/win32.h (rb_infinity_float): suppress overflow in
	  constant arithmetic warnings.  [ruby-core:57981] [Bug #9044]


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

	* ext/socket/init.c (cloexec_accept): Fix a compile error on
	  Debian GNU/kFreeBSD.  Consider HAVE_ACCEPT4 is defined
	  but SOCK_CLOEXEC is not defined.


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

	vm_method.c: constify

	* vm_method.c (rb_resolve_refined_method): constify.

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