ostinelli / net-http2

NetHttp2 is an HTTP/2 client for Ruby.
MIT License
140 stars 31 forks source link

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

Open danielmorrison opened 1 year ago

danielmorrison commented 1 year ago

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 test files that also 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: https://github.com/igrigorik/http-2/pull/161