Merge pull request #19247 from wazery/doc_fix

Doc fixes [ci skip]
This commit is contained in:
Eileen M. Uchitelle 2015-03-07 09:28:01 -05:00
commit 96b8f401f5
4 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
class Hash
# Slice a hash to include only the given keys. Returns a hash containing
# Slices a hash to include only the given keys. Returns a hash containing
# the given keys.
#
# { a: 1, b: 2, c: 3, d: 4 }.slice(:a, :b)

View File

@ -1,5 +1,5 @@
class String
# Enable more predictable duck-typing on String-like classes. See <tt>Object#acts_like?</tt>.
# Enables more predictable duck-typing on String-like classes. See <tt>Object#acts_like?</tt>.
def acts_like_string?
true
end

View File

@ -178,7 +178,7 @@ class String
ActiveSupport::Inflector.tableize(self)
end
# Create a class name from a plural table name like Rails does for table names to models.
# Creates a class name from a plural table name like Rails does for table names to models.
# Note that this returns a string and not a class. (To convert to an actual class
# follow +classify+ with +constantize+.)
#

View File

@ -35,7 +35,7 @@ class String
ActiveSupport::Multibyte.proxy_class.new(self)
end
# Return +true+ if string has utf_8 encoding.
# Returns +true+ if string has utf_8 encoding.
#
# utf_8_str = "some string".encode "UTF-8"
# iso_str = "some string".encode "ISO-8859-1"