aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* proc.c: assume rb_iseq_location_t::first_lineno is always availablewip-topic/thread-fix-start-with-empty-iseqKazuki Yamaguchi2016-11-202-14/+7
| | | | | | | | | | | | | | | | | | rb_iseq_location_t::first_lineno (typically referenced as iseq->body->location.first_lineno, where iseq is an rb_iseq_t *) can always be assumed to contain a Fixnum regardless of whether struct rb_iseq_constant_body::line_info_table (likewise, iseq->body->line_info_table) is NULL or non-NULL. This fixes TypeError on starting a new thread with an empty Proc with trace instructions disabled. The TypeError comes from thread_pthread.c, in native_set_thread_name(), where it expects the line number returned from rb_proc_location(). The number can be nil if the line_info_table is NULL. The check seems to be the remains from the days before the dedicated 'first_lineno' field was introduced. So remove it. This also modifies two other places, Proc#to_s and method redefinition code, in the same way.
* vm_core.h: remove useless declaration of rb_backtrace_iter_funcKazuki Yamaguchi2016-11-201-1/+0
| | | | | It is no longer used as of r35787 ("vm.c: refactoring backtrace related funcitons", 2012-05-25).
* thread.c: make thread_debug() print to stderrKazuki Yamaguchi2016-11-201-6/+5
| | | | | | Make thread_debug() print to stderr rather than stdout. The current behavior is inconvenient because it causes "make all" to fail if THREAD_DEBUG is set to 1.
* 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
* get rid of test failures introduced at r56848usa2016-11-201-1/+1
| | | | | | | | * ext/rubyvm/lib/forwardable/impl.rb: remove an unused variable definition to get rid of a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* forwardable/impl.rbnobu2016-11-204-15/+50
| | | | | | | | * lib/forwardable/impl.rb (_valid_method?, _compile_method): extract to separate implementation specific part. [ruby-core:78138] [Bug #12938] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remote_address should be called on @bare_sock.shugo2016-11-202-2/+2
| | | | | | Because @sock.remote_address fails if @sock is an SSLSocket. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* shutdown(2) should not be called for SSLSocket.shugo2016-11-201-4/+6
| | | | | | | SSLSocket#stop is a private method and cannot be called, but explicit calls are not necessary because SSL_shutdown() is called from SSLSocket#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-20svn2016-11-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c: independent of libgcc_s_seh-1.dll [Bug #12959] suke2016-11-191-1/+1
| | | | | | | Thanks to Tsuyoshi Morita for bug report. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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