Граф коммитов

5677 Коммитов

Автор SHA1 Сообщение Дата
drbrain 48d5694f7e * test/rubygems/test_require.rb: Fix tests when 'a.rb' exists.
[ruby-trunk - Bug #7749]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05 23:11:43 +00:00
drbrain 6e48ce9c11 * lib/rubygems.rb: Allow specification of directory permissions.
[ruby-trunk - Bug #7713]
* test/rubygems/test_gem.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05 23:02:00 +00:00
drbrain 7a88ad0a42 * lib/rubygems/commands/query_command.rb: Only fetch remote specs when
showing details.  [ruby-trunk - Bug #8019]  RubyGems bug #487
* lib/rubygems/remote_fetcher.rb:  ditto.
* lib/rubygems/security/policy.rb:  ditto.
* test/rubygems/test_gem_commands_query_command.rb:  Test for the
  above.

* lib/rubygems/security.rb:  Make OpenSSL optional for RubyGems.
* lib/rubygems/commands/cert_command.rb:  ditto.

* lib/rubygems/config_file.rb:  Display file with YAML error, not
  ~/.gemrc

* lib/rubygems/remote_fetcher.rb:  Only create gem subdirectories when
  installing gems.
* lib/rubygems/dependency_resolver.rb:  ditto.
* lib/rubygems/test_utilities.rb:  ditto.
* test/rubygems/test_gem_commands_fetch_command.rb:  Test for the
  above.

* lib/rubygems/spec_fetcher.rb:  Only try to upgrade
  http://rubygems.org to HTTPS
* test/rubygems/test_gem_spec_fetcher.rb:  Test for the above.

* lib/rubygems.rb:  Update win_platform? check for JRuby compatibility.

* test/rubygems/test_gem_installer.rb:  Update for Ruby 1.9.2
  compatibility


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05 22:40:53 +00:00
nobu f113ab552c class.c: check redefinition
* class.c (rb_prepend_module): check redefinition of built-in opimized
  methods.  [ruby-dev:47124] [Bug #7983]
* vm.c (rb_vm_check_redefinition_by_prepend): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05 12:36:45 +00:00
nobu 00a8203b0b test_method.rb: reduce iteration
* test/ruby/test_method.rb (TestMethod#test_bound_method_entry):
  reduce iteration.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05 12:30:27 +00:00
nobu 2ff56cc9b4 proc.c: revert r39224
* proc.c (mnew): revert r39224.  [ruby-core:53038] [Bug #7988]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05 11:29:27 +00:00
drbrain 85164e551a * lib/rubygems.rb: Bump version to 2.0.1 for upcoming bugfix release
* lib/rubygems/ext/ext_conf_builder.rb:  Restore ruby 1.8 compatibility
  for [Bug #9698]
* test/rubygems/test_gem_installer.rb:  Ditto.

* lib/rubygems/package.rb:  Restore ruby 1.8 compatibility.

* test/rubygems/test_gem_dependency_installer.rb:  Fix warnings


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05 03:31:28 +00:00
nobu b4a117f8d3 objspace.c: newly added nodes
* ext/objspace/objspace.c (count_nodes): count also newly added nodes,
  and fix key for unknown node.  patch by tmm1 (Aman Gupta) in
  [ruby-core:53130] [Bug #8014]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05 01:40:52 +00:00
nobu 4a429c11e1 enumerator.c: allow Bignum for with_index
* enumerator.c (enumerator_with_index_i): allow Bignum as offset, to
  get rid of conversion exception and integer overflow.
  [ruby-dev:47131] [Bug #8010]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05 01:20:20 +00:00
nobu a95a87c0bc ext_conf_builder.rb: install via temporary directory
* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
  fix for unusal cases again.  install to a temporary directory once
  and move instaled files to the destination directory, if it is same
  as the current directory.  [Bug #7698]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-04 06:33:48 +00:00
nobu a7a0b3ad52 ext_conf_builder.rb: remove circular dependency in install-so
* lib/rubygems/ext/ext_conf_builder.rb
  (Gem::Ext::ExtConfBuilder.hack_for_obsolete_style_gems): remove
  circular dependencies in install-so too.  [ruby-core:52882]
  [Bug #7698]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-03 03:17:50 +00:00
nobu 32458a01eb ext_conf_builder.rb: hack for obsolete sytle gems
* lib/rubygems/ext/ext_conf_builder.rb
  (Gem::Ext::ExtConfBuilder.hack_for_obsolete_sytle_gems): remove
  circular dependencies for old style gems which locate extconf.rb on
  the toplevel.  [ruby-core:53059] [ruby-trunk - Bug #7698]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-02 16:17:22 +00:00
nobu 9b79ed1292 ext_conf_builder.rb: use RUBYOPT
* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
  use RUBYOPT instead of -r option, and revert some tests.  [Bug #7698]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-02 16:16:19 +00:00
drbrain 874f8c0494 * lib/fileutils.rb: Revert r34669 which altered the way
metaprogramming in FileUtils occurred.  [ruby-trunk - Bug #7958]

* test/fileutils/visibility_tests.rb:  Refactored tests of FileUtils
  options modules to expose bug found in #7958
* test/fileutils/test_dryrun.rb:  ditto.
* test/fileutils/test_nowrite.rb:  ditto.
* test/fileutils/test_verbose.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-01 02:09:42 +00:00
drbrain a5dfaca00a * lib/rubygems/ext/builder.rb: Fix incompatibilities when installing
extensions.  Patch by Nobu.
  [ruby-trunk - Bug #7968] [ruby-trunk - Bug #7971]
* lib/rubygems/ext/ext_conf_builder.rb:  ditto.
* lib/rubygems/installer.rb:  ditto.
* test/rubygems/test_gem_ext_ext_conf_builder.rb:  Test for the above.
* test/rubygems/test_gem_installer.rb:  ditto.

* lib/rubygems/commands/sources_command.rb:  Prefer HTTPS over HTTP.
* lib/rubygems/defaults.rb:  ditto
* lib/rubygems/dependency_resolver.rb:  Ditto.
* lib/rubygems/source.rb:  ditto.
* lib/rubygems/spec_fetcher.rb:  ditto.
* lib/rubygems/specification.rb:  ditto.
* lib/rubygems/test_utilities.rb:  ditto.
* test/rubygems/test_gem.rb:  Test for the above.
* test/rubygems/test_gem_commands_sources_command.rb:  ditto.
* test/rubygems/test_gem_dependency_resolver_api_set.rb:  ditto.
* test/rubygems/test_gem_remote_fetcher.rb:  ditto.
* test/rubygems/test_gem_source.rb:  ditto.
* test/rubygems/test_gem_spec_fetcher.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-28 22:25:55 +00:00
ko1 4cf0918e8e * compile.c (iseq_compile_each): remove redundant trace(line)
instruction. for example, at the following script
  def m()
  p:xyzzy
  1
  2
  end
  compiler ignores `1' because there is no effect. However,
  `trace(line)' instruction remains in bytecode.
  This modification removes such redundant trace(line) instruction.
* test/ruby/test_iseq.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-28 14:04:53 +00:00
ko1 b0690af9a4 * iseq.c (iseq_data_to_ary): fix condition.
r34303 introduces a bug to avoid all line information from
  a result of ISeq#to_a. This is a regression problem from 2.0.0p0.
* test/ruby/test_iseq.rb: add a test of lines after ISeq#to_a.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-28 11:26:23 +00:00
drbrain a6c92a85e4 * lib/rubygems/available_set.rb: Undent for style
* lib/rubygems/dependency_installer.rb:  Pick latest prerelease gem to
  install.  Fixes RubyGems bug #468.
* test/rubygems/test_gem_dependency_installer.rb:  Test for the above.

* lib/rubygems/dependency_installer.rb:  Don't display "Done installing
  documentation" if documentation will not be installed.
* lib/rubygems/rdoc.rb:  ditto

* lib/rubygems/dependency_list.rb:  Use Array#concat for Ruby 1.x
  performance.

* lib/rubygems/installer.rb:  Use formatted program name when comparing
  executables.  RubyGems pull request #471
* test/rubygems/test_gem_installer.rb:  Test for the above.

* lib/rubygems/package.rb:  Use more explicit feature check to work
  around JRuby bug #552

* lib/rubygems/ssl_certs/GeoTrust_Global_CA.pem:  Added GeoTrust root
  certificate.

* test/rubygems/test_gem_source_list.rb:  Use "example" instead of real
  hostname


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27 23:20:57 +00:00
kou 3b6d093451 * lib/rexml/security.rb (REXML::Security): create.
* lib/rexml/rexml.rb: move entity_expansion_limit and
  entity_expansion_text_limit accessors to ...
* lib/rexml/security.rb: ... here.
* lib/rexml/document.rb: use REXML::Security.
* lib/rexml/text.rb: use REXML::Security.
* test/rexml/test_document.rb: use REXML::Security.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27 12:24:31 +00:00
nobu 6f8feb2276 test_keyword.rb: suppress warning
* test/ruby/test_keyword.rb (TestKeywordArguments#m1): suppress
  argument prefix warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-26 01:31:42 +00:00
nobu c07d78eb0e parse.y: keyword argument without paren
* parse.y (IS_LABEL_POSSIBLE): allow labels for keyword arguments just
  after method definition without a parenthesis.  [ruby-core:52820]
  [Bug #7942]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-26 01:24:52 +00:00
nobu b85978b1c8 * test/ruby/test_fnmatch.rb: use assert_file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25 14:59:24 +00:00
nobu 9d6798932f envutil.rb: rename member
* test/ruby/envutil.rb (Test::Unit::Assertions::AssertFile): rename
  member to get rid of conflict with a method of Assertions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25 14:59:21 +00:00
naruse 2d3808eeac * string.c (str_byte_substr): don't set coderange if it's not known.
[Bug #7954] [ruby-dev:47108]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25 12:18:48 +00:00
nobu 9156a04d91 test_string.rb: defer ENUMERATORS_WANTARRAY to next major
* test/ruby/test_string.rb (TestString::ENUMERATOR_WANTARRAY): defer
  new behavior to next major.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25 08:10:44 +00:00
nobu 246c3a0b7c test_string.rb: ENUMERATORS_WANTARRAY
* test/ruby/test_string.rb (TestString::ENUMERATOR_WANTARRAY): name
  test branching codition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25 08:10:40 +00:00
drbrain e276482efc * lib/rubygems/config_file.rb: Lazily load .gem/credentials to only
check permissions when necessary.  RubyGems bug #465
* test/rubygems/test_gem_config_file.rb:  Test for the above.

* test/rubygems/test_gem_commands_push_command.rb:  Remove duplicated
  test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25 07:30:41 +00:00
naruse ef33958094 Use require_relative to require local library
* from 1.9 require relative path from the file must use require_relative.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24 13:10:46 +00:00
nobu 9e0683523a test_array.rb: fix test for r39466
* test/ruby/test_array.rb (test_sample_random): remove adjustment for
  the bug fixed by r39466.  [ruby-core:52779] [Bug #7935]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24 07:48:31 +00:00
nobu d64c926eba random.c: increase limit for generic rand
* random.c (rb_random_ulong_limited): limit is inclusive, but generic
  rand method should return a number less than it, so increase for the
  difference.  [ruby-core:52779] [Bug #7935]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24 06:33:49 +00:00
drbrain 023561f704 * lib/net/http.rb: Removed duplicate Accept-Encoding in Net::HTTP#get.
[ruby-trunk - Bug #7924]
* test/net/http/test_http.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24 06:15:05 +00:00
nobu ac94eb1a91 vm_insnhelper.c: compare with me in method top cfp
* vm_insnhelper.c (vm_call_method): block level control frame does not
  have method entry, so obtain the method entry from method top-level
  control frame to be compared with refined method entry.
  [ruby-core:52750] [Bug #7925]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24 04:36:00 +00:00
nobu 45dea57588 compile.c: no keyword check if kw_rest
* compile.c (iseq_set_arguments): no keyword check if any keyword rest
  argument exists, even unnamed.  [ruby-core:52744] [Bug #7922]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-23 22:51:45 +00:00
zzak 5a34caab4f test_backtrace.rb: test Thread#backtrace_locations with range
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-23 08:08:24 +00:00
nobu 827e71bda5 test_process.rb: fix test
* test/ruby/test_process.rb (assert_fail_too_long_path): get rid of
  syntax error on sh, increase command line size until it exceeds the
  limit.  [Bug #7904]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-23 03:34:04 +00:00
nobu 3331d6774f dir.c: encoding check
* dir.c (file_s_fnmatch, fnmatch_brace): encoding-incompatible pattern
  and string do not match, instead of exception.  [ruby-dev:47069]
  [Bug #7911]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-23 00:48:44 +00:00
usa 1ad9075734 * lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
new attribute to read/write entity expansion text limit.  the default
  limit is 10Kb.

* lib/rexml/text.rb (REXML::Text.unnormalize): check above attribute.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-22 09:35:46 +00:00
naruse 7dd6e08b93 * test/test_rbconfig.rb (TestRbConfig): fix r39372.
It must see RbConfig::CONFIG instead of CONFIG.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-22 08:37:16 +00:00
nobu 3f2ce6373f random.c: fix error message
* random.c (rb_random_ulong_limited): fix error message for negative
  value.  [ruby-dev:47061] [Bug #7903]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-22 03:46:47 +00:00
nobu e51a9b49f1 test_process.rb: fix parameters
* test/ruby/test_process.rb (test_{,a}spawn_too_long_path): fix
  missing parameters in r38934.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-22 02:58:53 +00:00
nobu 2027a05247 * test/ruby/test_process.rb: remove useless sleep.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-22 02:53:54 +00:00
nobu 20fa732495 test_rbconfig.rb: honor configuration options
* test/test_rbconfig.rb (TestRbConfig): skip user defined values by
  configuration options.  [Bug #7902]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-22 02:36:48 +00:00
drbrain ac4da20aa3 * lib/rubygems/installer.rb (build_extensions): Create extension
install destination before building extension.  Patch by Kenta Murata.
  [ruby-trunk - Bug #7897]
* test/rubygems/test_gem_installer.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-21 22:05:09 +00:00
naruse e525bcd1b3 Add test for [Backport #7896] [ruby-core:52607]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-21 08:31:47 +00:00
kosaki 7c465090fd * file.c (rb_group_member): get rid of NGROUPS dependency.
[Bug #7886] [ruby-core:52537]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-21 04:40:58 +00:00
nobu 4b81b403eb enumerator.c: suppress warnings
* enumerator.c (lazy_zip_arrays_func, lazy_zip_func, lazy_take_func),
  (lazy_drop_func, lazy_drop_while_func): suppress uninitialized
  instance vriable warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-20 03:15:32 +00:00
drbrain 75eb6cc98e * lib/rubygems/commands/update_command.rb: Create the installer after
options are processed.  [ruby-trunk - Bug #7779]
* test/rubygems/test_gem_commands_update_command.rb:  Test for the
  above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-20 00:34:58 +00:00
drbrain aec0735f6d * lib/rubygems/installer.rb: Fixed placement of executables with
--user-install.  [ruby-trunk - Bug #7779]
* test/rubygems/test_gem_installer.rb:  Test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-18 23:15:49 +00:00
nobu 44c5c2a312 compar.c: inversed comarison without infinite recursion
* compar.c (rb_invcmp): compare by inversed comarison, with preventing
  from infinite recursion.  [ruby-core:52305] [Bug #7870]
* string.c (rb_str_cmp_m), time.c (time_cmp): get rid of infinite
  recursion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-17 11:55:50 +00:00
ayumin 1061371f29 * test/ruby/test_thread.rb: fixed typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 11:14:23 +00:00
ko1 b4add2ac2b * vm.c (rb_thread_mark): mark a working Proc of bmethod
(a method defined by define_method) even if the method was removed.
  We could not trace working Proc object which represents the body
  of bmethod if the method was removed (alias/undef/overridden).
  Simply, it was mark miss.
  This patch by Kazuki Tsujimoto. [Bug #7825]
  NOTE: We can brush up this marking because we do not need to mark
  `me' on each living control frame. We need to mark `me's
  only if `me' was free'ed. This is future work after Ruby 2.0.0.
* test/ruby/test_method.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 07:41:55 +00:00
ko1 7cbeff908f * proc.c (rb_binding_new_with_cfp): create binding object even if
the frame is IFUNC. But return a ruby-level binding to keep
  compatibility.
  This patch fix degradation introduced from r39067.
  [Bug #7774] [ruby-dev:46960]
* test/ruby/test_settracefunc.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 06:51:17 +00:00
kosaki e4b775882d * test/ruby/test_process.rb (test_setsid): Added a workaround for
MacOS X. Patch by nagachika. [Bug #7826] [ruby-core:52126]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14 20:01:37 +00:00
drbrain 64db9dcbd5 * lib/net/http.rb: Removed OpenSSL dependency from Net::HTTP.
* test/net/http/test_http.rb:  Remove Zlib dependency from tests.
* test/net/http/test_http_request.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14 05:32:58 +00:00
nobu 632ab19c4d class.c: cyclic prepend
* class.c (include_modules_at): detect cyclic prepend with original
  method table.  [ruby-core:52205] [Bug #7841]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14 02:08:31 +00:00
nobu bd255c4686 vm_method.c: fix method_removed
* vm_method.c: call method_removed hook on called class, not on
  prepending iclass.  [ruby-core:52207] [Bug #7843]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14 01:38:07 +00:00
nobu 01e43fb0e2 vm_method.c: fix method_removed
* vm_method.c: call method_removed hook on called class, not on
  prepending iclass.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14 01:30:47 +00:00
drbrain f58d398075 * lib/net/http: Do not handle Content-Encoding when the user sets
Accept-Encoding.  This allows users to handle Content-Encoding for
  themselves.  This restores backwards-compatibility with Ruby 1.x.
* lib/net/http/generic_request.rb:  ditto.
* lib/net/http/response.rb:  ditto
* test/net/http/test_http.rb:  Test for the above.
* test/net/http/test_http_request.rb:  ditto.
* test/net/http/test_httpresponse.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14 01:08:19 +00:00
nobu 4b75145278 proc.c: skip prepends
* proc.c (mnew): skip prepending modules and return the method bound
  on the given class.  [ruby-core:52160] [Bug #7836]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 09:38:49 +00:00
nobu aae1d28b6f proc.c: original_name
* proc.c (method_original_name): new methods Method#original_name and
  UnboundMethod#original_name.  [ruby-core:52048] [Bug #7806]
  [EXPERIMENTAL]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 09:12:04 +00:00
nobu d40ef8a85c proc.c: show the given name
* proc.c (method_inspect): show the given name primarily, and
  original_id if aliased.  [ruby-core:52048] [Bug #7806]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 09:10:12 +00:00
drbrain 7266d24aa0 * lib/rubygems.rb: Return BINARY strings from Gem.gzip and Gem.gunzip.
Fixes intermittent test failures.  RubyGems issue #450 by Jeremey
  Kemper.
* test/rubygems/test_gem.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-12 21:06:36 +00:00
naruse caa0e40f4d Suppress warnings: setting Encoding.default_external
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-12 03:22:33 +00:00
naruse edacc7d236 Get libc's path by ldd [Bug #7828] [ruby-core:52129]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-12 03:18:04 +00:00
naruse 062d2ee6f7 * ext/json: merge JSON 1.7.7.
This includes security fix. [CVE-2013-0269]
  d0a62f3ced
  https://groups.google.com/d/topic/rubyonrails-security/4_YvCpLzL58/discussion

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-12 03:05:45 +00:00
nobu 0d46721033 configure.in: sitearch
* configure.in (rubysitearchprefix): sitearchdir and vendorarchdir
  should use sitearch, not arch.  [ruby-dev:46964] [Bug #7823]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-11 04:17:22 +00:00
nobu 507477af54 Makefile.sub: sitearch
* win32/Makefile.sub (config.status): site and vendor directories
  should use sitearch, not arch.  [ruby-dev:46964] [Bug #7823]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-11 04:15:14 +00:00
naruse cf2da37701 the process maybe already finished
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-09 16:44:56 +00:00
drbrain 7f046c653c * lib/rubygems/package/old.rb: Fix behavior only on ruby 1.8.
* lib/rubygems/package.rb:  Include checksums.yaml.gz signatures for
  verification.
* test/rubygems/test_gem_package.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-09 00:24:55 +00:00
akr b7d8d0321c * test/fiddle/helper.rb: specify libc and libm locations for MirOS BSD.
* test/dl/test_base.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 16:27:17 +00:00
usa 450a515e95 * array.c (rb_ary_dup): reverted r39004. see [Bug #7768], and the
release manager finailly decided to revert it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 10:58:35 +00:00
nobu 98932f5150 eval.c: preserve errinfo
* eval.c (rb_ensure): preserve errinfo accross ensure proc before
  JUMP_TAG().  [ruby-core:52022] [Bug #7802]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 07:09:48 +00:00
nobu 49c5a3da6f envutil.rb: check termsig
* test/ruby/envutil.rb (assert_separately): check also terminating
  signal not only if core dumped.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 07:08:32 +00:00
drbrain 70fc27b7fa * lib/rdoc/generator/darkfish.rb: Set encoding on output template to
user-specified encoding.
* test/rdoc/test_rdoc_generator_darkfish.rb:  Test for above.

* lib/rdoc.rb:  Bump version


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 04:12:56 +00:00
drbrain d2be12ef61 * lib/rubygems/security/policy.rb: Raise proper exceptions when
verifying unsigned gems (instead of crashing).
* test/rubygems/test_gem_security_policy.rb:  Tests for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 02:58:19 +00:00
drbrain c5d1d12977 * test/rubygems/test_gem_dependency_installer.rb: Improve coverage of
--install-dir feature of gem install.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 01:58:59 +00:00
tenderlove 1c836f811c * ext/psych/lib/psych/visitors/yaml_tree.rb: fixing string quotation
when dumping Ruby strings. Thanks Ingy

* test/psych/test_psych.rb: appropriate tests.

* test/psych/test_yaml.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 23:54:29 +00:00
drbrain a75922010f * lib/rubygems/package/old.rb: Disallow installation of old-format
gems when a security policy is active.
	* test/rubygems/test_gem_package_old.rb:  Test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 22:48:35 +00:00
drbrain bab42629eb * lib/rubygems/dependency_installer.rb: Only install local gems if
they end in '.gem'.  Fixes github rubygems issue #407.
* test/rubygems/test_gem_dependency_installer.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 22:17:08 +00:00
usa 7d2725493e * test/rubygems/test_gem_config_file.rb
(TestGemConfigFile#test_check_credentials_permissions): skip on
  Windows. see [Bug #7784] [ruby-core:51864] and r39070.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 12:11:19 +00:00
nobu 13b11810e2 mkmf.rb: fix merge_libs
* lib/mkmf.rb (MakeMakefile#merge_libs): insert following reversal
  ordered elements just after the duplicated element, not overwriting
  successive elements.  [ruby-core:50314] [Bug #7467]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 06:33:22 +00:00
nobu fd0c338df7 test_libs.rb: new test
* test/mkmf/test_libs.rb (TestMkmf:TestLibs): tests for $libs operations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 06:32:12 +00:00
drbrain c27fd33319 * lib/rubygems/package.rb: Ensure digests are generated for signing.
* test/rubygems/test_gem_package.rb:  Test for the above.

	* lib/rubygems/security/policy.rb:  Ensure digests are present when
	  verifying a gem and match the number of signatures bidirectionally.
	* test/rubygems/test_gem_security_policy.rb:  Test for the above.

	* lib/rubygems.rb:  Documentation improvements (by zzak)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 05:56:53 +00:00
nobu 38f04d8231 test_basicinstructions.rb: fix typo
* test/ruby/test_basicinstructions.rb (test_send_opassign): fix typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 01:20:39 +00:00
nobu 46761cdb98 test_basicinstructions.rb: implementation defined
* test/ruby/test_basicinstructions.rb (test_send_opassign):
  implementation defined behavior.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 01:07:22 +00:00
nobu cbb86ec6fe test_basicinstructions.rb: fix typo
* test/ruby/test_basicinstructions.rb (test_send_opassign): fix typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 01:05:50 +00:00
marcandre 6851ad4756 * vm_insnhelper.c: attr_writer should return its argument [Bug #7773]
* test/ruby/test_basicinstructions.rb: Test for above

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 17:31:22 +00:00
kosaki 6cd1e11d01 * test/ruby/test_process.rb (test_setsid): ensure to call
Process.wait(). Reported by George Koehler. Thanks.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 06:37:28 +00:00
kosaki 88903e23dd * test/ruby/test_process.rb (test_setsid): skip when platform is
OpenBSD. Contributed from George Koehler.
  [Bug #7789] [ruby-core:51889]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 06:37:18 +00:00
nobu 5e9648be88 test_require.rb: shared drive
* test/ruby/test_require.rb (TestRequire#test_require_with_unc):
  cannot test unless the local drive is shared.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 02:17:23 +00:00
nobu 50cdfe2d51 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 00:30:19 +00:00
jeg2 b614d7823c * lib/csv.rb: Remove the dangerous serialization feature.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 18:28:26 +00:00
ktsj ca016c705f * vm.c (rb_vm_stack_to_heap): call rb_vm_get_binding_creatable_next_cfp
instead of rb_vm_get_ruby_level_next_cfp to prevent a segfault by
  calling Kernel#callcc. See r39067 for more details.
  [ruby-dev:46908] [ruby-trunk - Bug #7774]

* test/ruby/test_settracefunc.rb: add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 15:55:41 +00:00
drbrain bd5efa7ff6 * lib/rdoc/servlet.rb: Fixed root search paths, filesystem paths
instead of HTTP paths were returned.
* test/rdoc/test_rdoc_servlet.rb:  Test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 08:24:20 +00:00
nobu a106b310e5 vm_method.c: drop include_all flag
* vm_method.c (rb_obj_respond_to): drop optional include_all flag if
  respond_to? method is defined in old style.  [Bug #7722]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 07:25:27 +00:00
ko1 88101695ab * proc.c (rb_binding_new_with_cfp): permit to create binding object
of IFUNC frame.
  When `rb_binding_new_with_cfp()' is called, VM finds out the first
  normal (has iseq) frame and create a binding object of this frame
  and create Env objects. `ep's of related frames are updated
  (`ep's point Env object managed spaces).
  However, `ep' of skipped IFUNC frame was not updated and
  old invalid `ep' was remained. It causes serious problems.
  To solve this issue, permit IFUNC to create binding.
  (Maybe there is no problem on it)
  [ruby-dev:46908] [ruby-trunk - Bug #7774]
* test/ruby/test_settracefunc.rb: add a test.
* vm.c (rb_vm_get_binding_creatable_next_cfp), vm_core.h: added.
* vm_trace.c: fix to use `rb_vm_get_binding_creatable_next_cfp()'.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 06:04:59 +00:00
marcandre d22ce4a522 * numeric.c (fix_pow): Handle special cases when base is 0, -1 or +1
[Bug #5713] [Bug #5715]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 05:39:49 +00:00
marcandre 8797ebd662 * rational.c (nurat_expt): Deal with special cases for rationals 0, ±1
[bug #5713] [bug #5715]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 05:39:33 +00:00
nobu 55f0fa5a7a test_range.rb: refine message
* test/ruby/test_range.rb (TestRange#test_bsearch_with_mathn): refine
  failure messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 04:45:23 +00:00
nobu 490f1fc009 console.c: default by stty raw
* ext/io/console/console.c (rawmode_opt): use default values by `stty
  raw`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 04:27:57 +00:00