aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string/access.rb
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-05-11 11:41:22 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-05-11 11:41:22 -0500
commit0822dc01f68eb262274fbedcf97a224e6457ff3b (patch)
tree495fb95ae6a7ab043f48608a6368e5639aeef4a8 /activesupport/lib/active_support/core_ext/string/access.rb
parent315350847f5089fa2b314b00d485e5121f5622d4 (diff)
downloadrails-0822dc01f68eb262274fbedcf97a224e6457ff3b.tar.gz
rails-0822dc01f68eb262274fbedcf97a224e6457ff3b.tar.bz2
rails-0822dc01f68eb262274fbedcf97a224e6457ff3b.zip
improve String#to docs
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/access.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/string/access.rb4
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"