Skip to content
  • Jeremy Evans's avatar
    6f3857f6
    Support Encoding::Converter newline: :lf and :lf_newline options · 6f3857f6
    Jeremy Evans authored
    Previously, newline: :lf was accepted but ignored.  Where it
    should have been used was commented out code that didn't work,
    but unlike all other invalid values, using newline: :lf did
    not raise an error.
    
    This adds support for newline: :lf and :lf_newline, for consistency
    with newline: :cr and :cr_newline.  This is basically the same as
    universal_newline, except that it only affects writing and not
    reading due to RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK.
    
    Add tests for the File.open :newline option while here.
    
    Fixes [Bug #12436]
    6f3857f6
    Support Encoding::Converter newline: :lf and :lf_newline options
    Jeremy Evans authored
    Previously, newline: :lf was accepted but ignored.  Where it
    should have been used was commented out code that didn't work,
    but unlike all other invalid values, using newline: :lf did
    not raise an error.
    
    This adds support for newline: :lf and :lf_newline, for consistency
    with newline: :cr and :cr_newline.  This is basically the same as
    universal_newline, except that it only affects writing and not
    reading due to RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK.
    
    Add tests for the File.open :newline option while here.
    
    Fixes [Bug #12436]
Loading