-
-
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
Make the spec suite compatible with --enable-frozen-string-literal
#1142
Conversation
9fc10ea
to
c237217
Compare
Alright I think it's going green now. For some specs like most of everything in The overwhelming majority of the diff is just some extra |
cad7b94
to
10edfdf
Compare
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.
Looks great, I'll push some minor changes when I'm done reviewing, I'm still in the process of reviewing the 250 files changed.
core/complex/inspect_spec.rb
Outdated
real = NumericSpecs::Subclass.new | ||
real.should_receive(:inspect).and_return("1") | ||
real.should_receive(:inspect).and_return(+"1") | ||
imaginary = NumericSpecs::Subclass.new | ||
imaginary.should_receive(:inspect).and_return("2") | ||
imaginary.should_receive(:inspect).and_return(+"2") | ||
imaginary.should_receive(:<).any_number_of_times.and_return(false) | ||
Complex(real, imaginary).inspect.should == "(1+2i)" |
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.
This is weird, Complex#inspect mutates the string returned from real.inspect
, that seems really wrong.
Probably something to fix in CRuby: https://bugs.ruby-lang.org/issues/20337
5eda025
to
668a76e
Compare
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>
668a76e
to
0be2f8b
Compare
I made a separate PR to get a better diff for review: #1143 I'll merge this PR because I went through like 99% of the diff so I think it's all correct, just maybe some extra |
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.