Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Drying up method_missing code

  • Loading branch information...
commit 5923ae63210e4ab639a82a7ff20b4fad73ff76bb 1 parent 3b16d1f
@hitendrasingh hitendrasingh authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  activesupport/lib/active_support/multibyte/chars.rb
View
3  activesupport/lib/active_support/multibyte/chars.rb
@@ -56,11 +56,10 @@ def initialize(string)
# 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
Please sign in to comment.
Something went wrong with that request. Please try again.