lib/active_support/multibyte/chars.rb in activesupport-4.0.13 vs lib/active_support/multibyte/chars.rb in activesupport-4.1.0.beta1

- old
+ new

@@ -54,14 +54,13 @@ @wrapped_string.force_encoding(Encoding::UTF_8) unless @wrapped_string.frozen? end # Forward all undefined methods to the wrapped string. def method_missing(method, *args, &block) + result = @wrapped_string.__send__(method, *args, &block) if method.to_s =~ /!$/ - result = @wrapped_string.__send__(method, *args, &block) self if result else - result = @wrapped_string.__send__(method, *args, &block) result.kind_of?(String) ? chars(result) : result end end # Returns +true+ if _obj_ responds to the given method. Private methods