Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed

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)
@io.reopen(obj)
@io.string.should == "to_strio"
end
end

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?

@@ -172,15 +172,15 @@

it "tries to convert the passed Object to a StringIO using #to_strio" do
obj = mock("to_strio")
obj.should_receive(:to_strio).and_return(StringIO.new("to_strio"))
obj.should_receive(:to_strio).and_return(StringIO.new(+"to_strio"))
@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?

library/net-http/httpresponse/shared/body.rb Show resolved Hide resolved
core/time/_load_spec.rb Show resolved Hide resolved
core/string/encoding_spec.rb Show resolved Hide resolved
language/string_spec.rb Show resolved Hide resolved
core/hash/compare_by_identity_spec.rb Show resolved Hide resolved
core/hash/assoc_spec.rb Show resolved Hide resolved
core/kernel/eval_spec.rb Show resolved Hide resolved
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
Development

Successfully merging this pull request may close these issues.

3 participants