Skip to content
  • John Hawthorn's avatar
    1f6dd907
    Fix update_coderange for binary strings · 1f6dd907
    John Hawthorn authored
    
    
    Although a binary (aka ASCII-8BIT) string will never have a broken
    coderange, it still has to differentiate between "valid" and "7bit".
    
    On Ruby 3.4/trunk this problem is masked because we now clear the
    coderange more agressively in rb_str_resize, and we happened to always
    be strinking this string, but we should not assume that.
    
    On Ruby 3.3 this created strings where `ascii_only?` was true in cases
    it shouldn't be as well as other problems.
    
    Fixes [Bug #20883]
    
    Co-authored-by: default avatarDaniel Colson <danieljamescolson@gmail.com>
    Co-authored-by: default avatarMatthew Draper <matthew@trebex.net>
    1f6dd907
    Fix update_coderange for binary strings
    John Hawthorn authored
    
    
    Although a binary (aka ASCII-8BIT) string will never have a broken
    coderange, it still has to differentiate between "valid" and "7bit".
    
    On Ruby 3.4/trunk this problem is masked because we now clear the
    coderange more agressively in rb_str_resize, and we happened to always
    be strinking this string, but we should not assume that.
    
    On Ruby 3.3 this created strings where `ascii_only?` was true in cases
    it shouldn't be as well as other problems.
    
    Fixes [Bug #20883]
    
    Co-authored-by: default avatarDaniel Colson <danieljamescolson@gmail.com>
    Co-authored-by: default avatarMatthew Draper <matthew@trebex.net>
Loading