Skip to content
Browse files

improve String#first docs

  • Loading branch information...
1 parent 074359d commit b2e9d33515eb858507cfab8e15eb4a9e049a433a Francesco Rodriguez committed May 11, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 activesupport/lib/active_support/core_ext/string/access.rb
View
7 activesupport/lib/active_support/core_ext/string/access.rb
@@ -64,10 +64,9 @@ def to(position)
self[0..position]
end
- # Returns the first character of the string. If a limit is supplied,
- # returns a substring from the beginning of the string to the given
- # limit. If the given limit is greater than or equal to the string
- # length, returns self.
+ # Returns the first character. If a limit is supplied, returns a substring
+ # from the beginning of the string until it reaches the limit value. If the
+ # given limit is greater than or equal to the string length, returns self.
#
# str = "hello"
# str.first #=> "h"

0 comments on commit b2e9d33

Please sign in to comment.
Something went wrong with that request. Please try again.