aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-08-27 17:58:59 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-08-27 17:59:09 -0700
commit7a2622bcbd1937dd2862d27fa18258198de7a153 (patch)
treef4be194e7469cafba5e0df5c709e01f00eaea1e0 /actionview/lib/action_view
parent728f2ebdb6b6f73587e67cd7afb718920bbce2fd (diff)
downloadrails-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/lib/action_view')
-rw-r--r--actionview/lib/action_view/template.rb14
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: