aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* string.c: fix memory leak in rb_str_change_terminator_length()work2Kazuki Yamaguchi2017-11-122-17/+24
| | | | | str_make_independent_expand() cannot be used for a String that has its own buffer.
* parse.y: constified YYLTYPEnobu2017-11-111-119/+119
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-11-11svn2017-11-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c(ole_const_load): suppress constant redefinitionsuke2017-11-111-2/+4
| | | | | | warnings when WIN32OLE.const_load [Bug #14085] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bin/erb: change template file encoding to UTF-8k0kubun2017-11-103-1/+9
| | | | | | | | | | | | | Unlike Ruby source file encoding (script encoding) whose default is changed to UTF-8 in Ruby 2.0 (Feature #6679), template's file encoding given to erb(1) has been ASCII-8BIT since ERB supports m17n at r21170. Like Ruby source file encoding, erb template file encoding should be UTF-8 in Ruby 2. [Bug #14095] [ruby-core:83708] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix a typo [ci skip]kazu2017-11-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Make `rb_ast_dispose` use `RB_OBJ_WRITE`mame2017-11-101-5/+5
| | | | | | | | | This fixes the mistake of r60722. I used `rb_gc_writebarrier_remember` to notify to GC that the references is changed. But the function just adds the object to the remember set blindly. Ko1 told me that `RB_OBJ_WRITE` is suitable in this case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .travis.yml: workaround to resolve ::1k0kubun2017-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | Container-based Trusty environment (sudo: false) does not support IPv6. https://github.com/travis-ci/travis-ci/issues/3302 And the image has "::1 localhost ip6-localhost ip6-loopback" entry in addition to "127.0.0.1 localhost" in /etc/hosts. Thus when it can resolve localhost to ::1 and CI fails. To resolve this, at least we need to modify /etc/hosts for now but we can't modify /etc/hosts without sudo. So I enabled sudo. As Sudo-enabled VM didn't have "::1 localhost" entry, this change fixed the cause without touching /etc/hosts. Since boot of `sudo: required` is slower than `sudo: false`, please revert this commit anytime when Container-based Trusty environment is updated and ::1 issue has gone. https://docs.travis-ci.com/user/reference/overview/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c: disasm only once for each iseqnobu2017-11-101-1/+6
| | | | | | | * iseq.c (rb_iseq_disasm): do not dump repeatedly same iseq which has been dumped by catch tables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Do not define test method instead of skip when Calendar class is not defined.hsbt2017-11-104-17/+5
| | | | | | | Revisit r34739. Patch by MSP-Greg. [Bug #14088][ruby-core:83690][fix GH-1743] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refactoring about source line.ko12017-11-102-17/+8
| | | | | | | | | * iseq.c (find_line_no): renamed to rb_iseq_line_no(). * vm_backtrace.c (calc_lineno): add a comment why we need to use "pos-1". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c: operand lvarnobu2017-11-092-10/+45
| | | | | | | * iseq.c (rb_insn_operand_intern): show local variable operand name in unified instructions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mk_call_iseq_optimized.rb: add mode string [ci skip]nobu2017-11-091-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/matrix: Remove method catalog [doc] [ci-skip]marcandre2017-11-091-104/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-11-10svn2017-11-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* TracePoint.new: raise ArgumentError when no block given [#14074]marcandre2017-11-092-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: optimize nested string interpolationsnobu2017-11-091-1/+66
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* insn_info/insns_infoko12017-11-094-68/+93
| | | | | | | | | | | | | | * iseq.h (iseq_line_info_entry): rename to iseq_insn_info_entry. * vm_core.h (rb_iseq_constant_body): rename field name line_info_table to insns_info and also from line_info_size to insns_info_size. * compile.c (INSN): add struct insn_info to contain per insn information. * compile.c (add_insn_info): added to add new insn_info entry. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix backtrace on argment error.ko12017-11-093-0/+49
| | | | | | | | | | | * vm_backtrace.c (rb_backtrace_use_iseq_first_lineno_for_last_location): added. It modifies last location's line as corresponding iseq's first line number. * vm_args.c (raise_argument_error): use added function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix peephole optimization.ko12017-11-092-3/+7
| | | | | | | | | | | | * compile.c (iseq_peephole_optimize): do not need to put `pop` instruction. * test/ruby/test_optimization.rb (test_peephole_optimization_without_trace): This code "def foo; 1.times{|(a), &b| nil && a}; end" fails to compile by stack underflow because of above bug (fixed by this patch). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* node.c (dump_node): add an explanation of NODE_HASH's nd_alenmame2017-11-091-0/+7
| | | | | | | | The field has a flag to represent if it is a keyword argument (that has no braces, e.g., `foo(k:1)`) or hash literal (that has braces, e.g., `foo({k:1})`). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use `rb_ast_dispose` instead of `rb_ast_free`mame2017-11-091-1/+1
| | | | | | | `rb_ast_dispose` calls `rb_gc_writebarrier_remember`. Unless we call it, the marked objects may not be GC'ed until `rb_ast_t` is GC'ed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge rubygems-2.7.2.hsbt2017-11-092-1/+25
| | | | | | | This version fixes some setup commands. https://github.com/rubygems/rubygems/blob/01e797f6aa045fd09df7813d0b5448e3667172a9/History.txt#L3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix r60644nobu2017-11-081-5/+2
| | | | | | | | | * parse.y (rb_strterm_heredoc_t): should not define sourceline as union, to fix wrong read on big-endian platforms. as rb_imemo_new stores all members as VALUEs, should read it as VALUE too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-11-09svn2017-11-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typo in doc [ci skip]a_matsuda2017-11-081-2/+2
| | | | | | | | | | | `enable` and `disable` are instance methods. Patch by: yuuji.yaginuma <yuuji.yaginuma@gmail.com> https://github.com/ruby/ruby/pull/1744 [Fix GH-1744] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixup r60440 [ci skip]kazu2017-11-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: remove in_singlenobu2017-11-081-15/+11
| | | | | | | * parse.y (parser_params): removed in_single, which is referenced with in_def always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typos in rdocknu2017-11-081-3/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Omit first argument of NEW_CASE2yui-knk2017-11-082-2/+2
| | | | | | | | * node.h (NEW_CASE2): Omit first argument of NEW_CASE2, bacause the first argument of NEW_CASE2 is always 0. * parse.y: Ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: improve docs for Hash#slicestomar2017-11-071-5/+4
| | | | | | | | | * hash.c: [DOC] clarify description for Hash#slice and remove a sentence that might suggest that the receiver is modified; improve example to also include a case where a hash with several elements is returned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: improve docs for String#{concat,<<}stomar2017-11-071-6/+8
| | | | | | | | | * string.c: [DOC] remove a misleading call-seq for String#concat, which suggests that all arguments must be Integers in this case; also clarify in the example that the receiver is modified; fix grammar for String#<<; move references to the end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* pathname.c: improve docs for Pathnamestomar2017-11-071-3/+3
| | | | | | | | * ext/pathname/pathname.c: [DOC] improve example for Pathname.glob, by using a more common glob pattern, and improve the reference to the `base' keyword argument for Pathname#glob. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* http.rb: improve docsstomar2017-11-071-5/+5
| | | | | | * lib/net/http.rb: [DOC] fix typos and grammar git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket.c,tcpsocket.c: improve deprecation noticesstomar2017-11-072-12/+12
| | | | | | | * ext/socket/socket.c: [DOC] fix grammar in deprecation notices. * ext/socket/tcpsocket.c: [DOC] ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_dump.c: [DOC] fix grammarstomar2017-11-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: fix typosstomar2017-11-071-2/+2
| | | | | | * string.c: [DOC] fix typos in doxygen comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: improve docs for File#pathstomar2017-11-071-2/+3
| | | | | | | * file.c: [DOC] fix grammar in docs for File#path and use a stronger description than "inaccurate". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/socket/ifaddr.c: [DOC] fix typostomar2017-11-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* etc.c: improve docs for sysconfdirstomar2017-11-071-3/+3
| | | | | | * ext/etc/etc.c: [DOC] small language fixes for etc_sysconfdir docs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* README.md: fix typos and grammarstomar2017-11-071-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: clarify "ubygems.rb" entrystomar2017-11-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-11-08svn2017-11-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refinements.rdoc: improve docsstomar2017-11-071-3/+4
| | | | | | | * doc/syntax/refinements.rdoc: [DOC] fix typos and grammar and remove superfluous "for the first time". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* disable GC.ko12017-11-071-4/+9
| | | | | | | | * test/ruby/test_io.rb (test_write_no_garbage): malloc can cause GC and it will reduce string object counts. So disable GC during this test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/runruby.rb: fix RUNRUBY_USE_GDB casenobu2017-11-071-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* `th` is not used.ko12017-11-071-7/+7
| | | | | | | | | | * vm_args.c: `th` parameter is not used on the following functions: * args_check_block_arg0 * keyword_hash_p * args_pop_keyword_hash git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* th->ec: dtraceko12017-11-075-31/+31
| | | | | | | | * vm.c (ruby_th_dtrace_setup): rename to rb_dtrace_setup() and accept `ec`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* `rb_execution_context_t *` should not be `th`ko12017-11-073-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Symptomatic treatment for `rb_thread_terminate_all` freezemame2017-11-071-1/+4
| | | | | | | | | | | | | | Under uncertain condition, `rb_thread_terminate_all` gets stuck. `make test-all TESTOPTS="test/ruby/test_gc.rb -n test_interrupt_in_finalizer` fails very rarely (only once every thousand runs). This IS a bug, but seems difficult to fix it soon. This commit makes `rb_thread_terminate_all` wake up every one second, instead of waiting forever, which mitigates the unuseful freeze. This is not an essential solution for the bug, though. I'll create a ticket with how to reproduce the original issue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e