aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2019-03-10 16:31:15 +0100
committerGitHub <noreply@github.com>2019-03-10 16:31:15 +0100
commitc87f6841b77e5827ca7bd03a629e2d615fae0d06 (patch)
tree8e62191b003d0dd096578566f891b66449191a57 /railties
parent08a93efab6bdf10ba7afafb6e51f4b7809c97ebc (diff)
parentc99e673902539a0bb1762a8786671f812076c2d9 (diff)
downloadrails-c87f6841b77e5827ca7bd03a629e2d615fae0d06.tar.gz
rails-c87f6841b77e5827ca7bd03a629e2d615fae0d06.tar.bz2
rails-c87f6841b77e5827ca7bd03a629e2d615fae0d06.zip
Merge pull request #35121 from utilum/warning_tried_to_create_proc_without_block
Ruby 2.7 warning: creating a Proc without a block
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/engine.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index 76be6a8ac7..07bd56c978 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -530,9 +530,9 @@ module Rails
# Defines the routes for this engine. If a block is given to
# routes, it is appended to the engine.
- def routes
+ def routes(&block)
@routes ||= ActionDispatch::Routing::RouteSet.new_with_config(config)
- @routes.append(&Proc.new) if block_given?
+ @routes.append(&block) if block_given?
@routes
end