Kill following warning.
../../../ext/psych/yaml/emitter.c: In function ‘yaml_emitter_write_block_scalar_hints’:
../../../ext/psych/yaml/emitter.c:2196:20: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
chomp_hint = "-";
^
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Kill following warning.
../../../ext/psych/yaml/emitter.c: In function ‘yaml_emitter_write_folded_scalar’:
../../../ext/psych/yaml/emitter.c:2283:5: warning: passing argument 2 of ‘yaml_emitter_write_indicator’ discards ‘const’ qualifier from pointer target type [enabled by default]
if (!yaml_emitter_write_indicator(emitter, ">", 1, 0, 0))
^
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[Feature #13097]
I confirmed current ruby (Ruby 2.4 and trunk) uses
gethostbyname() and gethostbyaddr().
Socket.gethostbyname uses getaddrinfo() and gethostbyname().
Socket.gethostbyaddr uses gethostbyaddr().
Socket.gethostbyname uses gethostbyname() to obtain alias hostnames.
RFC 3493 defines getaddrinfo()/getnameinfo() and
describes the problems of gethostbyname()/gethostbyaddr().
The problems are difficult protocol handling and thread-unsafety.
Since Ruby has GVL, the thread-unsafety doesn't cause wrong result.
But it may block other threads until finishing DNS query.
Socket.gethostbyname has the protocol handling problem.
It returns only one address family:
```
% ruby -rpp -rsocket -e 'pp Socket.gethostbyname("www.wide.ad.jp")'
["www.wide.ad.jp",
[],
10,
" \x01\x02\x00\r\xFF\xFF\xF1\x02\x16>\xFF\xFEKe\x1C",
"\xCB\xB2\x89:"]
```
www.wide.ad.jp has one IPv6 address and one IPv4 address.
But Socket.gethostbyname returns only one address family, 10 (AF_INET6),
which is the address family of the first address.
Also, Socket.gethostbyname and Socket.gethostbyaddr uses
4-bytes binary IPv4 address and 16-bytes binary IPv6 address.
This is not usual in other socket API in Ruby.
(Most socket API uses binary sockaddr string or Addrinfo object)
I think Socket.gethostbyname and Socket.gethostbyaddr are too far
from recommendable API.
So, I added deprecation description for documents for them.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* node.h (rb_node_newnode_longlife): The definition
of this function was deleted r24490.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Currently, gcc claims your coding style is not good. Shut it up.
../../../ext/psych/yaml/emitter.c: In function ‘yaml_emitter_write_plain_scalar’:
../../../ext/psych/yaml/emitter.c:28:6: warning: value computed is not used [-Wunused-value]
&& ((emitter->line_break == YAML_CR_BREAK ? \
^
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Currently, dummy_mark variable makes following warnings. Let's fix it.
../../../ext/psych/yaml/parser.c: In function ‘yaml_parser_parse_block_sequence_entry’:
../../../ext/psych/yaml/parser.c:762:21: warning: variable ‘dummy_mark’ set but not used [-Wunused-but-set-variable]
yaml_mark_t dummy_mark; /* Used to eliminate a compiler warning. */
^
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Currently, scanner.c makes following warning. Fix it.
../../../ext/psych/yaml/scanner.c: In function ‘yaml_parser_decrease_flow_level’:
../../../ext/psych/yaml/scanner.c:1189:23: warning: variable ‘dummy_key’ set but not used [-Wunused-but-set-variable]
yaml_simple_key_t dummy_key; /* Used to eliminate a compiler warning. */
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32/lib/win32/registry.rb (read, write): treat REG_NONE just like
REG_BINARY when reading and writing.
cf. [Bug #7526]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This reverts commit r60253 because it causes on error on Linux.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: imemo_mask is not a valid imemo type but
switch statements show warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This is because it would be a user error because a pattern containing
a slash shouldn't be a host name pattern but an IP address pattern.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
`test-bundled-gems` invoke test suite of bundled gems with
build environment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk (update-bundled_gems): preserve rest fields other than
names and versions, for more extensions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/runruby.rb: add RUNRUBY_USE_GDB environment variable.
If RUNRUBY_USE_GDB=true then use 'gdb --args'.
If there is 'run.gdb' file (made by 'make run.gdb') on current directory,
run gdb with this file ('gdb -x run.gdb --args').
This envval is useful when you want to run test-all (and so on) with gdb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h (rb_imemo_alloc_struct), gc.c (gc_mark_imemo): turned
next into the pointer to chain.
* parse.y (NEWHEAP): needs a cast.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (gettiemeofday, wutime): use GetSystemTimePreciseAsFileTime
instead of GetSystemTimeAsFileTime if it is available.
This patch is based on Takehiro Kubo <kubo@jiubao.org> 's one (change only
the name of wrapper function). Thanks! and sorry to late
[ruby-dev:50167] [Feature #13732]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-core:49373] [Feature #7360] proposed by Alexander E. Fischer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/test_fileutils.rb: skip tests using File.symlink if it's not
available. this problem is reported by ko1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This change is for future JIT compiler introduction.
See r60231 for the purpose.
[close GH-1721]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vm_insnhelper.h: ditto.
All changes are for reducing changes required to introduce JIT compiler.
Unlike functions that can be inlined by header, those variables should
be shared with JIT-ed code. This will help reducing cost of rebase
against upstream.
[close GH-1720]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parse_numeric): Do not literal_flush if
float is read correctly. This will fix the first
column of float.
before:
```
1.2i1.1
^
```
after:
```
1.2i1.1
^~~
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e