diff options
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/access.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/access.rb b/activesupport/lib/active_support/core_ext/string/access.rb index 5cdf42ce4b..9494a9b69d 100644 --- a/activesupport/lib/active_support/core_ext/string/access.rb +++ b/activesupport/lib/active_support/core_ext/string/access.rb @@ -34,8 +34,8 @@ class String self[position..-1] end - # Returns the beginning of the string up to position. If the position is - # negative, it is counted from the end of the string. + # Returns a substring from the beginning of the string to the given position. + # If the position is negative, it is counted from the end of the string. # # str = "hello" # str.to(0) #=> "h" |