aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/template.rb
diff options
context:
space:
mode:
authorToshimaru <me@toshimaru.net>2016-12-09 03:08:17 +0900
committerToshimaru <me@toshimaru.net>2016-12-09 05:21:02 +0900
commit7407d35c5417b6ef872663936a5880ede8ab711c (patch)
tree468d7f03864ed3dd7e85dbd398648b06e044f5cc /actionview/lib/action_view/template.rb
parenta0aad0381a35aebab31f5a7318c2a1644f86bbea (diff)
downloadrails-7407d35c5417b6ef872663936a5880ede8ab711c.tar.gz
rails-7407d35c5417b6ef872663936a5880ede8ab711c.tar.bz2
rails-7407d35c5417b6ef872663936a5880ede8ab711c.zip
Enable `block` variable in view
Remove `block` keyword from reserved method names
Diffstat (limited to 'actionview/lib/action_view/template.rb')
-rw-r--r--actionview/lib/action_view/template.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb
index 2dcd6324db..d67f37d6d1 100644
--- a/actionview/lib/action_view/template.rb
+++ b/actionview/lib/action_view/template.rb
@@ -326,7 +326,7 @@ module ActionView
def locals_code #:nodoc:
# Only locals with valid variable names get set directly. Others will
# still be available in local_assigns.
- locals = @locals.to_set - Module::DELEGATION_RESERVED_METHOD_NAMES
+ locals = @locals.to_set - Module::DELEGATION_RESERVED_METHOD_NAMES.dup.delete("block")
locals = locals.grep(/\A(?![A-Z0-9])(?:[[:alnum:]_]|[^\0-\177])+\z/)
# Double assign to suppress the dreaded 'assigned but unused variable' warning