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

36608 Коммитов

Автор SHA1 Сообщение Дата
akr f20d51b0ad * process.c (has_privilege): New function.
(retry_fork_async_signal_safe): Don't use vfork() for privileged
  process.

* configure.in (getresuid): Check function.
  (getresgid): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-04 14:56:03 +00:00
hsbt d80282eecc * test/pathname/test_pathname.rb: added testcase for Pathname#mountpoint.
[fix GH-709]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-04 11:22:20 +00:00
hsbt b549ced9ed * removed symbian directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-04 11:11:12 +00:00
hsbt 8362f9b581 * symbian/*: removed Symbian support.
[Feature #10199][ruby-core:64725]
* dln.c: ditto.
* include/ruby/defines.h: ditto.
* thread_pthread.c: ditto.
* vm.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-04 11:09:32 +00:00
ko1 68f55c4b35 * dir.c (glob_helper): use #ifdef instead of #if.
gcc's -Wundef option shows warning for undefined macro.
* numeric.c (flo_is_finite_p): ditto.
* vm_dump.c (rb_vmdebug_thread_dump_state): ditto.
* vm_core.h: define VM_DEBUG_VERIFY_METHOD_CACHE to 0.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-04 08:50:31 +00:00
svn 1e55b27e2c * 2014-09-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-03 18:58:57 +00:00
normal 1540b1fe5e man/ruby.1: spelling fix ("bellow" => "below") [ci-skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-03 18:58:56 +00:00
normal 3c9e195f98 man/ruby.1: add trailing slash to URLs [ci-skip]
URLs without path component needs trailing slash.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-03 18:58:42 +00:00
akr 777d61faf4 * process.c (before_fork_ruby): Renamed from before_fork.
(after_fork_ruby): Renamed from after_fork.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-03 10:23:24 +00:00
akr ed0f2528e8 * process.c (forked_child): Removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-03 09:56:38 +00:00
nobu b46b1e3f5a object.c: fix memory leak
* object.c (rb_obj_copy_ivar): allocate no memory for empty
  instance variables.  [ruby-core:64700] [Bug #10191]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-03 07:56:09 +00:00
nobu 8322ca8a21 * tool/make-snapshot (usage): X.Y means the head of a branch now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-03 06:05:01 +00:00
nobu cf08cf97fa * tool/make-snapshot (package): no teeny means a branch since 2.1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-03 05:47:31 +00:00
akr 9b16f90692 * process.c (retry_fork_async_signal_safe): Use vfork() if available.
vfork() is still faster than fork() especially when the parent
  process uses big memory.

  ruby -rbenchmark -e 'a = "a" * 1_000_000_000; puts Benchmark.measure { system("true") }'
  fork:   0.000000   0.010000   0.010000 (  0.014968)
  vfork:  0.000000   0.000000   0.000000 (  0.000912)
  on Debian sid.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-03 03:06:17 +00:00
hsbt 51ee0a634e * test/openssl/test_pkey_rsa.rb (OpenSSL#test_sign_verify_memory_leak):
added timeout into testcase for low performance environment.
  [Bug #9984][ruby-core:63367]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-03 02:33:18 +00:00
akr 93a7bf4b17 * configure.in: Use AC_FUNC_FORK.
* io.c: Use HAVE_WORKING_FORK instead of HAVE_FORK.

* process.c: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 22:51:03 +00:00
akr 50190956c2 Ruby can delay arbitrarily because Ruby is not a realtime system,
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 15:47:53 +00:00
svn 8a4c23163c * 2014-09-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 15:13:51 +00:00
akr 34af76e318 * process.c (retry_fork_async_signal_safe): Don't return on in child
process.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 15:13:36 +00:00
akr 93621161d6 * process.c (retry_fork_async_signal_safe): Specialized version of
retry_fork respect to rb_fork_async_signal_safe.
  (retry_fork_ruby): Specialized version of retry_fork respect to
  rb_fork_ruby.
  (rb_fork_ruby): Removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 14:47:46 +00:00
akr de88408813 * process.c (send_child_error): Simplified.
(recv_child_error): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 14:27:10 +00:00
akr a78a9b0d17 * process.c (rb_fork_async_signal_safe): Inline rb_fork_internal.
(rb_fork_ruby): Ditto.
  (rb_fork_internal): Removed.
  (chfunc_protect): Removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 13:56:35 +00:00
akr 51f41f6618 * test/ruby/test_io.rb (test_new_with_block): Set autoclose to avoid EBADF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 13:45:20 +00:00
nobu 6bd80ffc22 test_io.rb: ignore stream closed IOError
* test/ruby/test_io.rb (test_readpartial_locktmp): stream closed
  IOError while reading is not a matter.  [Bug #10193]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 13:32:59 +00:00
kou 1a37c5a4b6 * Makefile.in (update-coverage): Remove a never executed line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 13:04:04 +00:00
akr 557802a1da * process.c (handle_fork_error): Extracted from retry_fork.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 11:47:35 +00:00
hsbt bd1f4738a4 * ChangeLog: added link of github issue
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 08:08:08 +00:00
hsbt 4032c76ab7 * tool/rbinstall.rb: fixed error of local installation.
[Bug #10192][ruby-core:64702]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 08:02:59 +00:00
svn 3e95253eb8 * 2014-09-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 07:59:29 +00:00
hsbt 355c032fcf * test/runner.rb: reporting test coverage for test-all with COVERAGE env.
[Feature #10189][ruby-core:64681]
* Makefile.in: added task for coverage report.
* common.mk: added definition of forked simplecov url.
* .gitignore: ignored coverage directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 07:59:18 +00:00
svn e8473a675c * 2014-09-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-01 11:17:11 +00:00
suke c5487618f5 * ext/win32ole/win32ole.c (rbtime2vtdate): try to convert millisecond
of Time object to millisecond of VT_DATE VARIANT.
* test/win32ole/test_win32ole_variant.rb
  (test_conversion_time2date_with_msec): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-01 11:16:57 +00:00
akr 8bd2d31d45 * lib/benchmark.rb: Fix a syntax error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-31 07:59:12 +00:00
nobu cf990c5ace benchmark.rb: Process::CLOCK_MONOTONIC_RAW may be unavailable
* lib/benchmark.rb (BENCHMARK_CLOCK): Process::CLOCK_MONOTONIC_RAW
  is not supported on old linux.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-31 06:05:43 +00:00
nobu d723b93038 test_benchmark.rb: use assert_in_epsilon
* test/benchmark/test_benchmark.rb (test_realtime_output): use
  assert_in_epsilon which compares in relative range, instead of
  assert_in_delta which compares in absolute range.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-31 02:49:50 +00:00
svn 3bfd894ad7 * 2014-08-31
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-30 23:53:39 +00:00
normal 3cee6a22c0 zlib: GzipReader#rewind preserves ZSTREAM_FLAG_GZFILE
* ext/zlib/zlib.c (gzfile_reset): preserve ZSTREAM_FLAG_GZFILE
  [Bug #10101]

* test/zlib/test_zlib.rb (test_rewind): test each_byte

We must preserve the ZSTREAM_FLAG_GZFILE flag to prevent
zstream_detach_buffer from:

a) returning Qnil and breaking out of the `each_byte' loop
b) yielding a large string to each_byte

Note: the test case in bug report takes a long time.  I found this
bug because I noticed the massive time descrepancy between
`each_byte' and `readbyte' loop before this patch.  With this patch,
`each_byte' and `readbyte' both take very long.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-30 23:53:28 +00:00
nobu b6c425aadd internal.h: WARN_UNUSED_RESULT
* internal.h (WARN_UNUSED_RESULT): warn unused result by gcc 3.4
  or later.

* symbol.c: declare some functions with WARN_UNUSED_RESULT.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-30 13:29:45 +00:00
normal 765e4e2ea6 symbol.c (rb_sym2id): do not return garbage object
The dynamic sym passed to rb_sym2id may be a garbage object
(as accounted for by dsymbol_check).  This fixes an occasional
segfault in "make test-all" for me.

No need to backport, this is from the new symbol GC feature.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-30 10:30:00 +00:00
nobu 42e5ff998b test_benchmark.rb: extend sleep time
* test/benchmark/test_benchmark.rb: extend sleep time, as 1ms is
  too short on some environments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-30 06:18:57 +00:00
nobu 4274b7975e benchmark.rb: prefer Process::CLOCK_MONOTONIC_RAW
* lib/benchmark.rb (BENCHMARK_CLOCK): prefer Process::CLOCK_MONOTONIC_RAW
  if available to more accurate measure.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-30 06:15:22 +00:00
tenderlove 66d3b9750b * ext/psych/lib/psych/visitors/yaml_tree.rb: fix NameError dumping and
loading. Fixes GH #85. Thanks @brentdax for the patch!
* test/psych/test_exception.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 21:41:02 +00:00
tenderlove 8662841a9b * ext/psych/lib/psych/scalar_scanner.rb: fix loading strings that
look like integers but have a newline. Fixes GH #189
* test/psych/test_string.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 21:24:33 +00:00
tenderlove 73645bb8e5 * ext/psych/lib/psych/visitors/to_ruby.rb: merge keys with a hash
should merge the hash in to the parent.
* test/psych/test_merge_keys.rb: test for change. Fixes GH #202

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 21:11:47 +00:00
svn 53220c496c * 2014-08-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 21:02:31 +00:00
tenderlove 7a5dedf25c * ext/psych/lib/psych/visitors/to_ruby.rb: quoted "<<" strings
should not be treated as merge keys.
* ext/psych/lib/psych/visitors/yaml_tree.rb: hashes with keys
  containing "<<" should roundtrip.
* test/psych/test_merge_keys.rb: test for change. Fixes GH #203

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 21:02:19 +00:00
hsbt 7df9a77da1 * test/net/imap/test_imap_response_parser.rb: removed needless code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 08:57:06 +00:00
hsbt f587cf7906 * test/rinda/test_rinda.rb: removed useless assignment variables.
* test/rss/rss-assertions.rb: ditto.
* test/rss/test_maker_itunes.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 08:37:39 +00:00
normal 343f8b02a1 string.c: remove vm_core.h dependency [ruby-core:64627]
* string.c: revert part of r47311, add rb_vm_fstring_table(),
  remove vm_core.h dependency. [ruby-core:64627]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 07:22:23 +00:00
svn 2bb4c26893 * 2014-08-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 06:30:20 +00:00