* insns.def, vm.c, vm_insnhelper.c, vm_insnhelper.h, vm_method.c: split
  ruby_vm_global_state_version into two separate counters - one for the
  global method state and one for the global constant state. This means
  changes to constants do not affect method caches, and changes to
  methods do not affect constant caches. In particular, this means
  inclusions of modules containing constants no longer globally
  invalidate the method cache.

* class.c, eval.c, include/ruby/intern.h, insns.def, vm.c, vm_method.c:
  rename rb_clear_cache_by_class to rb_clear_method_cache_by_class

* class.c, include/ruby/intern.h, variable.c, vm_method.c: add
  rb_clear_constant_cache

* compile.c, vm_core.h, vm_insnhelper.c: rename vmstat field in
  rb_call_info_struct to method_state

* vm_method.c: rename vmstat field in struct cache_entry to method_state

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2013-10-29

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (gc_profile_total_time): fix off-by-one error in GC::Profiler.total_time.
* test/ruby/test_gc.rb (class TestGc): test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/readline/readline.c (readline_getc): Consider
  NULL as input.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix typos

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ruby_atomic.h: ATOMIC_SIZE_CAS

* ruby_atomic.h (ATOMIC_SIZE_CAS): new macro, compare and swap size_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (heap_page_resurrect): return a page in tomb heap even if
  freelist is NULL.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (vm_malloc_increase): decrease it more carefully.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/ruby.h: introduce new flags for T_TYPEDDATA.
  * RUBY_TYPED_FREE_IMMEDIATELY: free the data given by DATA_PTR()
    with dfree function immediately.  Otherwise (default), the data
    freed at finalizaton point.
  * RUBY_TYPED_WB_PROTECTED: make this object with FL_WB_PROTECT
    (not shady).
* gc.c (obj_free): support RUBY_TYPED_FREE_IMMEDIATELY.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c (tp_free): remvoed because empty free function.
  Use RUBY_TYPED_NEVER_FREE instead.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/ruby.h: fix typo (FL_WB_PROTECT -> FL_WB_PROTECTED).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add RUBY_TYPED_FREE_IMMEDIATELY to data types which only use
  safe functions during garbage collection such as xfree().
  On default, T_DATA objects are freed at same points as fianlizers.
  This approach protects issues such as reported by [ruby-dev:35578].
  However, freeing T_DATA objects immediately helps heap usage.
  Most of T_DATA (in other words, most of dfree functions) are safe.
  However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default
  for safety.
* cont.c: ditto.
* dir.c: ditto.
* encoding.c: ditto.
* enumerator.c: ditto.
* error.c: ditto.
* file.c: ditto.
* gc.c: ditto.
* io.c: ditto.
* iseq.c: ditto.
* marshal.c: ditto.
* parse.y: ditto.
* proc.c: ditto.
* process.c: ditto.
* random.c: ditto.
* thread.c: ditto.
* time.c: ditto.
* transcode.c: ditto.
* variable.c: ditto.
* vm.c: ditto.
* vm_backtrace.c: ditto.
* vm_trace.c: ditto.
* ext/bigdecimal/bigdecimal.c: ditto.
* ext/objspace/objspace.c: ditto.
* ext/stringio/stringio.c: ditto.
* ext/strscan/strscan.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_uniq_bang): use st_foreach() instead of for loop.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_zip): some refactoring.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/psych/lib/psych/visitors/yaml_tree.rb: string subclasses should
  not be considered to be binary.  Fixes Psych / GH 166
  https://github.com/tenderlove/psych/issues/166

* test/psych/test_string.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2013-10-30

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/psych/lib/psych/visitors/yaml_tree.rb: make less garbage when
  testing if a string is binary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_uniq_bang): use rb_ary_modify_check() instead of
  rb_ary_modify() because the array will be unshared soon.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time.c (v2w): Normalize a rational value to an integer if possible.
  [ruby-core:58070] [Bug #9059] reported by Isaac Schwabacher.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Makefile.sub: add missing config variables

* win32/Makefile.sub (config.status): add missing variables,
  PLATFORM_DIR and THREAD_MODEL.

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