mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #21361 from olleicua/master
minor documentation improvement [ci skip]
This commit is contained in:
commit
f5f4d135a2
1 changed files with 2 additions and 2 deletions
|
@ -17,8 +17,8 @@ class String
|
|||
#
|
||||
# the user would see the usage message aligned against the left margin.
|
||||
#
|
||||
# Technically, it looks for the least indented line in the whole string, and removes
|
||||
# that amount of leading whitespace.
|
||||
# Technically, it looks for the least indented non-empty line
|
||||
# in the whole string, and removes that amount of leading whitespace.
|
||||
def strip_heredoc
|
||||
indent = scan(/^[ \t]*(?=\S)/).min.try(:size) || 0
|
||||
gsub(/^[ \t]{#{indent}}/, '')
|
||||
|
|
Loading…
Reference in a new issue