Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5893,6 +5893,21 @@ $stderr.puts 'This is a warning!'
warn 'This is a warning!'
----

=== Separate `puts` for Newlines [[puts-newlines]]

Use separate `puts` calls instead of embedding newline characters (`\n`) in strings.
This improves readability and follows Ruby conventions.

[source,ruby]
----
# bad
puts "\nmessage"

# good
puts
puts 'message'
----

=== `Array#join` [[array-join]]

Prefer the use of `Array#join` over the fairly cryptic `Array#*` with a string argument.
Expand Down