-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
Conversation
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") |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this 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.
Yes, will work on the remaining issues. |
#1142 but with an extra commit to ease reviewing the diff.