[ruby-cvs:79151] 98ef38ada4 (master): Freeze Regexp literals

"Jean Boussier" <[email protected]> Wed, 15 Jan 2020 10:38:59 +0900 (JST)
Newsgroups gmane.comp.lang.ruby.cvs
Message-ID <[email protected]>
Jean Boussier	2019-11-27 20:40:18 +0900 (Wed, 27 Nov 2019)

  New Revision: 98ef38ada4

  https://github.com/ruby/ruby/commit/98ef38ada4

  Log:
    Freeze Regexp literals
    =

    [Feature #8948] [Feature #16377]
    =

    Since Regexp literals always reference the same instance,
    allowing to mutate them can lead to state leak.

  Modified files:
    re.c
    spec/ruby/core/marshal/dump_spec.rb
    spec/ruby/core/marshal/shared/load.rb
    spec/ruby/core/regexp/initialize_spec.rb
    spec/ruby/core/string/match_spec.rb
    spec/ruby/language/regexp_spec.rb
    spec/ruby/optional/capi/encoding_spec.rb
    test/ruby/test_regexp.rb=