aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string/multibyte.rb
diff options
context:
space:
mode:
authorManfred Stienstra <manfred@fngtps.com>2008-09-21 17:47:19 +0200
committerManfred Stienstra <manfred@fngtps.com>2008-09-21 17:47:19 +0200
commit44e44b42d9226c089f00970ced796c83f193f262 (patch)
tree6b797baef03657729e8a0bc4e000355a22acb73d /activesupport/lib/active_support/core_ext/string/multibyte.rb
parent3c9eedec3c17861c354635a33f3012e85083301f (diff)
downloadrails-44e44b42d9226c089f00970ced796c83f193f262.tar.gz
rails-44e44b42d9226c089f00970ced796c83f193f262.tar.bz2
rails-44e44b42d9226c089f00970ced796c83f193f262.zip
Deprecated String#chars in favor of String#mb_chars.
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/multibyte.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/string/multibyte.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/multibyte.rb b/activesupport/lib/active_support/core_ext/string/multibyte.rb
index 3bf79bc7e1..a4caa83b74 100644
--- a/activesupport/lib/active_support/core_ext/string/multibyte.rb
+++ b/activesupport/lib/active_support/core_ext/string/multibyte.rb
@@ -54,7 +54,10 @@ module ActiveSupport #:nodoc:
end
unless '1.8.7 and later'.respond_to?(:chars)
- alias chars mb_chars
+ def chars
+ ActiveSupport::Deprecation.warn('String#chars has been deprecated in favor of String#mb_chars.', caller)
+ mb_chars
+ end
end
else
def mb_chars #:nodoc