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