diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index 1eb6e8748bb1c3f250cce970412ae90866bb5dc6..d6ccb4bac1cb0ab931ae1c15458996feded18b43 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -34,7 +34,6 @@ module Multibyte #:nodoc: # # ActiveSupport::Multibyte.proxy_class = CharsForUTF32 class Chars - attr_reader :wrapped_string alias to_s wrapped_string alias to_str wrapped_string @@ -45,14 +44,16 @@ def initialize(string) @wrapped_string = string @wrapped_string.force_encoding(Encoding::UTF_8) unless @wrapped_string.frozen? end - - undef <=> else def initialize(string) #:nodoc: @wrapped_string = string end end + def <=>(other) + @wrapped_string <=> other + end + # Forward all undefined methods to the wrapped string. def method_missing(method, *args, &block) if method.to_s =~ /!$/