diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-05-29 22:11:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-29 22:11:53 +0200 |
commit | bd40038533e00e2d8cb3571d54585772b959fe66 (patch) | |
tree | f8e26d66122c9909e2a0e47eb559b88dc3cf05c2 /actionpack/lib/action_dispatch/journey | |
parent | cbf378bc2725afe55e81d74bf97be7d484309863 (diff) | |
parent | 37fd3d6afb8f7fa184df92e6ce89fa032480605a (diff) | |
download | rails-bd40038533e00e2d8cb3571d54585772b959fe66.tar.gz rails-bd40038533e00e2d8cb3571d54585772b959fe66.tar.bz2 rails-bd40038533e00e2d8cb3571d54585772b959fe66.zip |
Merge pull request #29191 from bogdanvlviv/pass_params_filename_lineno_to_class_eval
Pass params __FILE__ and __LINE__ + 1 if class_eval with <<
Diffstat (limited to 'actionpack/lib/action_dispatch/journey')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/route.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb index 7bc15aa6b3..0acbac1d9d 100644 --- a/actionpack/lib/action_dispatch/journey/route.rb +++ b/actionpack/lib/action_dispatch/journey/route.rb @@ -10,11 +10,11 @@ module ActionDispatch module VerbMatchers VERBS = %w{ DELETE GET HEAD OPTIONS LINK PATCH POST PUT TRACE UNLINK } VERBS.each do |v| - class_eval <<-eoc - class #{v} - def self.verb; name.split("::").last; end - def self.call(req); req.#{v.downcase}?; end - end + class_eval <<-eoc, __FILE__, __LINE__ + 1 + class #{v} + def self.verb; name.split("::").last; end + def self.call(req); req.#{v.downcase}?; end + end eoc end |