aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/cache/mem_cache_store.rb6
-rw-r--r--activesupport/lib/active_support/core_ext/array/conversions.rb2
-rw-r--r--activesupport/lib/active_support/core_ext/enumerable.rb2
-rw-r--r--activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb2
-rw-r--r--activesupport/lib/active_support/inflector.rb6
-rw-r--r--activesupport/lib/active_support/json/encoders/hash.rb6
-rw-r--r--activesupport/lib/active_support/xml_mini/jdom.rb2
-rw-r--r--activesupport/lib/active_support/xml_mini/nokogiri.rb2
-rw-r--r--activesupport/lib/active_support/xml_mini/rexml.rb2
9 files changed, 15 insertions, 15 deletions
diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb
index 38b3409ca6..8e9ae71d84 100644
--- a/activesupport/lib/active_support/cache/mem_cache_store.rb
+++ b/activesupport/lib/active_support/cache/mem_cache_store.rb
@@ -12,7 +12,7 @@ module ActiveSupport
# and MemCacheStore will load balance between all available servers. If a
# server goes down, then MemCacheStore will ignore it until it goes back
# online.
- # - Time-based expiry support. See #write and the +:expires_in+ option.
+ # - Time-based expiry support. See #write and the <tt>:expires_in</tt> option.
# - Per-request in memory cache for all communication with the MemCache server(s).
class MemCacheStore < Store
module Response # :nodoc:
@@ -64,9 +64,9 @@ module ActiveSupport
# Writes a value to the cache.
#
# Possible options:
- # - +:unless_exist+ - set to true if you don't want to update the cache
+ # - <tt>:unless_exist</tt> - set to true if you don't want to update the cache
# if the key is already set.
- # - +:expires_in+ - the number of seconds that this value may stay in
+ # - <tt>:expires_in</tt> - the number of seconds that this value may stay in
# the cache. See ActiveSupport::Cache::Store#write for an example.
def write(key, value, options = nil)
super
diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb
index 5f1ce4142f..11846f265c 100644
--- a/activesupport/lib/active_support/core_ext/array/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/array/conversions.rb
@@ -12,7 +12,7 @@ class Array
default_two_words_connector = I18n.translate(:'support.array.two_words_connector', :locale => options[:locale])
default_last_word_connector = I18n.translate(:'support.array.last_word_connector', :locale => options[:locale])
- # Try to emulate to_senteces previous to 2.3
+ # Try to emulate to_sentences previous to 2.3
if options.has_key?(:connector) || options.has_key?(:skip_last_comma)
::ActiveSupport::Deprecation.warn(":connector has been deprecated. Use :words_connector instead", caller) if options.has_key? :connector
::ActiveSupport::Deprecation.warn(":skip_last_comma has been deprecated. Use :last_word_connector instead", caller) if options.has_key? :skip_last_comma
diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb
index 8309b617ae..434a32b29b 100644
--- a/activesupport/lib/active_support/core_ext/enumerable.rb
+++ b/activesupport/lib/active_support/core_ext/enumerable.rb
@@ -42,7 +42,7 @@ module Enumerable
#
# The latter is a shortcut for:
#
- # payments.inject { |sum, p| sum + p.price }
+ # payments.inject(0) { |sum, p| sum + p.price }
#
# It can also calculate the sum without the use of a block.
#
diff --git a/activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb b/activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb
index a1c8ece1d7..9de8157eb0 100644
--- a/activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb
+++ b/activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb
@@ -1,5 +1,5 @@
# Pre-1.9 versions of Ruby have a bug with marshaling Time instances, where utc instances are
-# unmarshaled in the local zone, instead of utc. We're layering behavior on the _dump and _load
+# unmarshalled in the local zone, instead of utc. We're layering behavior on the _dump and _load
# methods so that utc instances can be flagged on dump, and coerced back to utc on load.
if RUBY_VERSION < '1.9'
class Time
diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb
index ff70d6d76e..3c9031c5f3 100644
--- a/activesupport/lib/active_support/inflector.rb
+++ b/activesupport/lib/active_support/inflector.rb
@@ -155,7 +155,7 @@ module ActiveSupport
# Examples:
# "posts".singularize # => "post"
# "octopi".singularize # => "octopus"
- # "sheep".singluarize # => "sheep"
+ # "sheep".singularize # => "sheep"
# "word".singularize # => "word"
# "CamelOctopi".singularize # => "CamelOctopus"
def singularize(word)
@@ -261,9 +261,9 @@ module ActiveSupport
# <%= link_to(@person.name, person_path(@person)) %>
# # => <a href="/person/1-donald-e-knuth">Donald E. Knuth</a>
def parameterize(string, sep = '-')
- # replace accented chars with ther ascii equivalents
+ # replace accented chars with their ascii equivalents
parameterized_string = transliterate(string)
- # Turn unwanted chars into the seperator
+ # Turn unwanted chars into the separator
parameterized_string.gsub!(/[^a-z0-9\-_\+]+/i, sep)
unless sep.blank?
re_sep = Regexp.escape(sep)
diff --git a/activesupport/lib/active_support/json/encoders/hash.rb b/activesupport/lib/active_support/json/encoders/hash.rb
index 4771484843..28dd5b5ebc 100644
--- a/activesupport/lib/active_support/json/encoders/hash.rb
+++ b/activesupport/lib/active_support/json/encoders/hash.rb
@@ -8,7 +8,7 @@ class Hash
# the hash keys. For example:
#
# { :name => "Konata Izumi", 'age' => 16, 1 => 2 }.to_json
- # # => {"name": "Konata Izumi", "1": 2, "age": 16}
+ # # => {"name":"Konata Izumi", "1":2, "age":16}
#
# The keys in the JSON string are unordered due to the nature of hashes.
#
@@ -16,10 +16,10 @@ class Hash
# attributes included, and will accept 1 or more hash keys to include/exclude.
#
# { :name => "Konata Izumi", 'age' => 16, 1 => 2 }.to_json(:only => [:name, 'age'])
- # # => {"name": "Konata Izumi", "age": 16}
+ # # => {"name":"Konata Izumi", "age":16}
#
# { :name => "Konata Izumi", 'age' => 16, 1 => 2 }.to_json(:except => 1)
- # # => {"name": "Konata Izumi", "age": 16}
+ # # => {"name":"Konata Izumi", "age":16}
#
# The +options+ also filter down to any hash values. This is particularly
# useful for converting hashes containing ActiveRecord objects or any object
diff --git a/activesupport/lib/active_support/xml_mini/jdom.rb b/activesupport/lib/active_support/xml_mini/jdom.rb
index 1cd714d864..5c3d93c4a1 100644
--- a/activesupport/lib/active_support/xml_mini/jdom.rb
+++ b/activesupport/lib/active_support/xml_mini/jdom.rb
@@ -78,7 +78,7 @@ module ActiveSupport
# Merge all the texts of an element into the hash
#
# hash::
- # Hash to add the converted emement to.
+ # Hash to add the converted element to.
# element::
# XML element whose texts are to me merged into the hash
def merge_texts!(hash, element)
diff --git a/activesupport/lib/active_support/xml_mini/nokogiri.rb b/activesupport/lib/active_support/xml_mini/nokogiri.rb
index 7337c143c9..6c64612aee 100644
--- a/activesupport/lib/active_support/xml_mini/nokogiri.rb
+++ b/activesupport/lib/active_support/xml_mini/nokogiri.rb
@@ -57,7 +57,7 @@ module ActiveSupport
memo[name] = child_hash
end
- # Recusively walk children
+ # Recursively walk children
child.children.each { |c|
callback.call(child_hash, child, c, callback)
}
diff --git a/activesupport/lib/active_support/xml_mini/rexml.rb b/activesupport/lib/active_support/xml_mini/rexml.rb
index 1184d2d6c9..08f797749f 100644
--- a/activesupport/lib/active_support/xml_mini/rexml.rb
+++ b/activesupport/lib/active_support/xml_mini/rexml.rb
@@ -54,7 +54,7 @@ module ActiveSupport
# Merge all the texts of an element into the hash
#
# hash::
- # Hash to add the converted emement to.
+ # Hash to add the converted element to.
# element::
# XML element whose texts are to me merged into the hash
def merge_texts!(hash, element)