Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil committed Nov 5, 2024
1 parent 4d7ddce commit d2162e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/std/string_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ describe "String" do
{"!hello!", "\u{1f602}hello\u{1f602}", "\xFEhello\xFF"}.each do |str|
{"", "\n", "\r", "\r\n"}.each do |newline|
x = str + newline
x.size # side-effect
x.size_known?.should be_true
y = x.chomp
y.@length.should eq(7)
end
Expand All @@ -787,9 +787,9 @@ describe "String" do

it "does not pre-compute string size if not possible" do
x = String.build &.<< "abc\n"
x.@length.should eq(0)
x.size_known?.should be_false
y = x.chomp
y.@length.should eq(0)
y.size_known?.should be_false
end
end

Expand Down

0 comments on commit d2162e9

Please sign in to comment.