FP arithmetic can lose precision in some cases leading to
premature wakeup and wasting CPU cycles.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
FP arithmetic can lose precision in some cases leading to
premature wakeup and wasting CPU cycles.
Convert to use timeval_* functions for now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
No point for a fixed 1s value, and I plan on eliminating double
timeouts from internal API.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The optimization in [Feature #13355] needs to be detected
differently to work with "frozen_string_literal: true"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (rb_exec_fillarg): share subsequence of argv_buf for
command_name, and copy the encoding from the command string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
`NameError.new(1,2,3)` raises
`wrong number of arguments (given 2, expected 0..1) (ArgumentError)`
in `StrandardError#initialize`, so NameError can't accept 3 or more arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
of `system` with `exception: true` like `Process::Status#inspect`
[Feature #14386] [ruby-core:85013]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (fptr_finalize_flush): removed unused assignments. if
noraise, err is never used after set.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This is redundant since r15206 /
ffe425ecaa as we no longer lock
the array during sort. Instead, fall back to Object#frozen?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This brings us up-to-date with ccan/list
5dbd87b876434dd703dfcc30cb0503118aac2076
git://git.ozlabs.org/~ccan/ccan
This is a combination of 3 commits from ccan:
list: add parens to gaurd macro args in LIST_INIT
ccan/list: Add list_empty_nocheck
list: trivial: fix typos in list_for_each_off's documentation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/ruby.h (rb_varargs_argc_valid_p): relax rb_funcall
check on extra args only if argc == 0, for the compatibility
with wrong code which is probably confused with rb_funcallv.
[Bug #14425]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (rb_w32_write): writing to closed pipe fails with
ERROR_NO_DATA but msvcrt maps it to EINVAL. map it to EPIPE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (fptr_copy_finalizer): fix inverted condition. if
finalizer does not change, pipe_list should not change too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (fptr_copy_finalizer): remove fptr from pipe_list when pipe
became ordinary file, to fix access after free. to be finalized
by pipe_finalize and being in pipe_list must match.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (pipe_register_fptr): get rid of double registration which
causes access after free and segfault.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (pipe_del_fptr): merged code for the case fptr is first to
the loop for the rest.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
clang 5.+ (tested clang 7.0.0) seems to be attempting division-by-zero
and giving a very large number for static args to rb_funcall.
* include/ruby/ruby.h (rb_varargs_bad_length): relax check for clang
* ext/-test-/funcall/funcall.c: renamed from passing_block.c
define extra_args_name function
* test/-ext-/funcall/test_funcall.rb: new test
[ruby-core:85266] [Bug #14425]
From: Eric Wong <e@80x24.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Thanks to Paul Kuruvilla <rohitpaulk@gmail.com> for the patch
* lib/net/http.rb: fix documentation for HTTP connection reuse
[ruby-core:84815] [Bug #14349]
From: Paul Kuruvilla <rohitpaulk@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk (showflags): simply show `BASERUBY` itself, because nmake does not
supports backquote notation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/setup.mak: discard output from BASERUBY command, even if
it contains multiple commands.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e