Addrinfo.getaddrinfo and .foreach now accepts :timeout in seconds as
a keyword argument. If getaddrinfo_a(3) is available, the timeout will be
applied for name resolution. Otherwise, it will be ignored.
Socket.tcp accepts :resolv_timeout to use this feature.
This commit is retry of 6382f5cc91.
Test was failed on Solaris machines which don't have "http" in
/etc/services. In this commit, use "ssh" instead.
This patch changes parse.y to only use `add_mark_object` in Ripper.
Previously we were seeing a bug in write barrier verification. I had
changed `add_mark_object` to execute the write barrier, but the problem
is that we had code like this:
```
NEW_STR(add_mark_object(p, obj), loc)
```
In this case, `add_mark_object` would execute the write barrier between
the ast and `obj`, but the problem is that `obj` isn't actually
reachable from the AST at the time the write barrier executed.
`NEW_STR` can possibly call `malloc` which can kick a GC, and since
`obj` isn't actually reachable from the AST at the time of WB execution,
verification would fail.
Basically the steps were like this:
1. RB_OBJ_WRITTEN via `add_mark_object`
2. Allocate node
3. *Possibly* execute GC via malloc
4. Write obj in to allocated node
This patch changes the steps to:
1. Allocate node
2. *Possibly* execute GC via malloc
3. Write obj in to allocated node
4. RB_OBJ_WRITTEN
This is a test extension so we basically want test failures rather
than a configure breakage but if there is no C++ compiler, we need
no test at all because there will be no chance for the tested
header file to be used later.
This makes it possible to build the ruby binary without any C++
compiler installed in a build environment.
Not the case of recent compilers, but compilers before C++11
rejected ruby.h, like https://ci.appveyor.com/project/ruby/ruby/builds/27225706/job/qjca7dpe204dytbd
This is supposedly because a struct with a member qualified with
a const effectively deletes its default copy constructor, which
is considered as being user-defined somehow. Not sure where
exactly is the phrase in the C++98 standard who allows such C /
C++ incompatibility though.
Calling some syscall functions such as Dir.chroot causes SIGSYS instead
of EPERM on Android.
This change skips all tests that stops the test-suite run.
This removes an invalid keyword argument separation warning for
code such as:
```ruby
def foo(arg)
arg
end
kw = {}
foo(*[1], **kw)
```
This warning was caused because the remove_empty_keyword_hash
was set based on a comparison with two variables, and in this
case, one of the variables was updated after the check and we
need to use the updated variable.
Simplify things by just inlining the comparison.
Addrinfo.getaddrinfo and .foreach now accepts :timeout in seconds as
a keyword argument. If getaddrinfo_a(3) is available, the timeout will be
applied for name resolution. Otherwise, it will be ignored.
Socket.tcp accepts :resolv_timeout to use this feature.
As this tool has been intended to use in a working directory,
assume that the toplevel directory is under the VCS, and SVN will
no longer be canonical.