merge revision(s) 41325: [Backport #8554]

* gc.c: Fixup around GC by MALLOC.
  Add allocate size to malloc_increase before GC
  for updating limit in after_gc_sweep.
  Reset malloc_increase into garbage_collect()
  for preventing GC again soon.
  this backport patch is written by nari.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@41624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commit miss, revert previous commit.


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

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

* gc.c: Fixup around GC by MALLOC.
  Add allocate size to malloc_increase before GC
  for updating limit in after_gc_sweep.
  Reset malloc_increase into garbage_collect()
  for preventing GC again soon.
  this backport patch is written by nari.


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

	bignum.c: suppress an empty-body warning

	* bignum.c (bigdivrem): move decrement to the loop body, to suppress
  an empty-body warning.

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

	* ext/socket/extconf.rb:  Enable RFC 3542 IPV6 socket options for OS X
	  10.7+.  [ruby-trunk - Bug #8517]


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

	* io.c (io_getc): fix 7bit coderange condition, check if ascii read
	  data instead of read length. [ruby-core:55444] [Bug #8516]


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

	* class.c (include_modules_at): invalidate method cache if included
	  module contains constants

	* test/ruby/test_module.rb: add test


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

	* intern.h: remove dangling rb_class_init_copy declaration
	  [ruby-core:55120] [Bug #8434]


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

	* lib/net/imap.rb (capability_response): should ignore trailing
	  spaces.  Thanks, Peter Kovacs.  [ruby-core:55024] [Bug #8415]

	* test/net/imap/test_imap_response_parser.rb: related test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@41647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 40525,40526,40528,40530: [Backport #8345]

	proc.c: remove unnecessary static function

	* proc.c (proc_lambda): remove and use rb_block_lambda directly
  instead.
	* include/ruby/intern.h (rb_block_lambda): add declaration instead of
	  deprecated rb_f_lambda.

	* proc.c (mproc, mlambda): use frozen core methods instead of plain
	  global methods, so that methods cannot be overridden.
	  [ruby-core:54687] [Bug #8345]

	* vm.c (Init_VM): define proc and lambda on the frozen core object.

	* defs/id.def (predefined): add "idProc".

	* proc.c (mnew, mproc, mlambda): use predefined IDs.

	* vm.c (Init_VM): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@41649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 41342,41359,41361: [Backport #8341]

	test/ruby/test_proc.rb: tests for [Bug #8341]
	* include/ruby/intern.h, proc.c (rb_method_call_with_block):
	  new function to invoke a Method object with a block passed
	  as an argument.

	* proc.c (bmcall): use the above function to avoid a block sharing.
	  [ruby-core:54626] [Bug #8341]

	* test/ruby/test_proc.rb (TestProc#test_block_persist_between_calls):
	  run related tests.

	* test/ruby/test_proc.rb (TestProc#test_block_given_method_to_proc):
	  run test for r41359.


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

	* ext/tk/extconf.rb: support s390x (Thanks to bkabrda) [ruby-trunk - Bug #5465]
	* ext/tk/extconf.rb: apply [Backport87 - Backport #5048]
	* ext/tk/lib/tk/canvas.rb, ext/tk/sample/demos-{en,jp}/{tree.rb,widget}: fix bug (Thanks to zzak) [ruby-trunk - Bug #8319]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@41651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[Backport #8328] [ruby-core:55250] Patch by funny-falcon

* benchmark/bm_hash_shift.rb: add benchmark for Hash#shift

* hash.c (rb_hash_shift): use st_shift if hash is not being iterated to
  delete element without iterating the whole hash.

* hash.c (shift_i): remove function

* include/ruby/st.h (st_shift): add st_shift function

* st.c (st_shift): ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@41652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 41343,41360,41386: [Backport #8531]

	test/ruby/test_symbol.rb: tests for [Bug #8531]
	* include/ruby/ruby.h, vm_eval.c (rb_funcall_with_block):
	  new function to invoke a method with a block passed
	  as an argument.

	* string.c (sym_call): use the above function to avoid
	  a block sharing. [ruby-dev:47438] [Bug #8531]

	* vm_insnhelper.c (vm_yield_with_cfunc): don't set block
	  in the frame.

	* test/ruby/test_symbol.rb (TestSymbol#test_block_given_to_proc):
	  run related tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@41653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_m17n.rb: assert_predicate and assert_not_predicate
  is not available on 1.9.3.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@41654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
revert r41628 because it causes memory error on mswin.


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

* ext/openssl/lib/openssl/ssl-inernal.rb (verify_certificate_identity):
  fix hostname verification. Patched by nahi.

* test/openssl/test_ssl.rb (test_verify_certificate_identity): test for
  above.


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