merge revision(s) r46417,r46418: [Backport #9939]

	* array.c (yield_indexed_values): extract from permute0(),
	  rpermute0(), and rcombinate0().

	* array.c (rb_ary_combination): iterate on a shared copy, and use
	  array of indexes instead of array of chosen objects.
	  [ruby-core:63149] [Bug #9939]


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