summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-03-28merge revision(s) 62968:ruby_2_2usa
webrick: prevent response splitting and header injection Original patch by tenderlove (with minor style adjustments). * lib/webrick/httpresponse.rb (send_header): call check_header (check_header): raise on embedded CRLF in header value * test/webrick/test_httpresponse.rb (test_prevent_response_splitting_headers): new test * (test_prevent_response_splitting_cookie_headers): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@63022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-28merge revision(s) 62960-62965:usa
webrick: use IO.copy_stream for multipart response Use the new Proc response body feature to generate a multipart range response dynamically. We use a flat array to minimize object overhead as much as possible; as many ranges may fit into an HTTP request header. * lib/webrick/httpservlet/filehandler.rb (multipart_body): new method (make_partial_content): use multipart_body ------------------------------------------------------------------------ r62960 | normal | 2018-03-28 17:06:23 +0900 (水, 28 3 2018) | 13 lines webrick/httprequest: limit request headers size We use the same 112 KB limit started (AFAIK) by Mongrel, Thin, and Puma to prevent malicious users from using up all the memory with a single request. This also limits the damage done by excessive ranges in multipart Range: requests. Due to the way we rely on IO#gets and the desire to keep the code simple, the actual maximum header may be 4093 bytes larger than 112 KB, but we're splitting hairs at that point. * lib/webrick/httprequest.rb: define MAX_HEADER_LENGTH (read_header): raise when headers exceed max length ------------------------------------------------------------------------ r62961 | normal | 2018-03-28 17:06:28 +0900 (水, 28 3 2018) | 9 lines webrick/httpservlet/cgihandler: reduce memory use WEBrick::HTTPRequest#body can be passed a block to process the body in chunks. Use this feature to avoid building a giant string in memory. * lib/webrick/httpservlet/cgihandler.rb (do_GET): avoid reading entire request body into memory (do_POST is aliased to do_GET, so it handles bodies) ------------------------------------------------------------------------ r62962 | normal | 2018-03-28 17:06:34 +0900 (水, 28 3 2018) | 7 lines webrick/httprequest: raise correct exception "BadRequest" alone does not resolve correctly, it is in the HTTPStatus namespace. * lib/webrick/httprequest.rb (read_chunked): use correct exception * test/webrick/test_httpserver.rb (test_eof_in_chunk): new test ------------------------------------------------------------------------ r62963 | normal | 2018-03-28 17:06:39 +0900 (水, 28 3 2018) | 9 lines webrick/httprequest: use InputBufferSize for chunked requests While WEBrick::HTTPRequest#body provides a Proc interface for streaming large request bodies, clients must not force the server to use an excessively large chunk size. * lib/webrick/httprequest.rb (read_chunk_size): limit each read and block.call to :InputBufferSize in config. * test/webrick/test_httpserver.rb (test_big_chunks): new test ------------------------------------------------------------------------ r62964 | normal | 2018-03-28 17:06:44 +0900 (水, 28 3 2018) | 9 lines webrick: add test for Digest auth-int No changes to the actual code, this is a new test for a feature for which no tests existed. I don't understand the Digest authentication code well at all, but this is necessary for the subsequent change. * test/webrick/test_httpauth.rb (test_digest_auth_int): new test (credentials_for_request): support bodies with POST ------------------------------------------------------------------------ r62965 | normal | 2018-03-28 17:06:49 +0900 (水, 28 3 2018) | 18 lines webrick/httpauth/digestauth: stream req.body WARNING! WARNING! WARNING! LIKELY BROKEN CHANGE Pass a proc to WEBrick::HTTPRequest#body to avoid reading a potentially large request body into memory during authentication. WARNING! this will break apps completely which want to do something with the body besides calculating the MD5 digest of it. Also, keep in mind that probably nobody uses "auth-int". Servers such as Apache, lighttpd, nginx don't seem to support it; nor does curl when using POST/PUT bodies; and we didn't have tests for it until now... * lib/webrick/httpauth/digestauth.rb (_authenticate): stream req.body git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@63021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-28merge revision(s) 60584,62954-62959,63008:usa
webrick: support Proc objects as body responses * lib/webrick/httpresponse.rb (send_body): call send_body_proc (send_body_proc): new method (class ChunkedWrapper): new class * test/webrick/test_httpresponse.rb (test_send_body_proc): new test (test_send_body_proc_chunked): ditto [Feature #855] webrick: favor .write over << method This will make the next change to use IO.copy_stream easier-to-read. When we can drop Ruby 2.4 support in a few years, this will allow us to use writev(2) with multiple arguments for headers and chunked responses. * lib/webrick/cgi.rb (write): new wrapper method lib/webrick/httpresponse.rb: (send_header): use socket.write (send_body_io): ditto (send_body_string): ditto (send_body_proc): ditto (_write_data): ditto (ChunkedWrapper#write): ditto (_send_file): ditto ------------------------------------------------------------------------ r62954 | normal | 2018-03-28 17:05:52 +0900 (水, 28 3 2018) | 14 lines webrick/httpresponse: IO.copy_stream for regular files Remove the redundant _send_file method since its functionality is unnecessary with IO.copy_stream. IO.copy_stream also allows the use of sendfile under some OSes to speed up copies to non-TLS sockets. Testing with "curl >/dev/null" and "ruby -run -e httpd" to read a 1G file over Linux loopback reveals a reduction from around ~0.770 to ~0.490 seconds on the client side. * lib/webrick/httpresponse.rb (send_body_io): use IO.copy_stream (_send_file): remove [Feature #14237] ------------------------------------------------------------------------ r62955 | normal | 2018-03-28 17:05:57 +0900 (水, 28 3 2018) | 10 lines webrick: use IO.copy_stream for single range response This is also compatible with range responses generated by Rack::File (tested with rack 2.0.3). * lib/webrick/httpresponse.rb (send_body_io): use Content-Range * lib/webrick/httpservlet/filehandler.rb (make_partial_content): use File object for the single range case * test/webrick/test_filehandler.rb (get_res_body): use send_body to test result ------------------------------------------------------------------------ r62956 | normal | 2018-03-28 17:06:02 +0900 (水, 28 3 2018) | 7 lines test/webrick/test_filehandler.rb: stricter multipart range test We need to ensure we generate compatibile output in the face of future changes * test/webrick/test_filehandler.rb (test_make_partial_content): check response body ------------------------------------------------------------------------ r62957 | normal | 2018-03-28 17:06:08 +0900 (水, 28 3 2018) | 8 lines webrick: quiet warning for multi-part ranges Content-Length is ignored by WEBrick::HTTPResponse even if we calculate it, so instead we chunk responses to HTTP/1.1 clients and terminate HTTP/1.0 connections. * lib/webrick/httpservlet/filehandler.rb (make_partial_content): quiet warning ------------------------------------------------------------------------ r62958 | normal | 2018-03-28 17:06:13 +0900 (水, 28 3 2018) | 7 lines webrick/httpresponse: make ChunkedWrapper copy_stream-compatible The .write method needs to return the number of bytes written to avoid confusing IO.copy_stream. * lib/webrick/httpresponse.rb (ChunkedWrapper#write): return bytes written (ChunkedWrapper#<<): return self ------------------------------------------------------------------------ r62959 | normal | 2018-03-28 17:06:18 +0900 (水, 28 3 2018) | 9 lines webrick: use IO.copy_stream for multipart response Use the new Proc response body feature to generate a multipart range response dynamically. We use a flat array to minimize object overhead as much as possible; as many ranges may fit into an HTTP request header. * lib/webrick/httpservlet/filehandler.rb (multipart_body): new method (make_partial_content): use multipart_body get rid of test error/failure on Windows introduced at r62955 * lib/webrick/httpresponse.rb (send_body_io): use seek if NotImplementedError is raised in IO.copy_stream with offset. * lib/webrick/httpservlet/filehandler.rb (multipart_body): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@63020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-28merge revision(s) 62992:usa
pack.c: fix underflow * pack.c (pack_unpack_internal): get rid of underflow. https://hackerone.com/reports/298246 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@63019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-28merge revision(s) 62991,63000:usa
unixsocket.c: check NUL bytes * ext/socket/unixsocket.c (rsock_init_unixsock): check NUL bytes. https://hackerone.com/reports/302997 unixsocket.c: abstract namespace * ext/socket/unixsocket.c (unixsock_path_value): fix r62991 for Linux abstract namespace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@63018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-28merge revision(s) 62990:usa
Ignore file separator from tmpfile/tmpdir name. From: SHIBATA Hiroshi <hsbt@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@63017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-28merge revision(s) 62989:usa
dir.c: check NUL bytes * dir.c (GlobPathValue): should be used in rb_push_glob only. other methods should use FilePathValue. https://hackerone.com/reports/302338 * dir.c (rb_push_glob): expand GlobPathValue git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@63015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-16merge revision(s) 62422,62436: [Backport #14481]usa
Merge RubyGems 2.7.6 from upstream. It fixed some security vulnerabilities. http://blog.rubygems.org/2018/02/15/2.7.6-released.html fix regexp literal warning. * test/rubygems/test_gem_server.rb: eliminate duplicated character class warning. [Bug #14481] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@62443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-16merge revision(s) 58471,58493,62436: [Backport #13505]usa
load.c: backtrace of circular require * load.c (load_lock): print backtrace of circular require via `Warning.warn` [ruby-core:80850] [Bug #13505] Send the backtrace of the circular require warning as a single String to Warning.warn * load.c: send as a single string. * error.c: expose the string formatted by rb_warning as rb_warning_string(). * test/ruby/test_exception.rb: update tests. [ruby-core:80850] [Bug #13505] fix regexp literal warning. * test/rubygems/test_gem_server.rb: eliminate duplicated character class warning. [Bug #14481] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@62441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14* test/net/ftp/test_ftp.rb (process_port_or_eprt): merge a part ofusa
r56973 to pass the test introduced at previous commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@61255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14merge revision(s) 61242: [Backport #14185]usa
Fix a command injection vulnerability in Net::FTP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@61246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14merge revision(s) 60149: [Backport #14003]usa
Merge rubygems-2.6.14 changes. It fixed http://blog.rubygems.org/2017/10/09/unsafe-object-deserialization-vulnerability.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@61244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14* ext/json: bump to version 1.8.1.1. [Backport #13853]usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@59904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14asn1: fix out-of-bounds read in decoding constructed objectsusa
* OpenSSL::ASN1.{decode,decode_all,traverse}: have a bug of out-of-bounds read. int_ossl_asn1_decode0_cons() does not give the correct available length to ossl_asn1_decode() when decoding the inner components of a constructed object. This can cause out-of-bounds read if a crafted input given. Reference: https://hackerone.com/reports/170316 https://github.com/ruby/openssl/commit/1648afef33c1d97fb203c82291b8a61269e85d3b git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@59903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14merge revision(s) 59897:usa
lib/webrick/log.rb: sanitize any type of logs It had failed to sanitize some type of exception messages. Reported and patched by Yusuke Endoh (mame) at https://hackerone.com/reports/223363 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@59902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14merge revision(s) 58453,58454: [Backport #13499]usa
Fix space flag when Inf/NaN and width==3 * sprintf.c (rb_str_format): while `"% 2f"` and `"% 4f"` result in `" Inf"` and `" Inf"` respectively, `"% 3f"` results in `"Inf"` (no space). Refactor "%f" % Inf/NaN * sprintf.c (rb_str_format): as for non-finite float, calculate the exact needed size with the space flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@59901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10* 2017-09-10svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@59806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10* lib/rubygems: fix several vulnerabilities in RubyGems; bump to versionusa
2.4.5.3. [Backport #13842] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@59805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-09* ext/psych/yaml: update libyaml to 0.1.7.usa
* ext/psych/psych.gemspec: bump version to 2.0.8.1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@59793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-28* version.h: bump to 2.2.8.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-28merge revision(s) 58084: [Backport #13361]usa
configure.in: syscall is deprecated on macOS * configure.in: syscall is no longer supported on macOS since 10.12. [ruby-core:80300] [Bug #13361] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-26merge revision(s) 53566:usa
* configure.in: improve ICC (Intel C Compiler) support. * configure.in (CXX): The name of icc's c++ compiler is `icpc`. * configure.in (warnings): Add `-diag-disable=2259` to suppress noisy warnings: "non-pointer conversion from "..." to "..." may lose significant bits". * configure.in (optflags): Add `-fp-model precise` like -fno-fast-math. * lib/mkmf.rb: icc supports -Werror=division-by-zero and -Werror=deprecated-declarations, but doesn't support -Wdivision-by-zero and -Wdeprecated-declarations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-26* thread.c (rb_thread_fd_close): unintentionally removed at r58094.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-26* test/ruby/test_thread.rb (test_thread_interrupt_for_killed_thread):usa
may fix the test failure on some platforms introduced at r58108. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-26merge revision(s) 49806:usa
envutil.rb: timeout_error argument to invoke_ruby * test/lib/envutil.rb (invoke_ruby): add `timeout_error` optional keyword argument, the exception class to be raised if the target process timed out. if it is nil, no exception will be raised at timeout but the terminated output, error, and status will be returned. defaulted to Timeout::Error. * test/lib/envutil.rb (assert_separately): check outputs and status (including diagnostic reports) of timed-out process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-26* thread.c (rb_thread_sleep_deadly_allow_spurious_wakeup): need tousa
mark as exported. this may fix the load error introduced at r58115. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25* ChangeLog: log for r58102.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25* ChangeLog: logs for r58085 - r58129.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 58037: [Backport #10944]usa
docs for creating arrays * array.c: [DOC] add example for Array.new with block and index. Reported by Don Cruickshank. [ruby-core:68442] [Bug #10944] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 58020: [Backport #10936]usa
date_core.c: fix error in DateTime docs * ext/date/date_core.c: [DOC] fix format string for DateTime#rfc3339. Reported by Andreas Rayo Kniep. [ruby-core:68418] [Bug #10936] * ext/date/date_core.c: [DOC] ditto for DateTime#iso8601 and DateTime#xmlschema; other small improvements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 58008: [Backport #9294]usa
io.c: improve docs * io.c: [DOC] improve and harmonize docs for IO#read and ARGF#read; fix invalid example code for IO#read to make it syntax highlighted. * io.c: [DOC] various improvements for docs of IO, ARGF, and Kernel: fix indent to ensure correct code block detection; sync "outbuf" paragraph for {IO,ARGF}#read, {IO,ARGF}#readpartial, and IO#sysread; fix formatting of call-seq's; improve Kernel#open example to use nil?; fix RDoc markup and typos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57362: [Backport #13096]usa
vm_method.c: resolve refined method to undef * vm_method.c (rb_undef): resolve the method entry which refines a prepended method entry. [ruby-core:78944] [Bug #13096] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57737: [Backport #13225]usa
date_core.c: expand docs for Date shifting * ext/date/date_core.c: [DOC] expand docs for Date shifting * add examples for Date#>> and Date#<< that clarify some edge cases * add examples for Date#next_year and Date#prev_year * add cross references to Date#>> and Date#<< [ruby-core:79584] [Bug #13225] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57887: [Backport #13159]usa
lib/ostruct.rb: [DOC] revise docs for OpenStruct * update paragraph on implementation: define_singleton_method is used, not define_method * add call-seq with return values for each_pair * adopt description of dig from Array and Hash * fix description of the hash method * :nodoc: initialize_copy, respond_to_missing? * other small improvements, e.g. use the term `attribute' in the docs (instead of `member'), which is clearer for users of the class * improve code examples: e.g. use more consistent style (always use double quotes, drop `p' and `puts', ...), update inspect output, use example data that is not prone to change (like population) * add more code examples * fix some small errors and grammar [ruby-core:79265] [Bug #13159] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57352: [Backport #13132]usa
doc: improve documentation for Binding [ci skip] * remove explicit return from code examples * grammar fixes * other small fixes Patch by: Marcus Stollsteimer <sto.mar@web.de> [ruby-core:79082] [Bug #13132] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57775: [Backport #13281]usa
nodoc OptParse * lib/optparse.rb: [DOC] nodoc OptParse, introduced with r46126, to avoid leaking of its documentation (OptionParser's docs) into the class documentation of Object. [ruby-core:79909] [Bug #13281] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57686: [Backport #13233]usa
rational.c: fix rdoc * rational.c: [DOC] fix wrong indentations and comment out some lines in code examples to make them valid Ruby code and syntax highlighted on the rendered page. [ci skip] [ruby-core:79607] [Bug #13233] Author: Marcus Stollsteimer <sto.mar@web.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57640: [Backport #13214]usa
fileutils.rb: do not make root * lib/fileutils.rb (FileUtils#mkdir_p): no need to make root directory which should be exist and cannot be made with mkdir recent Cygwin can make a directory contains a colon. [Bug #13214] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57265,57266: [Backport #13081]usa
win32/resolv.rb: ad hoc workaround * ext/win32/lib/win32/resolv.rb (Win32::Resolv::SZ): an ad hoc workaround for broken registry. SearchList and other registry values must be REG_SZ, or Windows ignores anything in those values otherwise. [ruby-dev:49924] [Bug #13081] https://github.com/rubygems/rubygems/issues/1700 win32/registry.rb: registry type names * ext/win32/lib/win32/registry.rb (Win32::Registry#read): show registry type names instead of numeric values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57536: [Backport #13192]usa
doc: Add example for Symbol#to_s * string.c: add example for Symbol#to_s. The docs for Symbol#to_s only include an example for Symbol#id2name, but not for #to_s which is an alias; the docs should include examples for both methods. From: Marcus Stollsteimer <sto.mar@web.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57688,57689: [Backport #13242]usa
rational.c: infinity in power * rational.c (nurat_expt): return Infinity due to overflow. [ruby-core:79686] [Bug #13242]: rational.c: infinity in power * rational.c (nurat_expt): return 0 due to overflow. [ruby-core:79686] [Bug #13242]: git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57024: [Backport #13015]usa
vm.c: check type of hash to merge * vm.c (core_hash_merge): check the type of the target hash to merge. [ruby-core:78536] [Bug #13015] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57477,57478,57479,57492: [Backport #12405]usa
use TRUE/FALSE. define rb_thread_sleep_deadly_allow_spurious_wakeup(). * thread.c, thread_sync.c: define new function rb_thread_sleep_deadly_allow_spurious_wakeup() and use it instead of using sleep_forever() directly. allow Queue operation in trap. * thread_sync.c: allow spurious wakeup to check Queue status just after trap. [Bug #12405] * test/thread/test_queue.rb: add a test for it. test_queue.rb: fix portability * test/thread/test_queue.rb (test_queue_with_trap): fix portability. use SIGINT instead of SIGUSR2 which is supported on not all platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 51871,51872,51874,51875,51876,51877,51878,57517: [Backport ↵usa
#13190] * doc/syntax/literals.rdoc (Strings): mention about ?a literal. literals.rdoc: fix typos * doc/syntax/literals.rdoc (Strings): fix typos. * doc/syntax/literals.rdoc (Strings): [DOC] Document the full list of supported escape sequences in string literals. * doc/syntax/literals.rdoc (Strings): [DOC] Revise the character literal part. literals.rdoc: add DEL [ci skip] * doc/syntax/literals.rdoc (Strings): [DOC] add DEL. [DOC] `\0` is interpreted as NUL only if not followed by an octal digit. [DOC] Remove `\0` since it's aprt of octal notation A typo is fixed while at it. doc: Fix error for escape sequences in string literals Backslash goes first in escape sequences, so it must be "any other character following a backslash is interpreted as ...", while the doc says "...followed by...". Author: Marcus Stollsteimer <sto.mar@web.de> [ruby-core:79418] [Bug #13190] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57522: [Backport #13189]usa
doc: restore class documentation for Struct * struct.c: restore class documentation for Struct that disappeared with r46663. Due to r46663, the class documentation for Struct disappeared. (The revision inserted the definition of `InitVM_Struct` between the rdoc and the definition of `Init_Struct`.) The docs are rendered for 2.1: <https://docs.ruby-lang.org/en/2.1.0/Struct.html>, but not for later versions, see: <https://docs.ruby-lang.org/en/2.2.0/Struct.html> (Same for `ri` pages). [ruby-core:79416] [Bug #13189] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57434: [Backport #13161]usa
Enumerable#{min,min_by,max,max_by} [ci skip] * enum.c: [DOC] Enumerable#{min,min_by,max,max_by} return a sorted array when +n+ argument is used. * enum.c: Small typo : minimum -> maximum [Bug #13161] Author: Eric Duminil <eric.duminil@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 54785: [Backport #11900]usa
* ruby.c (process_options): convert -e script to the encoding given by a command line option on Windows. assume it is the expected encoding. [ruby-dev:49461] [Bug #11900] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57539: [Backport #11752]usa
rational.c: fix rdoc [ci skip] * rational.c (rb_rational_plus): [DOC] fix an example. A patch by Trygve Flathen <at.ruby-lang AT flathen.net> in [ruby-core:71755]. [Bug #11752] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 56310: [Backport #13364]usa
* win32/win32.c (poll_child_status): rb_w32_wait_events_blocking() sets errno internally, then should not set it here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57595: [Backport #8996]usa
check thread deadness correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e