merge revision(s) 41351: [Backport #9199]

	* ext/tk/tkutil/tkutil.c: use rb_sprintf(), rb_id2str(), and
	  rb_intern_str() instead of rb_intern() and RSTRING_PTR() with
	  RB_GC_GUARD(), to prevent temporary objects from GC.
	  [ruby-core:39000] [Bug #5199]


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

	* util.c (ruby_qsort): fix potential stack overflow on a large
	  machine.  based on the patch by Conrad Irwin <conrad.irwin AT
	  gmail.com> at [ruby-core:51816].  [Bug #7772]


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

	* test/openssl/test_cipher.rb (test_aes_gcm_wrong_tag): Don't use
	  String#succ because it can make modified (wrong) auth_tag longer
	  than 16 bytes.  The longer auth_tag makes that
	  EVP_CIPHER_CTX_ctrl (and internally aes_gcm_ctrl) fail.
	  [ruby-core:55143] [Bug #8439] reported by Vit Ondruch.


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

	* tool/rbinstall.rb (Gem::Specification#collect): make stable
	  Gem::Specification.files in default .gemspecs the different order of
	  "files" in .gemspec files makes them different therefore possibly
	  conflicting in multilib scenario.  patch by vo.x (Vit Ondruch) at
	  [ruby-core:57544] [Bug #8623].


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

	tcltklib.c: create_ip_exc format argument

	* ext/tk/tcltklib.c (create_ip_exc): format argument must not be a
  dynamic string, not to contain unescaped %.

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

patch inspired from r44260 on trunk. [ruby-core:58652] [Bug #9168]

* gc.c (run_finalizer): clear th->errinfo before invoke finalizer and
  restore afterward.

* test/ruby/test_gc.rb (test_exception_in_finalizer): add test for
  above.

* vm_trace.c (rb_threadptr_exec_event_hooks_orig): clear th->errinfo
  before invoke hook.



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