merge revision(s) 44402: [Backport #9301]

	* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Declare a constant
	  `OP_MSIE_SSLV2_RSA_PADDING` only if the macro is defined.  The
	  `SSL_OP_MSIE_SSLV2_RSA_PADDING` has been removed from latest
	  snapshot of OpenSSL 1.0.1.  [Fixes GH-488]


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

	* ext/bigdecimal/bigdecimal.c (BigDecimal_divide): Add an additional
	  digit for the quotient to be compatible with bigdecimal 1.2.1 and
	  the former.  [ruby-core:59365] [#9316] [#9305]

	* test/bigdecimal/test_bigdecimal.rb: tests for the above change.

	* ext/bigdecimal/bigdecimal.gemspec: bigdecimal version 1.2.4.


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

	* configure.in: use $@ instead of $(.TARGET) because .TARGET is not
	  supported by GNU make.


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

	* configure.in: let mingw do something black-magic, and check if
	  _gmtime64_s() is available actually.

	* win32/win32.c (gmtime_s, localtime_s): use _gmtime64_s() and
	  _localtime64_s() if available, not depending on very confusing
	  mingw variants macros.  based on the patch by phasis68 (Heesob
	  Park) at [ruby-core:58764].  [ruby-core:58391] [Bug #9119]


git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/branches/ruby_2_1@44774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 44455,44458,44510: [Backport #9349]

	* vm_insnhelper.c (vm_search_super_method): direct superclass of a
	  module is found when super called in a Method object generated a
	  method defined in a module, call method_missing in that case.
	  [ruby-core:59358] [Bug #9315]

	* proc.c (mnew_from_me): keep iclass as-is, to make inheritance
	  chain consistent.  [ruby-core:59358] [Bug #9315]

	* proc.c (method_owner): return the original defined_class from
	  prepended iclass, instead.


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

	* lib/rubygems:  Update to RubyGems master 21e409d / RubyGems 2.2.1.
	  See http://rubygems.rubyforge.org/rubygems-update/History_txt.html
	  for a list of bug fixes.

	* test/rubygems:  ditto.


git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/branches/ruby_2_1@44778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Revert r44778 #9375

It breaks test-all if all tests are in a single process


git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/branches/ruby_2_1@44786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2014-02-01

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

	test_alias.rb: rename duplicate name

	* test/ruby/test_alias.rb (test_alias_wb_miss): rename duplicate
  name to get rid of redefinition.

git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/branches/ruby_2_1@44788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 44630,44631: [Backport #9403]

	* lib/delegate.rb (Delegator): keep source information methods
	  which start and end with '__'.  [ruby-core:58572] [Bug #9155]
	  which start and end with '__'.  [ruby-core:59718] [Bug #9403]


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

	* string.c (rb_str_modify_expand): enable capacity and disable
	  assocation with packed objects when setting capa, so that
	  pack("p") string fails to unpack properly after modified.


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

	* struct.c (rb_struct_set): return assigned value from setter method
	  rather than struct object. [Bug #9353] [ruby-core:59509]

	* test/ruby/test_struct.rb (test_setter_method_returns_value): add test


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

	* array.c (ary_add_hash): Fix consistency issue between Array#uniq and
	  Array#uniq! [Bug #9340] [ruby-core:59457]

	* test/ruby/test_array.rb (class TestArray): regression test for above.


git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/branches/ruby_2_1@44839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 44517,44518,44519,44523: [Backport #9354]

	* lib/timeout.rb (Timeout#timeout): when a custom exception is given,
	  no instance is needed to be caught, so defer creating new instance
	  until it is raised.  [ruby-core:59511] [Bug #9354]

	* lib/timeout.rb (Timeout#timeout): should not rescue ordinarily
	  raised ExitException, which should not be thrown.

	* lib/timeout.rb (Timeout::ExitException.catch): set @thread only if
	  it ought to be caught.

	* lib/timeout.rb (Timeout::ExitException.catch): pass arguments
	  for new instance.

	* lib/timeout.rb (Timeout::ExitException#exception): fallback to
	  Timeout::Error if couldn't throw.  [ruby-dev:47872] [Bug #9380]

	* lib/timeout.rb (Timeout#timeout): initialize ExitException with
	  message for the fallback case.


git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/branches/ruby_2_1@44841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 44490,44496: [Backport #9352]

	* ext/socket/socket.c (rsock_sys_fail_host_port): save and restore errno
	  before calling rb_sys_fail_str to prevent [BUG] errno == 0.
	  Patch by Eric Wong. [ruby-core:59498] [Bug #9352]

	* ext/socket/socket.c (rsock_sys_fail_path): ditto

	* ext/socket/socket.c (rsock_sys_fail_sockaddr): ditto

	* ext/socket/socket.c (rsock_sys_fail_raddrinfo): ditto

	* ext/socket/socket.c (rsock_sys_fail_raddrinfo_or_sockaddr): ditto

	* ext/socket/socket.c (rsock_syserr_fail_host_port): add errno
	  argument version anduse rb_syserr_fail_str() instead of
	  rb_sys_fail_str() with restoring errno.

	* ext/socket/socket.c (rsock_syserr_fail_path): ditto, and
	  rb_syserr_fail().

	* ext/socket/socket.c (rsock_sys_fail_sockaddr): ditto, use
	  rsock_syserr_fail_raddrinfo().

	* ext/socket/socket.c (rsock_sys_fail_raddrinfo): ditto.

	* ext/socket/socket.c (setup_domain_and_type): ditto.


git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/branches/ruby_2_1@44842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 44527,44552,44553:

	* vm_insnhelper.c (vm_search_super_method): when super called in a
	  bound UnboundMethod generated from a module, no superclass is
	  found since the current defined class is the module, then call
	  method_missing in that case.  [ruby-core:59619] [Bug #9377]

	* vm_insnhelper.c (vm_search_super_method): allow bound method from a
	  module, yet another method transplanting.


git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/branches/ruby_2_1@44843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 44525,44534,44537: [Backport #9381]

	* hash.c (rb_objid_hash): return hash value from object ID with a
	  salt, extract from rb_any_hash().

	* object.c (rb_obj_hash): return same value as rb_any_hash().
	  fix r44125.  [ruby-core:59638] [Bug #9381]

	* hash.c (rb_any_hash): should treat the return value of rb_objid_hash()
	  as `long', because ruby assumes the object id of an object is `long'.
	  this fixes test failures on mswin64 introduced at r44525.

	* hash.c (rb_objid_hash): should return `long'.  brushup r44534.

	* object.c (rb_obj_hash): follow above change.
	  as `long', because ruby assumes the hash value of the object id of
	  an object is `long'.


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

	* ext/thread/thread.c (rb_szqueue_push): check GET_SZQUEUE_WAITERS
	  instead of GET_QUEUE_WAITERS to prevent deadlock. Patch by Eric Wong.
	  [Bug #9302] [ruby-core:59324]

	* test/thread/test_queue.rb: add test


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

	test_weakref.rb: find collected weakref

	* test/test_weakref.rb (test_recycled): retry and find a WeakRef
  whose the target is collected, to fix circumstance dependent.

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

	* gc.c (ruby_gc_set_params): if RUBY_GC_OLDMALLOC_LIMIT is provided,
	  then set objspace->rgengc.oldmalloc_increase_limit.
	  Without this fix, the env variable RUBY_GC_OLDMALLOC_LIMIT
	  does not work.

	* gc.c (get_envparam_int): accept a value equals to lowerbounds.

	* gc.c (get_envparam_double): ditto.


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