Project

General

Profile

« Previous | Next » 

Revision 4e2738f4

Added by naruse (Yui NARUSE) about 4 years ago

merge revision(s) 7e8a9af9db42a21f6a1125a29e98c45ff9d5833b: [Backport #17732]

    rb_enc_interned_str: handle autoloaded encodings

    If called with an autoloaded encoding that was not yet
    initialized, `rb_enc_interned_str` would crash with
    a NULL pointer exception.

    See: https://github.com/ruby/ruby/pull/4119#issuecomment-800189841
    ---
     encoding.c                        | 28 ++++++++++++----------------
     ext/-test-/string/depend          |  3 +++
     ext/-test-/string/fstring.c       | 15 +++++++++++++++
     internal/encoding.h               |  3 +++
     string.c                          |  4 ++++
     test/-ext-/string/test_fstring.rb | 16 ++++++++++++++++
     6 files changed, 53 insertions(+), 16 deletions(-)