Skip to content

Support running with --enable=frozen-string-literal#161

Merged
igrigorik merged 1 commit intoigrigorik:masterfrom
danielmorrison:frozen-strings
Sep 20, 2022
Merged

Support running with --enable=frozen-string-literal#161
igrigorik merged 1 commit intoigrigorik:masterfrom
danielmorrison:frozen-strings

Conversation

@danielmorrison
Copy link
Contributor

In apps that run with --enable=frozen-string-literal we can get a FrozenError.

Using String.new instead of '' fixes that without breaking it for anyone else.

When running the specs frozen strings (RUBYOPT="--enable=frozen-string-literal" rake), there were two files that have errors. I added the magic comment: # frozen-string-literal: false to those to work both ways.

In apps that run with --enable=frozen-string-literal we can get a FrozenError.

Using String.new instead of '' fixes that without breaking it for anyone else.

When running the specs frozen strings (RUBYOPT="--enable=frozen-string-literal" rake), there were two files that have errors. I added the magic comment:
# frozen-string-literal: false
to those to work both ways.
danielmorrison added a commit to danielmorrison/net-http2 that referenced this pull request Sep 14, 2022
In apps that run with --enable=frozen-string-literal we can get a FrozenError.

Using String.new instead of '' fixes that without breaking it for anyone else.

When running the specs with frozen strings (RUBYOPT="--enable=frozen-string-literal" rake), there were three files that generate errors. I added the magic comment:
# frozen-string-literal: false
to those to work both ways.

I have a related PR on http-2 to get all the specs passing: igrigorik/http-2#161
Copy link
Owner

@igrigorik igrigorik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks for the contribution!

@igrigorik igrigorik merged commit 059ec0c into igrigorik:master Sep 20, 2022
danielmorrison added a commit to danielmorrison/net-http2 that referenced this pull request Dec 30, 2025
In apps that run with --enable=frozen-string-literal we can get a FrozenError.

Using String.new instead of '' fixes that without breaking it for anyone else.

When running the specs with frozen strings (RUBYOPT="--enable=frozen-string-literal" rake), there were three files that generate errors. I added the magic comment:
# frozen-string-literal: false
to those to work both ways.

I have a related PR on http-2 to get all the specs passing: igrigorik/http-2#161
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants