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

6614 Коммитов

Автор SHA1 Сообщение Дата
ko1 d8eb7f3c0d * vm_method.c (rb_method_entry_make): fix WB miss.
Note that rb_method_entry_t::klass is not constified.
  We may  constify this field.
* test/ruby/test_alias.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 07:46:48 +00:00
naruse 2a732947a6 * process.c (make_clock_result): add :second as a unit for
Process.clock_gettime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 05:04:03 +00:00
naruse b7cbdcc5fd suppress warning: SAFE=3 does no sandboxing
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 05:03:56 +00:00
ko1 dfa892af43 * gc.c: introduce GC.verify_internal_consistency method to verify GC
internal data structure.
  Now this method only checks geneartion (old/young) consistency.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 04:12:48 +00:00
nobu 0e52301c4b test_logger.rb: fix system dependent test
* test/logger/test_logger.rb (test_shifting_size_not_rotate_too_much):
  useless test on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-15 09:25:05 +00:00
nobu 0bb4934afb test_dir.rb: fix system dependent test
* test/ruby/test_dir.rb (test_symlinks_not_resolved): fix system
  dependent test which has no meanings unless symlink is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-15 07:41:59 +00:00
nobu b3348ddd4d envutil.rb: reduce wait
* test/ruby/envutil.rb (EnvUtil.diagnostic_reports): reduce watching
  interval.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 22:34:47 +00:00
nobu b46441824f test_process.rb: handshake
* test/ruby/test_process.rb: handshake by pipe instead of sleep.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 22:34:43 +00:00
nobu 0b84ee8f7b test_thread.rb: timing issues
* test/ruby/test_thread.rb: get rid of timing issues and reduce
  sleep times.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 22:03:24 +00:00
nobu 8d0b8c879f test_thread.rb: assert_operator for comparison
* test/ruby/test_thread.rb (test_priority): use assert_operator
  for comparison instead of assert_send.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 22:03:19 +00:00
nobu 637585d912 test_fiber.rb: remove core
* test/ruby/test_fiber.rb (TestFiber#invoke_rec): remove core dump
  files by stack overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 20:46:44 +00:00
a_matsuda adb1ee65b7 [DOC] Correct a couple of typos in comments by @dvsuresh [Fixes GH-482]
* doc/ChangeLog-YARV:  Correct a typo in comment
* lib/rubygems/specification.rb:  ditto.
* test/rexml/data/tutorial.xml:  ditto.
* test/ruby/test_settracefunc.rb:  ditto.
* tool/instruction.rb:  ditto.

https://github.com/ruby/ruby/pull/482
[ci-skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 10:54:54 +00:00
nobu 91afce9afa vm_insnhelper.c: post arguments as mandatory
* vm_insnhelper.c (vm_callee_setup_arg_complex): count post
  arguments as mandatory arguments.  [ruby-core:57706] [Bug #8993]
* vm_insnhelper.c (vm_yield_setup_block_args): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 08:39:17 +00:00
nobu 95ed081663 logger.rb: fix extra log ratation
* lib/logger.rb (lock_shift_log): no need to rotate the log file
  if it has been rotated by another process.  based on the patch
  by no6v (Nobuhiro IMAI) in [ruby-core:58620].  [Bug #9133]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 05:43:01 +00:00
nobu 742659cb6c envutil.rb: refine messages
* test/ruby/envutil.rb (assert_file_predicate): place rest
  arguments after predicate name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 05:42:57 +00:00
nobu 7f83b7872a Additional test coverage to Enumerator#peek.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 04:17:06 +00:00
nobu 14557c7829 Additional test coverage to Dir class. Dir['**/*'] should not resolve symlinks.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 04:17:04 +00:00
nobu cb7076696c Additional test coverage to DateTime comparison (sub millisecond).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 04:17:03 +00:00
nobu b83d68a38f proc.c: method by respond_to_missing?
* proc.c (mnew_from_me): method by respond_to_missing? should be
  owned by the original class.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 04:02:00 +00:00
nobu a370556cd2 object.c: check const names
* object.c (rb_mod_const_get, rb_mod_const_defined): check
  constant names more strictly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 03:38:22 +00:00
nobu 241ca7bfff object.c: nested path const_defined?
* object.c (rb_mod_const_defined): support nested class path as
  well as const_get.  [Feature #7414]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 02:25:58 +00:00
nobu db318509d5 object.c: fix typo
* object.c (rb_mod_const_get): fix typo.  should use SYM2ID() not
  ID2SYM().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 02:24:35 +00:00
akr 4fd53e476e * ext/socket/lib/socket.rb: Don't test $! in "ensure" clause because
it may be set before the body.
  Reported by ko1 and mrkn.  [ruby-core:59088] [Bug #9247]

* lib/cgi/core.rb: Ditto.

* lib/drb/ssl.rb: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 16:11:12 +00:00
nobu b7c2f5bc93 proc.c: fix inherited owner
* proc.c (mnew_from_me): achieve the original defined_class from
  prepended iclass, to fix inherited owner.
* proc.c (method_owner): return the defined class, but not the
  class which the method object is created from.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 15:18:12 +00:00
nobu 537f327653 test_weakmap.rb: fix test
* test/ruby/test_weakmap.rb (test_include?): create target object in a
  block, so that collected soon as possible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 14:50:00 +00:00
nobu 36e09fc28b test/ruby: better assertions
* test/ruby: use better assertions instead of mere assert.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 14:20:53 +00:00
nobu 5bff643540 test_weakmap.rb: fix test
* test/ruby/test_weakmap.rb (test_include?): Object.new does not
  excute the block, use tap.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 14:03:48 +00:00
nobu b71956d12b proc.c, vm_method.c: fix super and alias
* proc.c (method_owner): return the class where alias is defined, not
  the class original method is defined.
* vm_method.c (rb_method_entry_make, rb_alias): store the originally
  defined class in me.  [Bug #7993] [Bug #7842] [Bug #9236]
* vm_method.c (rb_method_entry_get_without_cache): cache included
  module but not iclass.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 13:29:23 +00:00
nobu f1f609bc22 test_weakmap.rb: fix test
* test/ruby/test_weakmap.rb (test_include?): isolate weak
  referenced object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 13:29:07 +00:00
nobu 3ac0ec4ecd test/ruby: better assertions
* test/ruby: use better assertions instead of mere assert.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 09:18:05 +00:00
nobu 287d2adab0 assertions.rb: last match in assert_raise_with_message
* lib/test/unit/assertions.rb (assert_raise_with_message): set
  caller's last match if expected is a Regexp.

* test/ruby/test_arity.rb (err_mess): use assert_raise_with_message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 09:17:55 +00:00
ko1 0aed7c6874 * error.c: add Exception#backtrace_locations.
Now, there are no setter and independent from Exception#backtrace.
  [Feature #8960]
* eval.c (setup_exception): set backtrace locations for `bt_location'
  special attribute.
* vm_backtrace.c (rb_backtrace_to_location_ary): added.
* internal.h: ditto.
* test/ruby/test_backtrace.rb: add a test for
  Exception#backtrace_locations.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 04:31:06 +00:00
drbrain d35e7b5be2 * lib/rubygems/request_set/lockfile.rb: Import RubyGems master a8d0669
with a 1.8.7 compatibility fix.
* test/rubygems/test_gem_request_set_lockfile.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 01:04:36 +00:00
drbrain 8fadbe5f3e * lib/rubygems: Update to RubyGems master ddac51f. Changes:
* Allow override for the shared gem installation directory for
    rubygems packagers.

  * Lock gem cache files for read and write to improve thread safety.

  * Use io/console when available.

  * Minor cleanup.

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 00:51:04 +00:00
mrkn df33325192 * ext/bigdecimal/bigdecimal.c (VpSetPTR): fix for limitation of the resulting
precision.

* test/bigdecimal/test_bigdecimal.rb (test_limit): add tests for the above
   change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12 17:02:27 +00:00
a_matsuda 8920ac2972 * doc/contributing.rdoc: [DOC] Fix typo in comments by @dvsuresh [Fixes GH-475]
* ext/openssl/ossl_ssl.c: ditto.
* test/ruby/test_m17n.rb:  ditto.

https://github.com/ruby/ruby/pull/475
[ci-skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12 07:21:19 +00:00
nobu 994bb6d36d test_weakref.rb: use single level WeakRef
* test/test_weakref.rb (make_weakref): return single level
  WeakRef, instead of multiple level, since the second level
  object may be still alive even after the final object get
  finalized, in test_recycled.

* test/test_weakref.rb (test_ref): move living object assertions
  from test_recycled.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12 06:17:23 +00:00
ko1 919f1438ae * eval.c (rb_raise_jump): call c_return hook immediately after
popping `raise' frame.
  Patches by deivid (David Rodriguez). [Bug #8886]
* test/ruby/test_settracefunc.rb: catch up this fix.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 07:53:16 +00:00
ko1 78d7aa8ae3 revert r44133. See https://bugs.ruby-lang.org/issues/8886 details
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 07:41:14 +00:00
nobu 740535f843 hash.c: reject should return a plain hash
* hash.c (rb_hash_reject): return a plain hash, without copying
  the class, default value, instance variables, and taintedness.
  they had been copied just by accident.
  [ruby-core:59045] [Bug #9223]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 07:01:29 +00:00
ko1 a4cbd6412a * eval.c (rb_raise_jump): pop frame after setup exception.
Patches by deivid (David Rodriguez). [Bug #8886]
* test/minitest/test_minitest_unit.rb: catch up this change.
* test/ruby/test_backtrace.rb: ditto.
* test/ruby/test_settracefunc.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 03:39:52 +00:00
nobu 2c11ccb861 envutil.rb: backtrace may not be present
* test/ruby/envutil.rb (assert_separately): SystemStackError at
  machine stack overflow on platforms where sigaltstack is
  unavailable does not have backtrace.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 01:48:17 +00:00
drbrain d6a5fe709e * lib/rubygems: Update to RubyGems master ec8ed22. Notable changes
include:

  * Renamed extension_install_dir to extension_dir (backwards
    compatible).

  * Fixed creation of gem.deps.rb.lock file from
    TestGemRequestSet#test_install_from_gemdeps_install_dir

  * Fixed a typo and some documentation.

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 19:54:19 +00:00
marcandre af4e6084d0 * insns.def: Fix optimization bug of Float#/ [Bug #9238]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 18:18:31 +00:00
nobu 037a9d0655 array.c, hash.c: add salt
* array.c (rb_ary_hash): add salt to differentiate false and empty
  array.  [ruby-core:58993] [Bug #9231]
* hash.c (rb_any_hash, rb_hash_hash): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 14:44:51 +00:00
nobu e5b5ee7487 test_exception.rb: ignore SystemStackError
* test/ruby/test_exception.rb (test_machine_stackoverflow): ignore
  propagated SystemStackError, which has not bee rescued in the
  child process by unknown reason.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 14:02:16 +00:00
nobu 7e47f6838a envutil.rb: ensure errors
* test/ruby/envutil.rb (assert_separately): dump error and
  assertions by END to ensure outputs even if failed to catch the
  raised exception.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 14:02:14 +00:00
nobu 0ede9926f7 openssl/digest.rb: get rid of deprecated class
* ext/openssl/lib/openssl/digest.rb (digest, hexdigest): create
  new instance and call on it directly, to get rid of deprecated
  class OpenSSL::Digest::Digest.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 07:16:01 +00:00
nobu 0326725b24 gc.c: check arguments first
* gc.c (wmap_aset): check if both arguments are able to finalize
  before setting finalizers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 05:17:19 +00:00
nobu 9bd802f556 gc.c: fix WeakMap#inspect
* gc.c (wmap_inspect_i): fix key/value order.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 05:02:17 +00:00