* vm.c (ruby_vm_stat): add RubyVM.stat() for access to internal cache
counters. this methods behaves like GC.stat, accepting an optional
hash or symbol argument. [Bug #9190] [ruby-core:58750]
* test/ruby/test_rubyvm.rb: test for new method
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (rb_hash_replace): add a write barrier to fix GC mark miss on
hashes using Hash#replace [Bug #9226] [ruby-core:58948]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (register_symid_str): use fstrings in symbol table
[Bug #9171] [ruby-core:58656]
* parse.y (rb_id2str): ditto
* string.c (rb_fstring): create frozen_strings on first usage. this
allows rb_fstring() calls from the parser (before cString is created)
* string.c (fstring_set_class_i): set klass on fstrings generated
before cString was defined
* string.c (Init_String): convert frozen_strings table to String
objects after boot
* ext/-test-/symbol/type.c (bug_sym_id2str): expose rb_id2str()
* test/-ext-/symbol/test_type.rb (module Test_Symbol): verify symbol
table entries are fstrings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* class.c (rb_get_kwargs): fix returning uninitialized value when no
optional keywords.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (rb_execarg_fixup): use RHASH_TBL_RAW and insert write
barriers where appropriate
* vm.c (kwmerge_i): use RHASH_TBL_RAW
* vm.c (HASH_ASET): use rb_hash_aset instead of calling directly into
st_insert
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (rb_hash_reject): copy unrejected elements only to new hash,
so that the change on the original receiver can affect.
[ruby-core:58914] [Bug #9223]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_struct.rb (test_question_mark_in_member): true value
has no meanings itself. use assert_same instead.
* test/ruby/test_struct.rb (test_bang_mark_in_member): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_struct.rb (test_question_mark_in_member): assert_true
is a method in test-unit. use assert_predicate instead.
* test/ruby/test_struct.rb (test_bang_mark_in_member): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Increase oldmalloc_increase with malloc_increase
instead of using obj_memsize_of().
This change will avoid the danger of memory full without major GC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
oldmalloc_increase_limit at Init_heap.
rb_objspace_alloc() is not called on some platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
care about underflow.
* gc.c (objspace_malloc_increase): use it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c (rb_get_kwargs): get keyword argument values from an
option hash, not only checking keys.
* dir.c (dir_initialize): use rb_get_kwargs.
* gc.c (gc_start_internal): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c (recursive_list_access): let symbol only hashes compare
the elements by id.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* misc/ruby-mode.el (ruby-brace-to-do-end): split single line block.
* misc/ruby-mode.el (ruby-do-end-to-brace): shrink single line block
to one line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
heap_pages_free_unused_pages() here.
It was done in after_sweep().
* gc.c (rb_gc): The reason is now GPR_FLAG_CAPI.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (gc_start_internal): GC.start() now accepts two optional
keyword arguments. These can be used to disable full_mark (minor
mark only) or disable immediate_sweep (use lazy sweep). These new
options are useful for benchmarking GC behavior, or performing minor
GC out-of-band.
* test/ruby/test_gc.rb (class TestGc): tests for new options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Use rubygems.org and www.ruby-toolbox.com instead of RAA. [Bug #9197]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
treat 0.0 and -0.0 of floating-point numbers specially for an optimization
and to correctly propagate its signbit to the result.
[Bug #9214] [ruby-core:58858]
* test/bigdecimal/test_bigdecimal.rb: add tests case for the above change.
* test/bigdecimal/test_bigdecimal_util.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/mkmf.rb (configuration): strip destdir part from prefix to get
rid of duplication. a patch by arton at [ruby-core:58859].
[ruby-core:58856] [Bug #9213]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/strip-rdoc.rb: read in binary mode to get rid of errors by
non-ascii characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bootstraptest/test_thread.rb: String#=~ does not accept String.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_or): lhs elements are prefered, so should not
replace with rhs elements.
* test/ruby/test_array.rb (test_OR_in_order): import the test failed
by r43969 from rubyspec/core/array/union_spec.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e