Skip to content

Warning due to missing frozen_string_literal magic comment with Ruby 3.4 #40

@yui-har

Description

@yui-har

It worked fine in Ruby 3.3 (3.3.6) and earlier, but when I ran the tests in Ruby 3.4 (3.4.5) I got a warning.

# bundle exec rake test
Run options: --seed 48690

# Running:

/usr/local/bundle/gems/parseconfig-1.1.2/lib/parseconfig.rb:61: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information)
/usr/local/bundle/gems/parseconfig-1.1.2/lib/parseconfig.rb:61: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information)
... warnings displayed repeat ...

.

Finished in 19.547526s, 16.2169 runs/s, 77.6569 assertions/s.
317 runs, 1518 assertions, 0 failures, 0 errors, 0 skips

After confirm the following, I found that if a destructive operation is performed without a magic comment, a warning will be displayed.
https://github.com/ruby/ruby/releases/tag/v3_4_0
https://bugs.ruby-lang.org/issues/20205

The parseconfig gem is very useful, so it would be great if you could fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions