aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gems/bundled_gems: Update to power_assert 0.4.1ktsj2016-11-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: home directory from systemnobu2016-11-264-4/+34
| | | | | | | * file.c (rb_default_home_dir): resolve home directory from the system database when HOME is not set. [Feature #12695] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: special folders as home dirnobu2016-11-263-67/+67
| | | | | | | * win32/win32.c (rb_w32_home_dir): move from win32/file.c to try special folders. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: mention [Feature #12953] [ci skip]nobu2016-11-261-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-26svn2016-11-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* net/ftp: support timeout for TLS handshake.shugo2016-11-262-2/+26
| | | | | | 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
* round-downnobu2016-11-257-10/+134
| | | | | | | * numeric.c (round_half_down, int_round_half_down): support round-down mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-25svn2016-11-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use `rb_struct_ptr` for `RSTRUCT_PTR` macrousa2016-11-241-1/+1
| | | | | | | * include/ruby/ruby.h (RSTRUCT_PTR): at r55788, `rb_struct_const_ptr` had been hidden and `rb_struct_ptr` had been implemented for backward compatiblity. but the definition of `RSTRUCT_PTR` was not modified to use it, probably by mistake. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* marshal.c: fix infinite recursionnobu2016-11-242-1/+27
| | | | | | | | * marshal.c (check_userdump_arg): marshal_dump should not return an instance of the same class, otherwise it causes infinite recursion. [ruby-core:78289] [Bug #12974] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* marshal.c: negative limitnobu2016-11-241-3/+5
| | | | | | | * marshal.c (w_object): should not decrement negative limit which means unlimited. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_fileutils.rb: fix deadlocknobu2016-11-241-2/+15
| | | | | | | | | * test/fileutils/test_fileutils.rb (assert_output_lines): ensure that write pipe is closed, not the reader thread to deadlock when an exception raised in the given block. [ruby-core:78053] [Bug #12910] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add credit and PR/issue numbers.shugo2016-11-241-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* resolv: use safe navigation operator to avoid extra hash lookupsnormal2016-11-231-3/+1
| | | | | | | | | | @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
* webrick/server: use symbol procnormal2016-11-231-1/+1
| | | | | | | | | 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-24svn2016-11-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add CR/LF check to Net::FTP#status.shugo2016-11-231-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_fileutils.rb: Use primary group toonobu2016-11-231-1/+1
| | | | | | | | | | | | * test/fileutils/test_fileutils.rb (TestFileUtils#setup): Use primary group as well as supplementary groups. based on the patch by Vít Ondruch at [ruby-core:78053]. [Bug #12910] It might happen in certain environments (systemd-nspawn) that process has no supplementary groups, but primary groups should be enough to pass most of the tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/net/ftp: fix typonormal2016-11-231-1/+1
| | | | | | * lib/net/ftp.rb (shutdown): fix typo git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rescue Errno::EPROTOTYPE in FTPTest#test_list_read_timeout_exceeded.shugo2016-11-231-1/+1
| | | | | | | Errno::EPROTOTYPE is sometimes raised on Mac OS X 10.10. [ruby-core:78066] [Bug #12914] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Don't encode to UTF-8 if it's unnecessary.shugo2016-11-231-1/+3
| | | | | | | If the file system encoding is ISO-8851-1 or if the encoding of the target string is invalid, don't encode to UTF-8. [ruby-core:78271] [Bug#12972] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Disconnect immediately even if Net::FTP#close is called without quit.shugo2016-11-231-0/+16
| | | | | | | | | 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
* Add a new optinal argument pathname to FTP#stat.shugo2016-11-233-4/+40
| | | | | | | 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
* Use `&.` instead of `if` and `? :`kazu2016-11-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: warn ? followed by a wordnobu2016-11-221-2/+14
| | | | | | | * parse.y (parse_qmark): warn `?` with unbalanced space, which is interpreted as a conditional operator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-23svn2016-11-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use `&.` and `||=` instead of if guardsnobu2016-11-221-9/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* IOError does not happenkazu2016-11-221-6/+1
| | | | | | | * IOError does not happen even if another thread closes io * Use symbol proc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use `&.` instead of modifier ifkazu2016-11-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: optimize f_gt_p some casesmrkn2016-11-224-13/+25
| | | | | | | | | | | | | | * complex.c (f_gt_p): optimize f_gt_p for specific types of arguments. * internal.h (rb_int_gt, rb_float_gt, rb_rational_cmp): exported. * numeric.c (rb_float_gt): rename from flo_gt and be exported. * numeric.c (rb_int_gt): rename from int_gt and be exported. * rational.c (rb_rational_cmp): rename from nurat_cmp and be exported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add BufferedSSLSocket#send.shugo2016-11-222-0/+58
| | | | | | | SSLSocket#send is not defined, so use #write instead. flags and dest are ignored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: optimize Kernel#Complexmrkn2016-11-221-5/+4
| | | | | | | | * complex.c (nucomp_f_complex): use nucomp_s_convert directly. * complex.c (id_convert): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* webrick/server: simplify Daemon.startnormal2016-11-221-8/+2
| | | | | | | | | Process.daemon exists since Ruby 1.9.1 and does most of what we need. * lib/webrick/server.rb (Daemon.start): simplify [Misc #12937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* resolv: use symbol proc when possiblenormal2016-11-211-7/+3
| | | | | | | | This reduces both human code and bytecode. lib/resolv.rb (sender_for, Config.parse_resolv_conf): use symbol proc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket: use symbol proc for IO#close loopsnormal2016-11-211-6/+6
| | | | | | | | | | | Made possible by r56795, this reduces human and byte code size. * ext/socket/lib/socket.rb (self.ip_sockets_port0, self.tcp_server_sockets_port0, self.tcp_server_sockets, self.udp_server_sockets): use symbol proc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/open3: favor symbol proc when possiblenormal2016-11-211-6/+6
| | | | | | | | | It reduces both human and machine code; as well as reducing the confusion from variable naming. * lib/open3.rb (popen_run, pipeline, pipeline_run): avoid capture git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/*: remove closed checksnormal2016-11-2112-27/+23
| | | | | | | | | | | | | | | | | | | | Follow r56795. Since Ruby 2.2, calling #close on a closed socket no longer raises exceptions. * lib/cgi/session.rb (update): remove closed? check * lib/net/http.rb (finish, transport_request): ditto * lib/net/imap.rb (disconnect): ditto * lib/net/pop.rb (do_start, do_finish): ditto * lib/net/smtp.rb (do_start, do_finish): ditto * lib/open3.rb (popen_run, pipeline_run): ditto * lib/pstore.rb (transaction): ditto * lib/shell/process-controller.rb (sfork): * lib/tempfile (_close, call, Tempfile.create): ditto * lib/webrick/httpauth/htdigest.rb (flush): ditto * lib/webrick/httpauth/htpasswd.rb (flush): ditto * lib/webrick/server.rb (start_thread, cleanup_shutdown_pipe): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-22svn2016-11-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r56856nobu2016-11-212-2/+5
| | | | | | * parse.y: tCHAR can be concatenated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ftp.rb: fix typo [ci skip]nobu2016-11-211-1/+1
| | | | | | | * lib/net/ftp.rb (Net::FTP#initialize): [DOC] fix type in option name, :username is used but :use is not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add new options open_timeout and read_timeout to Net::FTP.new.shugo2016-11-212-2/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use dynamic dispatch instead of is_a?.shugo2016-11-211-14/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* net/http: avoid writing/reading from unstarted SSL socketrhe2016-11-211-30/+33
| | | | | | | | | | | | | | | | When net/http connects to an HTTPS server through a CONNECT proxy, it writes the CONNECT request to an unconnected OpenSSL::SSL::SSLSocket. OpenSSL::SSL::SSLSocket traditionally fallbacks to a method call on the underlying IO object if a read/write method is called before the TLS connection is established. So it automagically works correctly, emitting the "SSL session is not started yet" warning. This is not obvious at first glance. The warning is also noisy. Let's just write to the plain socket instead of relying on the SSLSocket's behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: tCHAR cannot be concatenatednobu2016-11-211-2/+2
| | | | | | | * parse.y (strings): tCHAR is not a subject of string literal concatenation and string interpolation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-21svn2016-11-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: refine error messagenobu2016-11-212-8/+20
| | | | | | | * numeric.c (rb_num_get_rounding_option): refine error message at invalid rounding mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: enable Proc#to_s rdocnobu2016-11-201-8/+8
| | | | | | * proc.c (proc_to_s): move just after the rdoc comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: suppress warningnobu2016-11-201-1/+1
| | | | | | | * proc.c (NO_CLOBBERED): suppress clobbered warning which appears only on mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove an unused variable to suppress a warning.shugo2016-11-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: suppress warningsnobu2016-11-201-1/+1
| | | | | | | * ext/win32ole/win32ole.c (g_ole_initialized): compare with 0 instead of cast to get rid of pointer-to-int-cast warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e