aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* net/http: avoid reading/writing from unstarted SSL sockettopic/net-http-unstarted-sslsocketKazuki Yamaguchi2016-11-201-18/+21
| | | | | | | | | | | | | This is currently done when net/http connects to an HTTPS server through a CONNECT proxy. OpenSSL::SSL::SSLSocket traditionally forwards to a method call to the underlying IO object if an IO-ish method is called before the TLS connection is established on it. So it is working correctly, but this is not obvious at first glance. Let's avoid the behavior. This will also eliminates the warning "SSL session not started yet" that appears on $VERBOSE.
* re.c: make MatchData#hash and #== check the MatchData is initializedKazuki Yamaguchi2016-11-192-1/+5
| | | | | | | | Fix possible segfaults that can occur if they are called against an uninitialized MatchData. MatchData#hash now calls match_check() before dereferencing the String, and MatchData#== (#eql?) checks that RMatch::regexp is non-zero.
* Use Socket instead of TCPSocket/TCPServer.shugo2016-11-191-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Expand abbreviated option names.shugo2016-11-192-21/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: rb_big_signnobu2016-11-192-3/+10
| | | | | | | * include/ruby/ruby.h (RBIGNUM_SIGN): use a wrapper function to return the sign bit, instead of comparing with 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Shut down TLS connections gracefully.shugo2016-11-191-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove garbage.shugo2016-11-191-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Move certificates to test/net/fixtures/.shugo2016-11-196-9/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2016-11-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support TLS and hash styles options for Net::FTP.new.shugo2016-11-193-22/+601
| | | | | | | | If the :ssl options is specified, the control connection is protected with TLS in the manner described in RFC 4217. Data connections are also protected with TLS unless the :private_data_connection is set to false. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* math.c: unused_objnobu2016-11-191-29/+29
| | | | | | | * math.c (exp1, exp2): use immediate 0 instead of rb_mMath, which is never used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dln.c: raise LoadErrornobu2016-11-191-1/+3
| | | | | | | | * dln.c (dln_load): raise LoadError instead of fatal error on recent OSX, dlclose seems fixed in El Capitan or later. [ruby-core:78200] [Bug #12956] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * NEWS: Added entry for optimized Rational. [Feature #12484] [ci skip]tadd2016-11-181-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: optimize f_negatemrkn2016-11-184-11/+35
| | | | | | | | | | | | | | | | * complex.c (f_negate): optimize for special numeric types. * complex.c (nucomp_expt): use rb_int_uminus instead of f_negate for fixnum value. * internal.h (rb_float_uminus, rb_rational_uminus): exported. * numeric.c (rb_float_uminus): rename from flo_uminus. * rational.c (rb_rational_uminus): rename from nurat_negate, and add assertion for the parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-19svn2016-11-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: optimization and refactoringmrkn2016-11-181-7/+7
| | | | | | | | | | | * rational.c (nurat_s_new_bang, nurat_canonicalize): small optimization by using rb_int_uminus instead of f_negate. * rational.c (nurat_canonicalize): add assertions for parameters. * rational.c (f_negate, id_negate): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: refactoringmrkn2016-11-181-13/+2
| | | | | | | | | | * complex.c (nucomp_abs): use rb_math_hypot directly. * complex.c (nucomp_arg): use rb_math_atan2 directly. * complex.c (imp2, m_{atan2,hypot}_bang, m_hypot): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* objspace.c:: indent [ci skip]yui-knk2016-11-181-1/+1
| | | | | | * ext/objspace/objspace.c (memsize_of_m): adjust indent of comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * NEWS: Fix class nameyui-knk2016-11-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: round macrosnobu2016-11-183-16/+26
| | | | | | | * internal.h (ROUND_FUNC, ROUND_CALL): macros wrapping round functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-18svn2016-11-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: removed compiled? method [ci skip]nobu2016-11-182-8/+1
| | | | | | | | | * ext/extmk.rb (compiled?): removed. * ext/win32/extconf.rb: try to install libraries regardless fiddle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove webhook notification to Travis CI [skip ci]hsbt2016-11-171-7/+0
| | | | | | | | | | | | | | | As travis-rubies now uses 3 Mac jobs to create archives for various OS releases. This is a bit wasteful if multiple builds pass in a short period. Instead, Travis CI is now running a nightly build of ruby-head (around 22:30 UTC). This will happen regardless of the state of the master branch. Author: Hiro Asari <asari.ruby@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* readline.c: str_subposnobu2016-11-171-6/+22
| | | | | | | * ext/readline/readline.c (str_subpos): make string instance only if necessary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: get rid of a compile error on mingw64usa2016-11-171-1/+1
| | | | | | | * numeric.c (rb_fix2str): typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-17svn2016-11-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mkconfig.rb: add a magic comment to rbconfig.rbshugo2016-11-171-0/+1
| | | | | | | * tool/mkconfig.rb: add a magic comment to rbconfig.rb in case the command line option -K is specified. [ruby-core:78181] [Bug #12949] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: fix next rotate timenobu2016-11-162-11/+160
| | | | | | | | | | * lib/logger.rb (Logger::LogDevice#initialize): calculate next rotate time based on the mtime of the last existing file. [ruby-dev:49881] [Bug #12948] Author: Tsukasa Oishi <tsukasa.oishi@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/logger/test_logdevice.rb: heredoc stylesnobu2016-11-161-12/+21
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby-additional.el: unquoted code blocknobu2016-11-161-1/+1
| | | | | | | | * misc/ruby-additional.el (ruby-insert-heredoc-code-block): make code between "begin;" and "end;" unquoted. still quotable before "begin;". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: compressed debug section optionnobu2016-11-161-4/+12
| | | | | | | * configure.in: make compressed debug section optional. [ruby-core:78121] [Bug #12934] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_flip.rb: r56316nobu2016-11-161-0/+21
| | | | | | | * test/ruby/test_flip.rb (test_input_line_number_range): test for r56316. [ruby-core:78162] [Bug #12947] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* math.c: remove needless ifdef clausemrkn2016-11-161-4/+0
| | | | | | | * math.c (ifdef M_PI): M_PI is eventually defined in missing.h even if math.h doesn't supply it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: optimize Numeric#polar and Numeric#argmrkn2016-11-164-10/+37
| | | | | | | | | | | | | | | | | | | * complex.c (numeric_polar): optimize for Integer, Float, and Rational. * complex.c (numeric_arg): directly create the value of pi. * complex.c (f_negative_p): optimize for Integer, Float, and Rational. * rational.c (INT_NEGATIVE_P): move the definition into internal.h. * internal.h (INT_NEGATIVE_P): ditto. * numeric.c (rb_float_abs): rename from flo_abs and export to be used from other source files.. * internal.h (rb_float_abs): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: optimize Rational#absmrkn2016-11-161-0/+26
| | | | | | | * rational.c (rb_rational_abs): optimize Rational#abs with the specialized implementation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix a typo.hsbt2016-11-161-1/+1
| | | | | | https://github.com/ruby/psych/commit/18d13b1df09504548feb4cb9b259fed552d6a4d5 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixed regression of typo fix.hsbt2016-11-162-20/+20
| | | | | | | Picked from upstream: https://github.com/ruby/psych/commit/66fb7fb77533d0606748940288858794752d95cb [ci skip][ruby-dev:49879][Bug #12942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-16svn2016-11-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix regexp and typokazu2016-11-151-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use rb_mod_name instead of classnamenaruse2016-11-151-2/+1
| | | | | | classname() is static function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ftp.rb: use Addrinfo interfacesshugo2016-11-152-3/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: purge id_eqeq_p and limit return valuenobu2016-11-151-6/+7
| | | | | | | | | * complex.c (f_eqeq_p): use rb_equal. * complex.c (nucomp_eqeq_p): limit return value to true or false, instead of the result of the other as-is. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket.rb: remove closed checksnobu2016-11-151-15/+15
| | | | | | | * ext/socket/lib/socket.rb: remove unnecessary closed checks, close on closed socket no longer raises an exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ftp.rb: use Addrinfonobu2016-11-151-6/+6
| | | | | | | * lib/net/ftp.rb (sendport, makeport, makepasv, BufferedSocket): use Addrinfo interfaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* st.c: fix crashes on huge hash tablesnormal2016-11-151-2/+2
| | | | | | | | | | | | | | From: Vladimir Makarov <vmakarov@redhat.com> By Vladimir's estimation, this requires at least 64 GB of memory to reproduce this bug due to the hash sizes required. So there is no new test case (and I am unable to test it, myself). * st.c (get_bins_num): avoid out-of-bounds on shift by using correct type [ruby-core:78139] [Bug #12939] * st.c (get_allocated_entries): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/thread/test_queue.rb: Give up to ten seconds for threads toheadius2016-11-141-1/+4
| | | | | | reach expected state before proceeding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-15svn2016-11-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_module.rb: Method tables are not guaranteed to beheadius2016-11-143-3/+3
| | | | | | | | | ordered. * test/ruby/test_struct.rb: Ditto. * test/ruby/test_thread.rb: Thread locals are not guaranteed to be ordered. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* net/ftp.rb: kwargsnobu2016-11-141-3/+1
| | | | | | * lib/net/ftp.rb (Net::FTP#open_socket): use keyword argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* net/protocol.rb: kwargsnobu2016-11-145-18/+14
| | | | | | | * lib/net/protocol.rb (Net::BufferedIO#initialize): add keyword arguments for initial attributes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e