summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-21Use a mutex to make SortedSet.setup thread-safeknu
This should fix [Bug #13735]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Remove redundant use of module_evalknu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Remove not used node_type NODE_IASGN2yui-knk
* compile.c (compile_massign_opt, iseq_compile_each0): This node_type has not been used since r11813. * ext/objspace/objspace.c (count_nodes): ditto * node.c (dump_node, rb_gc_mark_node): ditto * node.h (node_type, NEW_IASGN2): ditto * parse.y (node_assign_gen): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21driver.rb: allow executing driver.rb directlyk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21The encoding of __FILE__ and __dir__ should be sameusa
* ruby.c (process_options): convert the real path of the script to locale encoding if its encoding is not locale (maybe UTF-8) on Windows/OS X. this change makes the encoding of __dir__ to the same encoding of __FILE__ when the script name is passed from commandline. * test/ruby/test_options.rb (test___dir__encoding): test for this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21driver.rb: add option to specify target with rbenvk0kubun
[close GH-1724] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Allow a SortedSet to be frozen and still functional [Bug #12091]knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21SecureRandom.alphanumeric implemented.akr
[ruby-core:68098] [Feature #10849] proposed by Andrew Butterfield. SecureRandom.choose and SecureRandom.graph is not included. (The implementation has SecureRandom.choose but it is private.) I feel the method name, SecureRandom.choose, doesn't represent the behavior well. The actual use cases of SecureRandom.graph is not obvious. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Clarify return value for assignment methods.hsbt
https://github.com/ruby/ruby/pull/1682 Patch by @sos4nt [fix GH-1682] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Clarify the behavior of IO.write without offset in write mode.hsbt
https://github.com/ruby/ruby/pull/1571 Patch by @takanabe [fix GH-1571] [Bug #11638][ruby-core:71277] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21erb.rb: specify frozen_string_literal: truek0kubun
for compilation performance. $ ruby ./benchmark/driver.rb -e "trunk::/Users/k0kubun/.rbenv/versions/trunk/bin/ruby;modified::/Users/k0kubun/.rbenv/versions/modified/bin/ruby" -d ./benchmark -p app_erb ----------------------------------------------------------- benchmark results: Execution time (sec) name trunk modified app_erb 1.911 1.885 Speedup ratio: compare with the result of `trunk' (greater is better) name modified app_erb 1.014 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21* 2017-10-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Update some words on README.md.hsbt
* Remove space on double spaces. * Capitalization of "Ruby". * Use macOS instead of OS X. https://github.com/ruby/ruby/pull/1610 Patch by @bunkrich [fix GH-1610] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Added explicitly require to example code.hsbt
https://github.com/ruby/ruby/pull/1666 Patch by @guilherme [fix GH-1666] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Do not pass a not used argumentyui-knk
* parse.y (new_op_assign_gen): new_op_assign_gen for ripper does not need column information. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Use caller with length to reduce unused stringskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21fix r60281ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Define the macro separately for ruby parser and for ripperyui-knk
* parse.y (new_op_assign): Define the macro separately for ruby parser and for ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Add doxygen commentssonots
* include/ruby/ruby.h (enum ruby_value_type): add doxygen comments * internal.h (enum imemo_type, struct vm_svar): add doxygen comments * method.h (rb_method_type_t, rb_method_iseq_t): add doxygen comments git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21io.c: introduce copy offload to IO.copy_streamglass
io.c (rb_io_s_copy_stream): add copy offload feature (by using copy_file_range(2) if available) to IO.copy_stream git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21test_pathname.rb#test_open should care about umaskkosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Fix r60271kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21test_cp_preserve_permissions should care about umaskkosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Describe recommended-methods.akr
Addrinfo.getaddrinfo is recommended instead of Socket.gethostbyname. Addrinfo#getnameinfo is recommended instead of Socket.gethostbyaddr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21sysconfdir on Windowsnobu
* ext/etc/etc.c (etc_sysconfdir): mentioned special case on Windows. [ruby-core:43110] [Bug #6121] * win32/Makefile.sub (config.status): sysconfdir is not used on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Removed obsoleted safe level checks on irb.hsbt
https://github.com/ruby/ruby/pull/1713 Patch by @y-yagi [fix GH-1713] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21fix up r60243nobu
* tool/vcs.rb (VCS::GIT.get_revisions): use last revision also as changed revision when the head does not have svn ID. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Fixed unexpected behavior of `Resolv::MDNS#each_address` when given ".local" ↵hsbt
address. https://github.com/ruby/ruby/pull/1425 Patch by @elct9620 [fix GH-1484] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Improve docs for `File.delete` exceptions.hsbt
https://github.com/ruby/ruby/pull/1505 Patch by @mrtazz [fix GH-1505] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Added sample code of merge! method in hash.c.hsbt
https://github.com/ruby/ruby/pull/1652 Patch by @selmertsx [fix GH-1652] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Fix the issue reference to [Bug #13769], handled in r60270knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Add a new test case for ipaddr 1.2.0 + drb/aclknu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Import ipaddr 1.2.0knu
- Add IPAddr#prefix - Add IPAddr#loopback? - Add IPAddr#private? [Feature #11666] - Add IPAddr#link_local? [Feature #10912] - Reject invalid address mask [Bug #13399] - Warn that IPAddr#ipv4_compat and #ipv4_compat? are deprecated [#Bug 13769] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Rename spec/rspec to .bundle.hsbt
It used without rspec installation for test-* task. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21kill "discards ‘const’ qualifier" warningkosaki
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
2017-10-21kill "discards ‘const’ qualifier" warningkosaki
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
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