aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/CHANGELOG.md
diff options
context:
space:
mode:
authorRicardo Díaz <ricardotk002@gmail.com>2017-08-02 00:10:36 -0500
committerRicardo Díaz <ricardotk002@gmail.com>2017-08-02 00:41:09 -0500
commit1d65185c90b0604d1b0a3ff3e9b53c3d6361dd3e (patch)
tree1062e04c189cf160eb0a45f21b7305135fcdd5b5 /activesupport/CHANGELOG.md
parentf9a43f28c087f8ffd35ff7c33a60c938b60f2be2 (diff)
downloadrails-1d65185c90b0604d1b0a3ff3e9b53c3d6361dd3e.tar.gz
rails-1d65185c90b0604d1b0a3ff3e9b53c3d6361dd3e.tar.bz2
rails-1d65185c90b0604d1b0a3ff3e9b53c3d6361dd3e.zip
Update String#camelize to provide feedback when wrong option is passed
String#camelize was returning nil without any feedback when an invalid option was passed as parameter. This update makes the method to raises an ArgumentError when the option passed is invalid, similar to what Ruby does for String#downcase (and others) in 2.4.1. https://ruby-doc.org/core-2.4.1/String.html#method-i-downcase
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r--activesupport/CHANGELOG.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 938d4f9d31..e3a39cb8c9 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,3 +1,21 @@
+* Update String#camelize to provide feedback when wrong option is passed
+
+ String#camelize was returning nil without any feedback when an
+ invalid option was passed as parameter.
+
+ Previously:
+
+ 'one_two'.camelize(true)
+ => nil
+
+ Now:
+
+ 'one_two'.camelize(true)
+ => ArgumentError: Invalid option, use either :upper or :lower.
+
+ *Ricardo Díaz*
+
+
* Fix modulo operations involving durations
Rails 5.1 introduce an `ActiveSupport::Duration::Scalar` class as a wrapper