1
0
Fork 0
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:
Rafael Mendonça França 2015-08-24 19:37:29 -03:00
commit f5f4d135a2

View file

@ -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}}/, '')