aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorSam Auciello <olleicua@gmail.com>2015-08-24 17:53:19 -0400
committerSam Auciello <olleicua@gmail.com>2015-08-24 18:00:40 -0400
commit12208d4f66f05ff570db801d7a6419ccda3933a4 (patch)
tree37cd30ee22650299adac7b5065e8ebd6a97a8b9a /activesupport
parent7a62cc7d22168b5fbfc5ebbe1b219e82db716ac5 (diff)
downloadrails-12208d4f66f05ff570db801d7a6419ccda3933a4.tar.gz
rails-12208d4f66f05ff570db801d7a6419ccda3933a4.tar.bz2
rails-12208d4f66f05ff570db801d7a6419ccda3933a4.zip
minor documentation improvement [ci skip]
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/string/strip.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/strip.rb b/activesupport/lib/active_support/core_ext/string/strip.rb
index 086c610976..9fdd9d8d2e 100644
--- a/activesupport/lib/active_support/core_ext/string/strip.rb
+++ b/activesupport/lib/active_support/core_ext/string/strip.rb
@@ -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}}/, '')