* 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
* 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
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
`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
This version fixes some setup commands.
01e797f6aa/History.txt (L3)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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
* 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
* 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: [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: [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
* 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
* 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/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
* 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
* 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
* 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
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
* vm_trace.c (rb_postponed_job_t): remove `th` field because it is not used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e