array.c: return first unique element in Array#uniq

* 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://ci.ruby-lang.org/ruby/trunk@44512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2014-01-07

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ext/json: objects depend on $(ruby_headers)

* ext/json/generator/depend: add build dependencies for json extension
  Patch by normalperson (Eric Wong) [Bug #9374] [ruby-core:59609]
* ext/json/parser/depend: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	* ChangeLog:
	* lib/rubygems/basic_specification.rb (class Gem):
	* lib/rubygems/commands/contents_command.rb (prefix or only the files that are requir):
	* lib/rubygems/commands/install_command.rb (to write the specification by hand):
	* lib/rubygems/commands/setup_command.rb (class Gem):
	* lib/rubygems/commands/setup_command.rb (TEXT):
	* lib/rubygems/compatibility.rb (module Gem):
	* lib/rubygems/defaults.rb (module Gem):
	* lib/rubygems/deprecate.rb (module Gem):
	* lib/rubygems/installer.rb (class Gem):
	* lib/rubygems/platform.rb (class Gem):
	* lib/rubygems/rdoc.rb (class Gem):
	* lib/rubygems/request_set/lockfile.rb (class Gem):
	* lib/rubygems/resolver/installer_set.rb (class Gem):
	* lib/rubygems/resolver.rb (class Gem):
	* lib/rubygems/specification.rb (class Gem):
	* lib/rubygems/test_case.rb (class Gem):
	* lib/rubygems/test_case.rb (Also):
	* lib/rubygems/uninstaller.rb (class Gem):
	* lib/rubygems.rb (module Gem):
	* test/rubygems/test_gem.rb (class TestGem):
	* test/rubygems/test_gem_commands_contents_command.rb (lib):
	* test/rubygems/test_gem_commands_environment_command.rb (class TestGemCommandsEnvironmentCommand):
	* test/rubygems/test_gem_commands_install_command.rb (ERROR):
	* test/rubygems/test_gem_commands_update_command.rb (class TestGemCommandsUpdateCommand):
	* test/rubygems/test_gem_dependency_installer.rb (class TestGemDependencyInstaller):
	* test/rubygems/test_gem_installer.rb (load Gem):
	* test/rubygems/test_gem_installer.rb (gem):
	* test/rubygems/test_gem_request_set_lockfile.rb (GEM):
	* test/rubygems/test_gem_request_set_lockfile.rb (DEPENDENCIES):
	* test/rubygems/test_gem_specification.rb (dependencies):
	* test/rubygems/test_gem_specification.rb (duplicate dependency on b):
	* test/rubygems/test_gem_uninstaller.rb (class TestGemUninstaller):


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_timeout.rb: shorten waiting times

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
timeout.rb: defer creating custom exception

* 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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
timeout.rb: fix for ExitException

* 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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
timeout.rb: unused attribute

* lib/timeout.rb (Timeout::ExitException): remove unused attribute,
  klass.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
timeout.rb: current_target

* lib/timeout.rb (Timeout::ExitException#target): rename attribute.

* lib/timeout.rb (Timeout::ExitException.current_target): extract a
  method to achieve the target.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
timeout.rb: revert r44520

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c:  Fix typo in an error message

s/unsgined/unsigned/

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
lib/timeout.rb: fallback to Timeout::Error

* 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://ci.ruby-lang.org/ruby/trunk@44523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2014-01-08

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
object.c: hash value from objid with salt

* 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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rubygems/test_case.rb: fix errors in mkmf tests

* lib/rubygems/test_case.rb (Gem#teardown): BASERUBY is not set
  usually.  fix errors in mkmf tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vm_insnhelper.c: revive r44455 for bound module method

* 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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/psych/lib/psych/visitors/to_ruby.rb: anonymous structs
  should be able to roundtrip.  Thanks @splattael!

* test/psych/test_object_references.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2014-01-09

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings with
  quotes should not have changed.  [ruby-core:59316] [Bug #9300]

* ext/psych/lib/psych.rb: fixed missing require.

* test/psych/test_string.rb: test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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.


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