* array.c (ary_add_hash): set and return values because string keys
  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
* array.c (rb_ary_uniq_bang): remove duplicate code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_rubyoptions.rb (TestRubyOptions::SEGVTest::ExpectedStderr):
  ignore fault address.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Add a description about string-scrub.gem to NEWS

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/ruby.h (struct RClass): Add wrapper struct around
  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
* load.c (features_index_add_single): Move loaded_features_index array 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
* array.c (rb_hash_rehash): use hash_alloc() instead of rb_hash_new().
  [Bug #9187]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (rb_obj_clone): Protect FL_PROMOTED and FL_WB_PROTECTED
  flags of a destination object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ChangeLog: complement the intention

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/net/smtp.rb:  [DOC] Fix typo

s/raies/raises/
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vm_eval.c: rb_catch_protect

* 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
hash.c: detect recursion for all

* 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
hash.c: same hash value for similar constructs

* 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
* object.c (rb_obj_clone): don't copy FL_WB_PROTECTED of a
  original object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
gc.c: use malloc_size

* 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
delegate.rb: ignore unset target

* 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-04

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (fstr_update_callback): Improve implementation in r43968
  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
* vm_trace.c (rb_suppress_tracing): Fix initialization of stack
  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
string.c: fix declaration-after-statement

* 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