diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-01-17 15:26:31 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-01-17 16:31:03 +0100 |
commit | f48098bd80cb93fcc670f2d0a016a64171dfad65 (patch) | |
tree | 7677ab84c5fd9f6f522228ad3f6ac89dac9e6c77 | |
parent | 41ebb5564d0ea5511c48910863814627acf91f94 (diff) | |
download | rails-f48098bd80cb93fcc670f2d0a016a64171dfad65.tar.gz rails-f48098bd80cb93fcc670f2d0a016a64171dfad65.tar.bz2 rails-f48098bd80cb93fcc670f2d0a016a64171dfad65.zip |
Spare to_sym call in `==`.
The @symbol has already been converted to a symbol in initialize, so no need to call to_sym
when comparing it.
Ditch early return for a simple unless statement.
-rw-r--r-- | actionview/lib/action_view/template/types.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionview/lib/action_view/template/types.rb b/actionview/lib/action_view/template/types.rb index bc805de348..2bd8bcee02 100644 --- a/actionview/lib/action_view/template/types.rb +++ b/actionview/lib/action_view/template/types.rb @@ -36,8 +36,7 @@ module ActionView end def ==(type) - return false if type.blank? - symbol.to_sym == type.to_sym + @symbol == type.to_sym unless type.blank? end end |