diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-08-27 17:58:59 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-08-27 17:59:09 -0700 |
commit | 7a2622bcbd1937dd2862d27fa18258198de7a153 (patch) | |
tree | f4be194e7469cafba5e0df5c709e01f00eaea1e0 /actionview | |
parent | 728f2ebdb6b6f73587e67cd7afb718920bbce2fd (diff) | |
download | rails-7a2622bcbd1937dd2862d27fa18258198de7a153.tar.gz rails-7a2622bcbd1937dd2862d27fa18258198de7a153.tar.bz2 rails-7a2622bcbd1937dd2862d27fa18258198de7a153.zip |
remove dead code
the ERB has already been compiled to Ruby code by the time we're calling
module_eval. Nothing that module eval raises will be caught by a blank
`rescue`, so I think we can remove this
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/template.rb | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index 9d39d02a37..07522778b7 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -293,18 +293,8 @@ module ActionView raise WrongEncodingError.new(@source, Encoding.default_internal) end - begin - mod.module_eval(source, identifier, 0) - ObjectSpace.define_finalizer(self, Finalizer[method_name, mod]) - rescue => e # errors from template code - if logger = (view && view.logger) - logger.debug "ERROR: compiling #{method_name} RAISED #{e}" - logger.debug "Function body: #{source}" - logger.debug "Backtrace: #{e.backtrace.join("\n")}" - end - - raise ActionView::Template::Error.new(self, e) - end + mod.module_eval(source, identifier, 0) + ObjectSpace.define_finalizer(self, Finalizer[method_name, mod]) end def handle_render_error(view, e) #:nodoc: |