Skip to content

#1142 but with an extra commit to ease reviewing the diff - #1143

Closed
eregon wants to merge 2 commits into
ruby:masterfrom
eregon:frozen-string-literal-compat-review
Closed

#1142 but with an extra commit to ease reviewing the diff#1143
eregon wants to merge 2 commits into
ruby:masterfrom
eregon:frozen-string-literal-compat-review

Conversation

@eregon

@eregon eregon commented Mar 14, 2024

Copy link
Copy Markdown
Member

#1142 but with an extra commit to ease reviewing the diff.

byroot and others added 2 commits March 14, 2024 17:40
Extracted from: ruby/ruby#10235

Ref: https://bugs.ruby-lang.org/issues/20205

Ruby will gradually move towards enabling frozen string literals
by default. Making the ruby spec suite compatible is a good first
step.

Co-authored-by: Benoit Daloze <[email protected]>
…ce_encoding

* With:
  replace "'.dup.force_encoding" "'.force_encoding" -- $(git ls-files)
  replace '".dup.force_encoding' '".force_encoding' -- $(git ls-files)
describe "StringIO#reopen when passed no arguments" do
before :each do
@io = StringIO.new("example\nsecond line")
@io = StringIO.new(+"example\nsecond line")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems this change isn't needed (checked with Ruby 3.2.2)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

OK, could you fix this in a PR?

@io.reopen(obj)
@io.string.should == "to_strio"
end
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems changes in this describe block aren't needed. And probably in some cases above as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

OK, could you fix this in a PR?

Comment thread library/net-http/httpresponse/shared/body.rb
Comment thread core/time/_load_spec.rb
Comment thread core/string/encoding_spec.rb
Comment thread language/string_spec.rb
Comment thread core/hash/compare_by_identity_spec.rb
Comment thread core/hash/assoc_spec.rb
Comment thread core/kernel/eval_spec.rb

@eregon eregon left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for the review! Could you do a PR with the remaining changes? I marked as resolved what can stay as-is.

@eregon eregon closed this Mar 15, 2024
@andrykonchin

Copy link
Copy Markdown
Member

Yes, will work on the remaining issues.

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.

3 participants