diff options
author | José Valim <jose.valim@gmail.com> | 2012-01-05 13:46:39 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-01-05 13:46:39 -0800 |
commit | 4751cc21e8893f1cec827c8dcdf876db43e91556 (patch) | |
tree | fc21af623d539d83fa24bd55f74d49fe7c81b50d /activesupport/lib/active_support/multibyte/utils.rb | |
parent | 55fbc19b5ff062bdd96c81532311e897ecb2a996 (diff) | |
parent | 16bee7618c328ecd790db366221639661912c477 (diff) | |
download | rails-4751cc21e8893f1cec827c8dcdf876db43e91556.tar.gz rails-4751cc21e8893f1cec827c8dcdf876db43e91556.tar.bz2 rails-4751cc21e8893f1cec827c8dcdf876db43e91556.zip |
Merge pull request #4332 from norman/multibyte
Putting AS::Multibyte on a Ruby 1.9 diet
Diffstat (limited to 'activesupport/lib/active_support/multibyte/utils.rb')
-rw-r--r-- | activesupport/lib/active_support/multibyte/utils.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/activesupport/lib/active_support/multibyte/utils.rb b/activesupport/lib/active_support/multibyte/utils.rb deleted file mode 100644 index bd6d4bad41..0000000000 --- a/activesupport/lib/active_support/multibyte/utils.rb +++ /dev/null @@ -1,27 +0,0 @@ -# encoding: utf-8 - -module ActiveSupport #:nodoc: - module Multibyte #:nodoc: - # Returns a regular expression that matches valid characters in the current encoding - def self.valid_character - VALID_CHARACTER[Encoding.default_external.to_s] - end - - # Verifies the encoding of a string - def self.verify(string) - string.valid_encoding? - end - - # Verifies the encoding of the string and raises an exception when it's not valid - def self.verify!(string) - raise EncodingError.new("Found characters with invalid encoding") unless verify(string) - end - - # Removes all invalid characters from the string. - # - # Note: this method is a no-op in Ruby 1.9 - def self.clean(string) - string - end - end -end |