summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2017-09-14merge revision(s) 59897:nagachika
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_4@59898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10lib/rubygems: fix several vulnerabilities in RubyGems; bump to version 2.6.13.nagachika
[Backport #13842] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10lib/rubygems: bump up RubyGems version to 2.6.12. [Backport #13842]nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-08merge revision(s) 59693,59695: [Backport #13852]nagachika
A HTTP Header value must not contain CR or LF. to_str -> to_s * lib/net/http/header.rb (set_field): `val` can not have `to_str`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-08merge revision(s) 59584: [Backport #13850]nagachika
REXML: Fix a bug that unexpected methods can be called as a XPath function [HackerOne:249295] Reported by Andrea Jegher. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-05merge revision(s) 57501,58576: [Backport #13539]nagachika
escape.c: check argument * ext/cgi/escape/escape.c (optimized_unescape): check accept_charset encoding argument. share `@@accept_charset` * lib/cgi/{core,util}.rb: include CGI::Util not only extending, to share `@@accept_charset` class variable, so that it is always accessible. [ruby-core:80986] [Bug #13539] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-23merge revision(s) 58077,58229: [Backport #13358]nagachika
ostruct.rb: fix OpenStruct.allocate * lib/ostruct.rb (OpenStruct.allocate): initialize an instance variable directly, without calling `intialize` method which may be overridden in a subclass. [ruby-core:80292] [Bug #13358] ostruct.rb: improve fix for OpenStruct.allocate + #respond_to? * lib/ostruct.rb (OpenStruct#respond_to_missing?): this makes OpenStruct#respond_to? works on any OpenStruct instance, just like Kernel#respond_to? does, without workarounds. [ruby-core:80292] [Bug #13358] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-23merge revision(s) 57446: [Backport #13413]nagachika
mkmf.rb: fix script installation * lib/mkmf.rb (MakeMakefile): fix condition to install script files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-23merge revision(s) 59033,59034: [Backport #13636]nagachika
rexml: add close tag check on end of document to StreamParser [ruby-core:81593] [Bug #13636] Reported by Anton Sivakov. Thanks!!! * properties. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-23merge revision(s) 58552: [Backport #13531]nagachika
rss: Accept empty text element as valid element Parser has been accepted it but XML serializer wasn't accepted. Reported by stefano frabetti. Thanks!!! [ruby-core:80965] [Bug #13531] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-12merge revision(s) 59312: [Backport #13739]nagachika
optparse.rb: get rid of eval * lib/optparse.rb: try Float() and Integer() instead of eval, which does too much things. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-09merge revision(s) 58825,58826: [Backport #5339]nagachika
erb.rb: Allow explicit trimming carriage return when trim_mode is "-", for Windows environments. [ruby-core:39625] [Bug #5339] erb.rb: Allow trimming CR in all trim_modes to unify a behavior with r58823 and r58825. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-09merge revision(s) 58823: [Backport #11464]nagachika
erb.rb: Allow trimming carriage return when trim_mode is "<>", for Windows environments. [Bug #11464] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-09merge revision(s) 57640: [Backport #13214]nagachika
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_4@58631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-09merge revision(s) 57359: [Backport #13442]nagachika
uri/generic.rb: fix exception on non-IP format * lib/uri/generic.rb (URI::Generic#find_proxy): match IP address no_proxy against resolved self IP address. [Fix GH-1513] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@58624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18merge revision(s) 57972: [Backport #13198]naruse
Fix bug of Tempfile#size if nothing is written [Bug #13198] * lib/tempfile.rb (Tempfile#size): Fix its behavior when nothing is written. Tempfile#size should return 0 in this case. The patch is from nobu <nobu@ruby-lang.org>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@58013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17merge revision(s) 57956:naruse
Raise error if spec is nil With parallel test-all, the spec is sometimes nil. To debug it raise more detailed error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@58002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17merge revision(s) 57523,57998: [Backport #13322]naruse
test_gem.rb: exclude default gems * test/rubygems/test_gem.rb: check difference to exclude default gems from the expected results. [Feature #13186] Merge rubygems-2.6.11 This version fixed regression of rubygems-2.6.10. https://github.com/rubygems/rubygems/pull/1856 See details of changelogs for 2.6.11 release: https://github.com/rubygems/rubygems/blob/adfcf40502716080bd9cdfdd2e43bd4296872784/History.txt#L3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@58001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13merge revision(s) 57412: [Backport #13308]naruse
Update Rubygems 2.6.10 * https://github.com/rubygems/rubygems/commit/2ee5bf9fd3bd7649d3e244bc40107ff32070ef47 * https://github.com/rubygems/rubygems/commit/be510dd4097e65c6a256a6e173d6b724a3a96472 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-12merge revision(s) 57811: [Backport #9829]naruse
docs for FileUtils.ln methods * lib/fileutils.rb: [DOC] add clarifying call-seq's for FileUtil.ln, ln_s, and ln_sf, with better argument names for the created link and link target. Reported by Mike Vastola. [ruby-core:62532] [Bug #9829] * lib/fileutils.rb: [DOC] further improve descriptions of FileUtils.ln and related methods; improve examples: relative links probably won't work in other dir, avoid `include', use more generic homedir name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-12merge revision(s) 57777:naruse
rdoc for String class * lib/unicode_normalize.rb: [DOC] prevent a comment from showing up in the class documentation for String. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-12merge revision(s) 57775: [Backport #13281]naruse
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_4@57926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-12merge revision(s) 57751,57753,57755:naruse
fileutils.rb: improve rdoc for FileUtils * lib/fileutils.rb: [DOC] fix invalid example code to make it syntax highlighted, fix rdoc for lists, nodoc internal methods, avoid a dangerous example. hash.c: [DOC] fix book title in example struct.c: improve rdoc for Struct * struct.c: [DOC] improve examples for ::new, improve #dig example, simplify #select example, use consistent style for return values, fix typos and example code style, remove duplicate cross reference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-12merge revision(s) 57255,57256,57257: [Backport #13111]naruse
forwardable.rb: use defined? * lib/forwardable.rb (_delegator_method): use defined? operator instead of binding and calling unbound Kernel#respond_to?. a remedy for an performance bottleneck. forwardable.rb: use defined? * lib/forwardable.rb (_delegator_method): use defined? operator instead of binding and calling unbound Kernel#respond_to?. a remedy for an performance bottleneck. forwardable.rb: fix branches * lib/forwardable.rb (instance_delegate, single_delegate): fix inverted branches. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-12merge revision(s) 57515: [Backport #13169]naruse
lib/ostruct.rb: Fix returned value of each_pair. From a patch by Marcus Stollsteimer. [Fixes #13169] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11merge revision(s) 57480:naruse
mkmf.rb: message format string * lib/mkmf.rb (checking_for): message needs format string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11merge revision(s) 57431:naruse
[DOC] Use Integer instead of Fixnum [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11merge revision(s) 57428:naruse
Add document for lib/rss/atom.rb [fix GH-1520] Patch by Tsehau Chao. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11merge revision(s) 57411: [Backport #13147]naruse
Fix typo of URI#escape [Bug #13147] patched by Steve Hill <sghill.dev@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11merge revision(s) 57406: [Backport #13149]naruse
csv.rb: fix field_size_limit check * lib/csv.rb (CSV#shift): the last column is an Array in extended column since r55985. [ruby-dev:49964] [Bug #13149] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11merge revision(s) 57372:naruse
Fix documentation of options for all of methods in FileUtils. Patch by galia traub( @galiat ). [Fix GH-1510][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-13require "irb/output-method" for StdioOutputMethodnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-12Use URI.decode_www_form_component [Bug #10774]naruse
`parser` refered RFC2396_Parser, but it is separated. test is contributed by Dominik Menke git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10Add missing :nodoc: commentnaruse
We were missing a `:nodoc:` magic comment that was making automated tools show that this method was missing documentation, when it really didn't need to be documented. by Devon Estes <devon.c.estes@gmail.com> https://github.com/ruby/ruby/pull/1482 fix GH-1482 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-08ruby-lex.rb: fix for labelnobu
* lib/irb/ruby-lex.rb (identify_identifier): treat identifier just followed by a colon as a lable. this is not a precise solution but enough for the time being. [ruby-core:78526] [Bug #13012] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-07Delay Utils.getservername until needed.shugo
There is no need to call Utils.getservername when the :ServerName option is specified, so delay Utils.getservername until needed to avoid unnecessary DNS lookups. [ruby-core:78492] [Bug #13007] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06rexml: REXML::Element#[] accepts String or Symbol as attribute namekou
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29get rid of ambiguous parentheses warningsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29get rid of test failures on CI introduced at r56927usa
* lib/matrix.rb: now ruby warns ambiguous parentheses after a space in method definitions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29Suppress warnings.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29net/ftp: add a new option ssl_handshake_timeout to Net::FTP.new.shugo
The TLS handshake timeout can be specified independently, because the TLS handshake doesn't start just after the underlying connection is established, but after the AUTH command is completed. It's also useful for testing purposes. However, if ssl_handshake_timeout is not specified, open_timeout is used instead for convenience. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29net/ftp: close the socket directly when an error occurs during TLS handshake.shugo
Otherwise, @sock.read in Net::FTP#close hungs until read_timeout exceeded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29net/ftp: close the connection if the TLS handshake timeout is exceeded.shugo
Otherwise, file descriptor leaks may occur in Net::FTP.new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-26net/ftp: support timeout for TLS handshake.shugo
Net::FTP inherits ssl_socket_connect from Net::Protocol to implement timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-23resolv: use safe navigation operator to avoid extra hash lookupsnormal
@addr2name is a private Hash and never changes its default_proc, so only pay the hash lookup cost once; we know missing entries in the hash will be nil. * lib/resolv.rb (each_name): use safe navigation operator git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-23webrick/server: use symbol procnormal
Symbol proc is less code and avoids confusion from variable naming. * lib/webrick/server.rb (shutdown): use symbol proc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-23Add CR/LF check to Net::FTP#status.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-23lib/net/ftp: fix typonormal
* lib/net/ftp.rb (shutdown): fix typo git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-23Disconnect immediately even if Net::FTP#close is called without quit.shugo
In that case, BufferedSSLSocket#read in FTP#close exceeded timeout because BufferedSSLSocket#shutdown did nothing. So BufferedIO#rbuf_fill is overridden in BufferedSSLSocket to raise an EOFError if the connection is shut down. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-23Add a new optinal argument pathname to FTP#stat.shugo
Based on the patch by soleboxy. [Fix GH-1478] [ruby-core:78240] [Feature #12965] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e