Make the spec suite compatible with --enable-frozen-string-literal#1142
Make the spec suite compatible with --enable-frozen-string-literal#1142eregon merged 1 commit intoruby:masterfrom
--enable-frozen-string-literal#1142Conversation
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
eregon
left a comment
There was a problem hiding this comment.
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.
| 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.
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.