aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2016-12-23 20:39:54 +0900
committerAkira Matsuda <ronnie@dio.jp>2016-12-24 22:16:47 +0900
commitfc2aa53f875b12df93b0d07932e3ab563b89152c (patch)
tree8cf8371fbfab94b9bb9b84cf170389fb7d8273c7
parent7f998540af7c3398a3dae760e3e5f0218dec8897 (diff)
downloadrails-fc2aa53f875b12df93b0d07932e3ab563b89152c.tar.gz
rails-fc2aa53f875b12df93b0d07932e3ab563b89152c.tar.bz2
rails-fc2aa53f875b12df93b0d07932e3ab563b89152c.zip
self. is not needed when calling its own instance method
-rw-r--r--actionview/lib/action_view/template.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb
index 45cf7e6a93..d56239789d 100644
--- a/actionview/lib/action_view/template.rb
+++ b/actionview/lib/action_view/template.rb
@@ -278,7 +278,6 @@ module ActionView
# regardless of the original source encoding.
def compile(mod)
encode!
- method_name = self.method_name
code = @handler.call(self)
# Make sure that the resulting String to be eval'd is in the
@@ -333,7 +332,7 @@ module ActionView
locals.each_with_object("") { |key, code| code << "#{key} = #{key} = local_assigns[:#{key}];" }
end
- protected def method_name #:nodoc:
+ def method_name
@method_name ||= begin
m = "_#{identifier_method_name}__#{@identifier.hash}_#{__id__}"
m.tr!("-".freeze, "_".freeze)