aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* string.c: unset STR_SHARED and STR_NOFREE flags in #initializetopic/string-expand-improvementsKazuki Yamaguchi2017-06-272-0/+4
|
* string.c: preserve coderange in rb_str_drop_bytes()Kazuki Yamaguchi2017-06-261-1/+8
| | | | It is currently always clears the coderange.
* string.c: preserve coderange in #setbyteKazuki Yamaguchi2017-06-261-2/+2
| | | | | Do not clear the coderange when 1) the string is heap-allocated, 2) the current coderange is 7bit, 3) the new byte is an ASCII character.
* string.c: remove a dead branch in str_fill_term()Kazuki Yamaguchi2017-06-261-8/+1
| | | | | The length of a string can never exceed the actual capacity returned by str_capacity().
* * 2017-06-26svn2017-06-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: fix debug printnobu2017-06-261-2/+2
| | | | | | | * compile.c (iseq_compile_each0): debugs/ruby_debug_printf do not support PRIsVALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: fix_sp_depthnobu2017-06-251-39/+111
| | | | | | | * compile.c (fix_sp_depth): separate fix-up of sp depth from code generation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-06-25svn2017-06-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: toplevel return in argumentnobu2017-06-252-1/+4
| | | | | | | | * compile.c (iseq_compile_each0): adjust the stack before return in an evstr/argument (reported by Balazs <balazs@kutilovi.cz>) to fix stack consistency error. [ruby-core:81761] [Bug #13678] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added version guards [Bug #12684]nobu2017-06-241-22/+33
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Delegate to `eql?` [Fix GH-1564]nobu2017-06-243-4/+56
| | | | | | | | * lib/delegate.rb (eql?): Delegate to `eql?` of the inner object. based on the patch by giginet <giginet.net@gmail.com>. [ruby-core:76950] [Bug #12684] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mspec.rb: keep jobserver fdsnobu2017-06-241-1/+1
| | | | | | | * spec/mspec/lib/mspec/commands/mspec.rb (MSpecMain#run): do not close jobserver FDs for mspec-run. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_sync.c: fix documentation for Queue#closenormal2017-06-231-1/+1
| | | | | | | | | | When Queue#closed? is true, using push/enq/<< will raise an exception, and not return nil. * thread_sync.c: fix documentation for Queue#close Thanks to John Anderson. [ruby-core:81749] [Misc #13673] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-06-24svn2017-06-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_command_processor.rb: add suffixnobu2017-06-231-1/+1
| | | | | | | * test/shell/test_command_processor.rb (test_option_type): Windows needs a suffix to execute. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: should not warn op method callnobu2017-06-235-5/+12
| | | | | | | * parse.y (void_expr_gen): should warn operator expression style calls only, but not method style calls. [Fix GH-1660] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: check multibyte charnobu2017-06-232-7/+17
| | | | | | | | * parse.y (parser_precise_mbclen): check invalid multibyte char at skipping strings following `?x` literal string, not to stuck in a infinite loop. [ruby-core:81746] [Bug #13672] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_core.h: sandwich jmpbufnobu2017-06-231-1/+6
| | | | | | | | * vm_core.h (rb_vm_tag): move jmpbuf which should be stored at the last in TH_PUSH_TAG, between tag and state so ensure to be accessible. reapplied r40806. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* move "state" to rb_vm_tag.ko12017-06-237-28/+18
| | | | | | | | * vm_core.h (rb_thread_t::tag_state): move to "rb_vm_tag::state". Lifetime of "state" should be same as current tag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rename th->state to th->tag_state.ko12017-06-237-25/+24
| | | | | | | | * vm_core.h (rb_thread_t): rename rb_thread_t::state to tag_state to make it clear. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rb_catch_protect() accepts enum ruby_tag_type *.ko12017-06-234-25/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: suppress warningnobu2017-06-231-2/+2
| | | | | | | * thread.c (exec_recursive): rb_catch_protect() uses `int*` as well as rb_protect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use "enum ruby_tag_type" and TAG_NONE.ko12017-06-2316-105/+105
| | | | | | | | | | | | | | | Return value of EXEC_TAG() is saved by "int state". Instead of "int", use "enum ruby_tag_type". First EXEC_TAG() value should be 0, so that define TAG_NONE (= 0) and use it. Some code used "status" instead of "state". To make them clear, rename them to state. We can change variable name from "state" to "tag_state", but this ticket doesn't contain it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use NULL instead of 0.ko12017-06-231-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip on other threads (again).ko12017-06-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r59151 which introduce failures.ko12017-06-231-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip on other threads.ko12017-06-231-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "Allow IO#reopen to take a block"glass2017-06-233-21/+0
| | | | | | This reverts r59142. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c: vm_stack_consistency_errornobu2017-06-232-2/+17
| | | | | | | * vm_insnhelper.c (vm_stack_consistency_error): extracted from insns.def for further info in the future. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-06-23svn2017-06-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refinements.rdoc: [DOC] improved [Fix GH-1659]nobu2017-06-231-14/+14
| | | | | | | | | | | | * doc/syntax/refinements.rdocrefinements.rdoc: grammatical correction and code highlighting improved * doc/syntax/refinements.rdocrefinements.rdoc: Fixnum replaced with Integer and Integer with Numeric Author: Shiva Bhusal <shivabhusal@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix mortal_dynamic_symbol countnobu2017-06-221-5/+10
| | | | | | | | * test/objspace/test_objspace.rb (test_count_symbols): exclude a dynamic symbol which has been turned into immortal by define_method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix exception type in option type checkerglass2017-06-222-1/+14
| | | | | | | | | | | | * lib/shell/system-command.rb (SystemCommand#initialize): `def_e2message` wraps error message, but does not define new exception * test/shell/test_command_processor.rb: add a test This patch is authored by Kenichi Kamiya <kachick1@gmail.com> close #1657 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use --dump option for parse rule.ko12017-06-221-1/+1
| | | | | | | | | | * common.mk: use --dump=--dump=parsetree_with_comment,insns instead of tool/parse.rb. maybe nobody use this option so that I believe it is enough. previous "parse" rule doesn't run script but patched parse rule runs specified script (on miniruby). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* try to fix symbol duplication.ko12017-06-221-1/+1
| | | | | | | | | | * test/objspace/test_objspace.rb (test_count_symbols): make more complex dynamic symbols to avoid conflict with other existing static symbols. Sometimes this test fails with "mortal_dynamic_symbol=>127". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Allow IO#reopen to take a blockglass2017-06-223-0/+21
| | | | | | | | | | | * io.c (rb_io_reopen): take a block and ensure the IO closed [Feature #2631] * test/ruby/test_io.rb: add a test * NEWS: add an entry for this change git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2017-06-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* introduce heap_allocatable_pages_set().ko12017-06-221-11/+40
| | | | | | | | * gc.c (heap_allocatable_pages_set): added. This function set heap_allocatable_pages and sorted_list atomically. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* catch up frozen_string_literal: true.ko12017-06-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* introduce GC_ASSERT().ko12017-06-221-66/+57
| | | | | | | | * gc.c (GC_ASSERT()): added. GC_ASSERT() is similar to VM_ASSERT in vm_core.h but turn on by RGENGC_CHECK_MODE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-06-22svn2017-06-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: expand sorted pagesnobu2017-06-223-31/+31
| | | | | | | * gc.c (heap_page_allocate): expand sorted pages before inserting allocated new page. [Bug #12670] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: FL_CHECK2nobu2017-06-211-3/+6
| | | | | | | * gc.c (FL_TEST2, FL_SET2, FL_UNSET2): make error messages consitent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * NEWS: Fix typo.eregon2017-06-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_string.rb: add tests to chomp substrsonots2017-06-211-0/+72
| | | | | | | | | * test/ruby/test_string.rb (TestString#test_chomp): add tests to chomp substr * test/ruby/test_string.rb (TestString#test_chomp!): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: add String#delete_prefix and String#delete_prefix!sonots2017-06-213-0/+165
| | | | | | | | | | | | | | to remove leading substr [Feature #12694] [fix GH-1632] * string.c (rb_str_delete_prefix_bang): add a new method to remove prefix destuctively. * string.c (rb_str_delete_prefix): add a new method to remove prefix non-destuctively. * test/ruby/test_string.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* RUBY_DEVEL flagnobu2017-06-215-1/+15
| | | | | | | | | | | * configure.in: define RUBY_DEVEL only in the trunk. * gc.c: enable runtime rgengc debug if RUBY_DEVEL * ruby.c (debug_option): enable RUBY_DEBUG in --debug option only if RUBY_DEVEL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: use AS_IFnobu2017-06-211-573/+571
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.c: debug options in command linenobu2017-06-212-6/+18
| | | | | | | * ruby.c (debug_option): parse options in --debug command line option same as RUBY_DEBUG env. available only in the trunk. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix Enumerable#uniq with non single yield argumentsnobu2017-06-212-0/+3
| | | | | | | | | * enum.c (uniq_func, uniq_iter): need packed value as the unique key. [ruby-core:81734] [Bug #13669] [Fix GH-1658] Author: Kenichi Kamiya <kachick1@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e