[ruby-cvs:65342] nagachika:r58171 (ruby_2_3): merge revision(s) 57187, 57234: [Backport #13075]

nagachika at ruby-lang.org nagachika at ruby-lang.org
Tue Mar 28 01:13:23 JST 2017


nagachika	2017-03-28 01:13:23 +0900 (Tue, 28 Mar 2017)

  New Revision: 58171

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

  Log:
    merge revision(s) 57187,57234: [Backport #13075]
    
    pack.c: avoid returning uninitialized String
    
    Fix unpacking with 'b', 'B', 'h' and 'H' format. Do not return an
    uninitialized String to Ruby before filling the content bytes.
    Fixes r11175 ("pack.c (pack_unpack): execute block if given with
    unpacked value instead of creating an array", 2006-10-15).
    [ruby-core:78841] [Bug #13075]
    test/ruby/test_pack.rb: fix test case added by r57187
    
    The test case for String#unpack added by r57187 is not properly testing
    because the String will be filled after the block invocation.
    [ruby-core:78841] [Bug #13075]
    
    Thanks to nagachika for pointing this out:
    
      http://d.hatena.ne.jp/nagachika/20161226/ruby_trunk_changes_57184_57194#r57187

  Modified directories:
    branches/ruby_2_3/
  Modified files:
    branches/ruby_2_3/pack.c
    branches/ruby_2_3/test/ruby/test_pack.rb
    branches/ruby_2_3/version.h


More information about the ruby-cvs mailing list