diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2013-09-20 07:29:38 -0700 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2013-09-20 07:29:38 -0700 |
commit | 218c089ae7fd997fda23cc604f18df95c58d31b0 (patch) | |
tree | 4a118590a374e5a490e9c4cdfded617250afa50b /activesupport/lib/active_support/multibyte/chars.rb | |
parent | 76d36458eadcb32c233f44065fccfbbef9a58119 (diff) | |
parent | 1afe1aeba528249fc6be8bda4dad6a4dd243646d (diff) | |
download | rails-218c089ae7fd997fda23cc604f18df95c58d31b0.tar.gz rails-218c089ae7fd997fda23cc604f18df95c58d31b0.tar.bz2 rails-218c089ae7fd997fda23cc604f18df95c58d31b0.zip |
Merge pull request #12299 from hitendrasingh/code_refactor
DRYing up method_missing code; Initializing Codepoint object with default values
Diffstat (limited to 'activesupport/lib/active_support/multibyte/chars.rb')
-rw-r--r-- | activesupport/lib/active_support/multibyte/chars.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index a42e7f6542..3c0cf9f137 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -56,11 +56,10 @@ module ActiveSupport #:nodoc: # 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 |