Skip to content
Browse files

Drying up method_missing code

  • Loading branch information...
1 parent 3b16d1f commit 5923ae63210e4ab639a82a7ff20b4fad73ff76bb @hitendrasingh hitendrasingh committed
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

0 comments on commit 5923ae6

Please sign in to comment.
Something went wrong with that request. Please try again.