Skip to content

Commit

Permalink
Fix broken text formatting in String Concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzheng870 authored Apr 27, 2024
1 parent 89ed244 commit 013994b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4876,9 +4876,9 @@ message = "This is the #{result}."

=== String Concatenation [[concat-strings]]

Avoid using `String#+` when you need to construct large data chunks.
Avoid using `pass:[String#+]` when you need to construct large data chunks.
Instead, use `String#<<`.
Concatenation mutates the string instance in-place and is always faster than `String#+`, which creates a bunch of new string objects.
Concatenation mutates the string instance in-place and is always faster than `pass:[String#+]`, which creates a bunch of new string objects.

[source,ruby]
----
Expand Down

0 comments on commit 013994b

Please sign in to comment.