[ruby-cvs:54363] nagachika:r47215 (ruby_2_1): merge revision(s) r46408, r46410, r46413, r46414, r46424, r46436, r46437: [Backport #9934]

nagachika at ruby-lang.org nagachika at ruby-lang.org
Mon Aug 18 23:34:34 JST 2014


nagachika	2014-08-18 23:34:31 +0900 (Mon, 18 Aug 2014)

  New Revision: 47215

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47215

  Log:
    merge revision(s) r46408,r46410,r46413,r46414,r46424,r46436,r46437: [Backport #9934]
    
    string.c: shrink too big buffer
    
    * string.c (rb_str_resize): shrink the buffer even if new length
      is same but it is enough smaller than the capacity.
    * file.c (expand_path): shrink expanded path which no longer needs
      rooms to append.  [ruby-core:63114] [Bug #9934]
    
    * string.c (rb_str_resize): should consider the capacity instead
      of the old length, as pointed out by nagachika.
    
    * string.c (rb_str_resize): update capa only when buffer get
      reallocated.
      http://d.hatena.ne.jp/nagachika/20140613/ruby_trunk_changes_46413_46420#r46413

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/file.c
    branches/ruby_2_1/string.c
    branches/ruby_2_1/test/ruby/test_file_exhaustive.rb
    branches/ruby_2_1/version.h


More information about the ruby-cvs mailing list