aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert r62966 and r62969naruse2018-04-035-174/+33
| | | | | | It breaks mswin's test-all git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: fix segfault when no singleton classnobu2018-04-032-8/+13
| | | | | | | | * proc.c (rb_obj_singleton_method): bail out if the receiver does not have the singleton class without accessing the origin class not to segfault. [Bug #14658] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix Kernel#singleton_method with Module#Prependnobu2018-04-032-3/+13
| | | | | | | | | * proc.c (rb_obj_singleton_method): search the method entry from the origin class, for fix prepended modules. [Bug #14658] From: Vasiliy Ermolovich <younash@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* removed never used variablenobu2018-04-031-4/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-04-03svn2018-04-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support upstream directory structure for ruby/csv.hsbt2018-04-031-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Win32API.rb: use uplevel option to warnnobu2018-04-021-1/+1
| | | | | | Also warns always regardless $VERBOSE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c: prepend "warning: " alwaysnobu2018-04-022-7/+11
| | | | | | | | * error.c (rb_warn_m): prepend the string "warning: " if uplevel keyword is given, even if caller file and line information are not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Improve mkmf error messagenobu2018-04-021-1/+6
| | | | | | | * lib/mkmf.rb: Improve the error message when ruby.h is missing, to suggest installing separate packages. [Feature #14656] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Keep feature names loaded in the blocknobu2018-04-021-0/+3
| | | | | | | | * lib/rubygems/test_case.rb (Gem::TestCase#save_loaded_features): keep feature names for rubygem libraries loaded in the block. c.f. rubygems/rubygems#2261 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typo on URI.hierarchical? [ci skip]nobu2018-04-021-1/+1
| | | | | | | | | * lib/uri/generic.rb (hierarchical?): [DOC] Fix typo in the description. [Fix GH-1851] From: Harry Llewelyn <advocation@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-04-02svn2018-04-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Start re-enabling Jaxen testskou2018-04-012-95/+94
| | | | | | | | | | | | | [Bug #14600] Reported by MSP-Greg. Thanks!!! * lib/rexml/xpath_parser.rb: Fix a bug that "following_siblings::*[N]" doesn't work. * test/rexml/test_jaxen.rb: Enable only axis test for now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_time_tz.rb: Lisbon tzdata fixnobu2018-04-011-0/+1
| | | | | | | | * test/ruby/test_time_tz.rb (gen_variational_zdump_test): Update Lisbon zdump data, which fixed the 1912-01-01 transition for Portugual and its colonies. [Bug #14655] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_time_tz.rb: Kiritimati tzdata fixnobu2018-04-011-0/+9
| | | | | | | | * test/ruby/test_time_tz.rb (gen_zdump_test): fix the expected data at the Kiritimati's skip of New Year's Eve 1994. [Bug #14655] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_time_tz.rb: Kiritimati tzdata fixnobu2018-04-011-3/+14
| | | | | | | | * test/ruby/test_time_tz.rb (TestTimeTZ#test_pacific_kiritimati): fix the expected data at the skip of New Year's Eve 1994. [Bug #14655] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mjit.c: make Object's class serial valid in JITk0kubun2018-04-011-0/+1
| | | | | | | Without this change, we couldn't inline method call setup for methods which are defined in the top level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-04-01svn2018-03-311-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: compile_evstrnobu2018-03-311-18/+22
| | | | | | * compile.c (compile_evstr): extract from iseq_compile_each. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: end_labelnobu2018-03-311-2/+2
| | | | | | | * compile.c (compile_if): branch to end_label is not used if else_seq is not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Resurvey performance of RDoc by frozen_string_literal: true [Bug #14654]naruse2018-03-311-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use requrie_relativenobu2018-03-312-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use require_relativenobu2018-03-311-2/+2
| | | | | | | | * spec/ruby/core/file/ftype_spec.rb: use require_relative which resolves symbolic links consistently to git rid of constant re-definition warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file_types.rb: use the current terminal devicenobu2018-03-311-1/+1
| | | | | | | | | * spec/ruby/core/file/fixtures/file_types.rb (configure_types): try the current standard input terminal device first to get rid of a race condition. other terminal devices may be used by other processes and disposed during the test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/leakchecker.rb: Add check_verbosekazu2018-03-311-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-03-31svn2018-03-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_jit.rb: loosen CC check conditionk0kubun2018-03-301-1/+1
| | | | | | see also: r63037. Probably it was not enough. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir.c: Dir.glob examplenobu2018-03-301-0/+1
| | | | | | | * dir.c (dir_s_glob): [DOC] added an example of Dir.glob using pattern list. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: do not dump unused callinfosnobu2018-03-302-0/+26
| | | | | | | | * compile.c (compile_if): rewind callinfo indexes used in unreachable paths, to get rid of dumping unused callinfos. [ruby-core:86399] [Bug #14553] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-03-30svn2018-03-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.1: [DOC] options to exit [ci skip]nobu2018-03-301-4/+7
| | | | | | | | * man/ruby.1: `--copyright` and `--version` quit immediately, and also `--verbose` if no scripts are given. [ruby-core:86391] [Bug #14633] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_jit.rb: loosen debug log checkk0kubun2018-03-291-1/+1
| | | | | | | | We couldn't catch log with https://gist.github.com/ko1/0fdc6a8d4add70cd8648000b16a3da38#file-brlog-trunk_gcc6-20180329-003723-L370 because the error message started with "gcc-6:". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir.c: do not assume NUL terminatornobu2018-03-291-10/+13
| | | | | | | * dir.c (rb_push_glob): do not assume string is NUL terminated always, shared substring may not in the future. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use only CMDARG/COND _PUSH/POP for cmdarg/cond management.nobu2018-03-292-19/+22
| | | | | | From: Ilya Bylich <ibylich@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: remove `p->` from bitstack tracesnobu2018-03-291-12/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-03-29svn2018-03-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c: yield blockarg in collectnobu2018-03-292-1/+3
| | | | | | | | * array.c (rb_ary_collect): yield in block argument semantics always to splat array elements to lambda, for the backward compatibility. [ruby-core:86362] [Bug #14639] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* get rid of test error/failure on Windows introduced at r62955usa2018-03-282-2/+12
| | | | | | | | | | * 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/trunk@63008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* unixsocket.c: abstract namespacenobu2018-03-281-1/+23
| | | | | | | * ext/socket/unixsocket.c (unixsock_path_value): fix r62991 for Linux abstract namespace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use Regexp#match? in time.rb for conditionalsnobu2018-03-281-8/+4
| | | | | | | | [Fix GH-1852] From: Bart <bartdewater@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* pack.c: fix underflownobu2018-03-282-1/+4
| | | | | | | * pack.c (pack_unpack_internal): get rid of underflow. https://hackerone.com/reports/298246 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* unixsocket.c: check NUL bytesnobu2018-03-282-1/+11
| | | | | | | * ext/socket/unixsocket.c (rsock_init_unixsock): check NUL bytes. https://hackerone.com/reports/302997 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Ignore file separator from tmpfile/tmpdir name.hsbt2018-03-283-1/+46
| | | | | | From: SHIBATA Hiroshi <hsbt@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir.c: check NUL bytesnobu2018-03-282-14/+20
| | | | | | | | | | * 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/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* adjust indents [ci skip]nobu2018-03-282-16/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* webrick: prevent response splitting and header injectionnormal2018-03-282-2/+39
| | | | | | | | | | | | 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/trunk@62968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: IO#write without args returns 0normal2018-03-282-1/+8
| | | | | | | | | | This is consistent with other implementations of .write in openssl and stringio. * io.c (io_write_m): return 0 on argc == 0 [ruby-core:86285] [Bug #14338] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* webrick/httpproxy: stream request and response bodiesnormal2018-03-284-32/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | Reading entire request or response bodies into memory can lead to trivial denial-of-service attacks. Introduce Fibers in both cases to allow streaming. WEBrick::HTTPRequest gains a new body_reader method to prepare itself as a source for IO.copy_stream. This allows the WEBrick::HTTPRequest object to be used as the Net::HTTPGenericRequest#body_stream= arg for Net::HTTP. For HTTP proxy response bodies, we also use a Fiber to to make the HTTP request and read the response body. * lib/webrick/httprequest.rb (body_reader): new method (readpartial): ditto * lib/webrick/httpproxy.rb (perform_proxy_request): use Fiber to stream response body (do_GET, do_HEAD): adjust call (do_POST): adjust call and supply body_reader * test/webrick/test_httprequest.rb (test_chunked): test for IO.copy_stream compatibility * test/webrick/test_httpproxy.rb (test_big_bodies): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* webrick/httpauth/digestauth: stream req.bodynormal2018-03-281-3/+5
| | | | | | | | | | | | | | | | | | | | | 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/trunk@62965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* webrick: add test for Digest auth-intnormal2018-03-281-2/+88
| | | | | | | | | | | | 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e