summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-21Deprecation document for gethostbyname,gethostbyaddr.akr
[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
2017-10-21node.h: Remove a not used function prototypeyui-knk
* 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
2017-10-21kill "value computed is not used" warningkosaki
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
2017-10-21kill variable set but not used warningkosaki
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
2017-10-21kill "variable set but not used" warningkosaki
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
2017-10-21Fix bug about String#scanf("%a")nobu
* lib/scanf.rb (extract_float, initialize): allow to omit a sign on the binary exponent. [ruby-core:82435] [Bug #13833] [Fix GH-1689] From: tarotaro0 <tarousann11922960@yahoo.co.jp> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21add example for Socket.gethostbyaddr.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21gc.c (rb_raw_obj_info): suppress a warningnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21gc.c (rb_raw_obj_info): adjust indentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Treat REG_NONE just like REG_BINARYusa
* 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
2017-10-21Sync svn:ignore [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Revert "Dir.glob with FNM_EXTGLOB is optimized [Feature #13873]"naruse
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
2017-10-21* string.c (deleted_prefix_length, deleted_suffix_length):sonots
Add doxygen comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Dir.glob with FNM_EXTGLOB is optimized [Feature #13873]naruse
The order of resulted array is changed in some cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21fix comment abount IMEMO_FL_USHIFTtarui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21do not need to clear by NULL because of last commitko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21imemo_mask (enum) -> IMEMO_MASK (immediate value).ko1
* 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
2017-10-21Make ACL::ACLEntry not suppress IPAddr::InvalidPrefixErrorknu
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
2017-10-21* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21[EXPERIMENTAL] Added test-bundled-gems task.hsbt
`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
2017-10-21common.mk: preserve rest fields of bundled_gemsnobu
* 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
2017-10-21add RUNRUBY_USE_GDB envvar for runruby.rb.ko1
* 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
2017-10-21fix up imemo_allocnobu
* 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
2017-10-21vcs.rb: try to extract revision number from tagsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21RbConfig::LIMITS is provided by rbconfig/sizeof.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21declare variables once for each line in pathname.c.akr
This ease adding/deleting variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Use GetSystemTimePreciseAsFileTime on recent Windowsusa
* 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
2017-10-21Replace NODE_ALLOCA with T_IMEMO (imemo_alloc)mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Pathname#glob method implemented.akr
[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
2017-10-21File.symlink is not potableusa
* 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
2017-10-21lib/open3.rb: accept IO-like object for :stdin_data argument.akr
Open3.capture3, Open3.capture2, Open3.capture2e accepts IO-like object for :stdin_data argument. [ruby-core:80936] [Feature #13527] proposed by janko. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21vm.c, vm_insnhelper.h: export symbols of VM serialsk0kubun
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
2017-10-21[Feature #13712] String#start_with? supports regexpnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21[DOC] describe methods used for src and dst argument.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21lib/open-uri.rb: accept :encoding option as well as encoding in mode string.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21vm_core.h: export symbols of shared variablesk0kubun
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
2017-10-21Update NEWS for Hash#sliceglass
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21hash.c: Add Hash#sliceglass
* hash.c (rb_hash_slice): add Hash#slice [Feature #8499] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Replace `to_a[1..-1]` on a MatchData with `captures`knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Remove redundant calls of String#chrknu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21assertion for r60225nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Do not literal_flush if float is read correctlyyui-knk
* 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
2017-10-21moved node generation for dregex_once to parse.ynobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Fix build on Windowsyui-knk
* parse.y (new_cdecl_gen): Rename local variable name from cdecl to nd_cdecl. We can not use cdecl on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-20* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-20* 2017-10-21svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-20Store token first column number on RNodeyui-knk
* node.c (A_NODE_HEADER): Print column number. * node.h (nd_column, nd_set_column): Define getter/setter macros for column number of RNode. * parse.y: Set first column number of tokens. Notes: * Use `@n` to get the location of token in parse.y. * When we use `@n`, arguments of yyerror and yylex are changed. * Initialize column of nodes with -1 to make it easy to detect nodes which we forget to set a column number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-20Merge rubygems master(ddbf3203f3857649abe95c73edefc7de7e6ecff4).hsbt
It fixed: https://github.com/rubygems/rubygems/issues/2041 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-20Overwrite destination symlink file if `remove_destination` is set.hsbt
[Bug #13914][ruby-core:82846] Patch by @mzp https://github.com/ruby/fileutils/pull/9 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-20* 2017-10-20svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e