Skip to content

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

Closed
eregon wants to merge 2 commits intoruby: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 intoruby:masterfrom
eregon:frozen-string-literal-compat-review

Conversation

@eregon
Copy link
Member

@eregon eregon commented Mar 14, 2024

#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 <eregontp@gmail.com>
…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
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
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
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
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?

Copy link
Member Author

@eregon eregon 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 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
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