aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/multibyte/chars.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/multibyte/chars.rb')
-rw-r--r--activesupport/lib/active_support/multibyte/chars.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb
index 1eb6e8748b..d6ccb4bac1 100644
--- a/activesupport/lib/active_support/multibyte/chars.rb
+++ b/activesupport/lib/active_support/multibyte/chars.rb
@@ -34,7 +34,6 @@ module ActiveSupport #: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 @@ module ActiveSupport #:nodoc:
@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 =~ /!$/