summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-12-05fix matchingnobu
* 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
2013-12-05array.c: prefer lhs elementsnobu
* 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
2013-12-05* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: [DOC] minor typotmm1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05* gc.c (gc_info_decode): fix to avoid syntax error on VS2012.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05test_gc.rb: expand timeoutnobu
* test/ruby/test_gc.rb (test_sweep_in_finalizer): expand timeout for slower machines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05* lib/webrick/httpresponse.rb: [DOC] Fix typoa_matsuda
s/resopnse/response/ [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05st.c: tweaked commentduerst
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: add GC.latest_gc_info()tmm1
* gc.c (struct rb_objspace): rename internal last_collection_flags to latest_gc_info * gc.c (gc_latest_collection_info): add GC.latest_gc_info() with similar behavior to GC.stat() * gc.c (rb_gc_latest_gc_info): new c-api for above * gc.c (gc_stat_internal): remove :last_collection_flags from GC.stat * gc.c (gc_profile_decode_flags): remove GC::Profiler.decode_flags * include/ruby/intern.h (rb_gc_latest_gc_info): export new c-api * test/ruby/test_gc.rb (class TestGc): test for new behavior * NEWS: note about new api * gc.c (gc_stat_internal): raise TypeError on wrong type * gc.c (gc_stat): fix error message git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05ext/objspace: remove OS.after_gc_start_hook= and move internal testtmm1
* ext/objspace/gc_hook.c: remove this file * ext/-test-/tracepoint/gc_hook.c: new filename for above * ext/objspace/objspace.c: remove ObjectSpace.after_gc_start_hook= * test/objspace/test_objspace.rb: remove test * test/-ext-/tracepoint/test_tracepoint.rb: add above test for tracepoint re-entry git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05* gc.c: change function names vm_ prefix to objspace_ prefix.ko1
They are objspace_ functionality. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: expose GC.stat() to C-api via rb_gc_stat()tmm1
* include/ruby/intern.h: add rb_gc_stat() for access to GC.stat variables from c-api * gc.c (rb_gc_stat): new c-api method. accepts either VALUE hash like GC.stat, or VALUE symbol key and returns size_t directly. the second form is useful to avoid allocations, i.e. for usage inside INTERNAL_EVENT_GC tracepoints. * gc.c (gc_stat): add GC.stat(:key) to return single value instead of hash * gc.c (gc_stat_internal): helper method to retrieve single or all stat values * test/ruby/test_gc.rb (class TestGc): test for new behavior * NEWS: note about this new api git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05ChangeLog: about malloc_size(3) availabilitynobu
* ChangeLog: malloc_size(3) on MacOS X says it's a BSD Library Function, so possibly some other BSDs may have but seems unavailable on FreeBSD at least. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05hash.c: bail out to the outermost framenobu
* hash.c (rb_hash): revert r43981 and bail out to the outermost frame when recursion is detected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05test_hash.rb: import tests from rubyspecnobu
* test/ruby/test_hash.rb: import tests for recursive hash values from rubyspec/core/{array,hash}/hash_spec.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05test_hash.rb: move testsnobu
* test/ruby/test_hash.rb: move hash value tests from test_array.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05test_gc.rb: shortennobu
* test/ruby/test_gc.rb (test_sweep_in_finalizer): omit iteration number to 2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05vm_eval.c: suppress warningnobu
* vm_eval.c (rb_catch_obj): add cast to suppress warning by VC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05* gc.c (vm_malloc_size): added.ko1
return malloc_usable_size() if possible. * gc.c (MALLOC_ALLOCATED_SIZE): add new setting macro to enable GC.allocated_size. If platform supports `malloc_usable_size()' (or similar one), GC.allocated_size can be implemented with this function. Default is 0. * gc.c (vm_xmalloc, vm_xrealloc, vm_xfree): use vm_malloc_size() to detect collect allocated size. * gc.c (vm_malloc_increase): refactoring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: split GC_END event into GC_END_MARK and GC_END_SWEEPtmm1
* include/ruby/ruby.h: remove INTERNAL_EVENT_GC_END and replace with two new events: GC_END_MARK and GC_END_SWEEP * gc.c (gc_after_sweep): emit GC_END_SWEEP after lazy sweep is done * gc.c (gc_marks_body): emit GC_END_MARK at end of minor/major mark * ext/-test-/tracepoint/tracepoint.c (struct tracepoint_track): tests for new events. * test/-ext-/tracepoint/test_tracepoint.rb (class TestTracepointObj): ditto. * NEWS: remove ObjectSpace.after_gc_*_hook. These are only a sample, and will be removed before ruby 2.1. * ext/objspace/gc_hook.c: remove ObjectSpace.after_gc_end_hook= git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05ruby_atomic.h: ATOMIC_PTR_EXCHANGEnobu
* ruby_atomic.h (ATOMIC_PTR_EXCHANGE): atomic exchange function for a generic pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05ruby_atomic.h: duplicate codenobu
* ruby_atomic.h (ATOMIC_SIZE_CAS): remove duplicate code as ATOMIC_CAS(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: flush all deferred finalizersnobu
* gc.c (finalize_deferred): flush all deferred finalizers while other finalizers can get ready to run newly by lazy sweep. [ruby-core:58833] [Bug #9205] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: rb_gc_set_paramsnobu
* gc.c (rb_gc_set_params): define as separate function. RUBY_ALIAS_FUNCTION is for simple alias only, the third parameter will be ignored on gcc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05* 2013-12-05svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: Load GC tuning settings earlier during boot.tmm1
* gc.c (ruby_gc_set_params): Accept safe_level argument so GC tuning settings can be applied before rb_safe_level() is available. * internal.h (rb_gc_set_params): ditto. * ruby.c (process_options): Apply GC tuning early during boot process so boot-time allocations can benefit. This also benefits any code loaded in via `ruby -r`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-04* lib/webrick/httpproxy.rb: [DOC] Fix typoa_matsuda
s/bacause/because/ [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-04* test/ruby/test_array.rb (test_recursive_hash_value): rename.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-04string.c: fix declaration-after-statementnobu
* string.c (fstr_update_callback): move a variable declaration since ISO C90 forbids mixed declarations and code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-04* vm_trace.c (rb_suppress_tracing): Fix initialization of stacktmm1
allocated rb_trace_arg_t structure. Without this patch, sometimes INTERNAL_EVENT_GC would be skipped accidentally inside rb_threadptr_exec_event_hooks_orig(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-04* string.c (fstr_update_callback): Improve implementation in r43968tmm1
based on feedback from @nagachika. In the existing case, we can return ST_STOP to prevent any hash modification. In the !existing case, set both key and value to the fstr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-04* 2013-12-04svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-04delegate.rb: ignore unset targetnobu
* lib/delegate.rb (Delegator#method_missing): ignore the target if not set, and delegate to global methods. [ruby-core:58572] [Bug #9155] * lib/delegate.rb (Delegator#respond_to_missing): ditto. * lib/delegate.rb (SimpleDelegator#__getobj__): yield and return if not delegated but a block is given, like as Hash#fetch. * lib/delegate.rb (DelegateClass#__getobj__): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03gc.c: use malloc_sizenobu
* configure.in: check malloc_size() available on BSD. * gc.c: use malloc_size() with malloc/malloc.h on BSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* object.c (rb_obj_clone): don't copy FL_WB_PROTECTED of anari
original object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03hash.c: same hash value for similar constructsnobu
* hash.c (rb_hash_recursive): make similar (recursive) constructs return same hash value. execute recursively, and rewind to the topmost frame with an object which .eql? to the recursive object, if recursion is detected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03hash.c: detect recursion for allnobu
* hash.c (rb_hash): detect recursion for all `hash' methods. each `hash' methods no longer need to use rb_exec_recursive(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03vm_eval.c: rb_catch_protectnobu
* vm_eval.c (rb_catch_protect): new function similar to rb_catch_obj(), but protect from all global jumps like as rb_load_protect(), rb_protect(), etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* lib/net/smtp.rb: [DOC] Fix typoa_matsuda
s/raies/raises/ [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03ChangeLog: complement the intentionnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* object.c (rb_obj_clone): Protect FL_PROMOTED and FL_WB_PROTECTEDnari
flags of a destination object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* array.c (rb_hash_rehash): use hash_alloc() instead of rb_hash_new().glass
[Bug #9187] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* load.c (features_index_add_single): Move loaded_features_index array ↵tmm1
values off the ruby heap. [Bug #9201] [ruby-core:58805] * load.c (loaded_features_index_clear_i): Clean up off-heap array structure. * vm.c (rb_vm_mark): Remove unnecessary mark_tbl for loaded_features_index. This improves minor GC time by 15% in a large application. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* include/ruby/ruby.h (struct RClass): Add wrapper struct aroundtmm1
RClass->m_tbl with serial. This prevents double marking method tables, since many classes/modules can share the same method table. This improves minor mark time in a large application by 30%. * internal.h (struct method_table_wrapper): Define new wrapper struct with additional serial. * internal.h (RCLASS_M_TBL_INIT): New macro for initializing method table wrapper and st_table. * method.h (void rb_sweep_method_entry): Rename rb_free_m_table to rb_free_m_tbl for consistentcy * .gdbinit (define rb_method_entry): Update rb_method_entry gdb helper for new method table structure. * class.c: Use RCLASS_M_TBL_WRAPPER and RCLASS_M_TBL_INIT macros. * class.c (rb_include_class_new): Share WRAPPER between module and iclass, so serial can prevent double marking. * eval.c (rb_prepend_module): ditto. * eval.c (rb_using_refinement): ditto. * gc.c: Mark and free new wrapper struct. * gc.c (obj_memsize_of): Count size of additional wrapper struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03Add a description about string-scrub.gem to NEWSnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* test/ruby/test_rubyoptions.rb (TestRubyOptions::SEGVTest::ExpectedStderr):nobu
ignore fault address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* array.c (rb_ary_uniq_bang): remove duplicate code.glass
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* array.c (ary_add_hash): set and return values because string keysglass
will be frozen. [ruby-core:58809] [Bug #9202] * array.c (rb_ary_uniq_bang): ditto. * array.c (rb_ary_or): ditto. * array.c (rb_ary_uniq): ditto. * test/ruby/test_array.rb: tests for above. The patch is from normalperson (Eric Wong). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* string.c (rb_fstring): Use st_update instead of st_lookup +tmm1
st_insert. * string.c (fstr_update_callback): New callback for st_update. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03rdoc/constant.rb: reapply r43006 for workaround ofnobu
NoMethodError * lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for NoMethodError when the original of alias is not found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e