merge revision(s) r45271: [Backport #9592] [Backport #9671]

	* ext/openssl/ossl.c (ossl_make_error): check NULL for unknown
	  error reasons with old OpenSSL, and insert a colon iff formatted
	  message is not empty.


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

	* gc.c: Fix up default GC params by @csfrancis [fix GH-556]


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

	* ext/psych/lib/psych/visitors/yaml_tree.rb: support dumping Encoding
	  objects.

	* ext/psych/lib/psych/visitors/to_ruby.rb: support loading Encoding
	  objects.

	* test/psych/test_encoding.rb: add test

	* ext/psych/lib/psych.rb: add version


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r45453,r45455,r45577: [Backport #9798]

	* ext/psych/lib/psych.rb: Merge psych-2.0.5. bump version to
	  libyaml-0.1.6 for CVE-2014-2525.

	* ext/psych/yaml/config.h: ditto.

	* ext/psych/yaml/scanner.c: ditto.

	* ext/psych/yaml/yaml_private.h: ditto.

	* ext/psych/psych.gemspec: update gemspec for psych-2.0.5


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

	* ext/bigdecimal/bigdecimal.c (BigDecimal_initialize): Insert GC guard.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto.


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

	* gc.c (gc_before_sweep): cap `malloc_limit' to
	  gc_params.malloc_limit_max.  It can grow and grow with such case:
	    `loop{"a" * (1024 ** 2)}'
	  [Bug #9687]
	  This issue is pointed by Tim Robertson.
	  http://www.omniref.com/blog/blog/2014/03/27/ruby-garbage-collection-still-not-ready-for-production/


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

	* gc.c (rb_gc_writebarrier): drop special case for big hash/array
	  [Bug #9518]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r45298,r45311: [Backport #9518]

	test/ruby/envutil.rb: compare RSS to check memory leak

	* test/ruby/envutil.rb (Test::Test#assert_no_memory_leak): compare
  also RSS if available.

	* test/ruby/memory_status.rb (Memory::Status.parse): read string
  form of an instance.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r45291,r45299,r45314,r45325: [Backport #9518]

	* ext/dl/cptr.c (dlptr_free), ext/dl/handle.c (dlhandle_free),
	  ext/fiddle/handle.c (fiddle_handle_free),
	  ext/fiddle/pointer.c (fiddle_ptr_free): fix memory leak.
	  based on the patch Heesob Park at [ruby-dev:48021] [Bug #9599].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r45595: [Backport #9743] [Backport #9745]

	* ext/openssl/ossl_pkey.c (ossl_pkey_verify): as EVP_VerifyFinal()
	  finalizes only a copy of the digest context, the context must be
	  cleaned up after initialization by EVP_MD_CTX_cleanup() or a
	  memory leak will occur.  [ruby-core:62038] [Bug #9743]


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

	* gc.c (gc_after_sweep): suppress unnecessary expanding heap.
	  Tomb heap pages are freed pages here, so expanding heap is
	  not required.


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

	test_gc.rb: relax assertion

	* test/ruby/test_gc.rb (test_profiler_total_time): GC time may be
  shorter than the timer resolution.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r45190,r45202,r45204,r45713: [Backport #9586]

	configure.in: define SET_THREAD_NAME

	* configure.in (SET_THREAD_NAME): define according to
  pthread_setname_np variations.
	* configure.in: correct pthread_setname_np's prototype on NetBSD.
	  [Bug #9586]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r45891,r45893,r45895:

	test_beginendblock.rb, test_signal.rb: run with default handler

	* test/ruby/test_beginendblock.rb (test_propagate_signaled): run
  with default handler.

	* test/ruby/test_signal.rb (test_hup_me): ditto.

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

	envutil.rb: successfully terminated process

	* test/ruby/envutil.rb (FailDesc): allow successfully terminated
  process without a signal.

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