From 44e44b42d9226c089f00970ced796c83f193f262 Mon Sep 17 00:00:00 2001 From: Manfred Stienstra Date: Sun, 21 Sep 2008 17:47:19 +0200 Subject: Deprecated String#chars in favor of String#mb_chars. --- activesupport/lib/active_support/core_ext/string/multibyte.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'activesupport/lib') 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 -- cgit v1.2.3