aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-05-13 11:51:10 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-05-13 11:51:10 -0700
commitd53b5f073924e8b397ec86f7ad092aa0b5ed3fe4 (patch)
tree78d2f76516e22944e2c41e318a0d54d5ad639289 /activesupport/lib/active_support/core_ext/string
parentb97ff316ec6d3fa962dc804d5aeb83aa81b2d847 (diff)
parent37ca5b09662797928a4f74878595a4e577c5aedd (diff)
downloadrails-d53b5f073924e8b397ec86f7ad092aa0b5ed3fe4.tar.gz
rails-d53b5f073924e8b397ec86f7ad092aa0b5ed3fe4.tar.bz2
rails-d53b5f073924e8b397ec86f7ad092aa0b5ed3fe4.zip
Merge branch 'master' into normalizecb
* master: (61 commits) add tests for reset_calbacks Fixing build broken by this change Extract variable out of loop Updated comment to Rails 4 Fixes NoMethodError: `alias_method_chain` when requiring just active_support/core_ext better error message when app name is not passed in `rails new` Code cleanup for ActionDispatch::Flash#call Fix typo: require -> requires Add CHANGELOG entry for #10576 Merge pull request #10556 from Empact/deprecate-schema-statements-distinct Some editorial changes on the documentation. respond_to -> respond to in a message from AM::Lint specify that dom_(id|class) are deprecated in controllers, views are fine copy edits [ci skip] Fix class and method name typos Replace multi_json with json ruby -> Ruby Adding documentation to the automatic inverse_of finder. Improve CHANGELOG entry [ci kip] Call assume_migrated_upto_version on connection ... Conflicts: activesupport/lib/active_support/callbacks.rb
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string')
-rw-r--r--activesupport/lib/active_support/core_ext/string/conversions.rb1
-rw-r--r--activesupport/lib/active_support/core_ext/string/inflections.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/conversions.rb b/activesupport/lib/active_support/core_ext/string/conversions.rb
index d2a2db32bb..6691fc0995 100644
--- a/activesupport/lib/active_support/core_ext/string/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/string/conversions.rb
@@ -15,6 +15,7 @@ class String
# "2012-12-13 06:12".to_time # => 2012-12-13 06:12:00 +0100
# "2012-12-13T06:12".to_time # => 2012-12-13 06:12:00 +0100
# "2012-12-13T06:12".to_time(:utc) # => 2012-12-13 05:12:00 UTC
+ # "12/13/2012".to_time # => ArgumentError: argument out of range
def to_time(form = :local)
parts = Date._parse(self, false)
return if parts.empty?
diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb
index 0b506a6030..56e8a5f98d 100644
--- a/activesupport/lib/active_support/core_ext/string/inflections.rb
+++ b/activesupport/lib/active_support/core_ext/string/inflections.rb
@@ -185,7 +185,7 @@ class String
#
# Singular names are not handled correctly.
#
- # 'business'.classify # => "Busines"
+ # 'business'.classify # => "Business"
def classify
ActiveSupport::Inflector.classify(self)
end