Skip to content

Commit fc2aa53

Browse files
committed
self. is not needed when calling its own instance method
1 parent 7f99854 commit fc2aa53

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

actionview/lib/action_view/template.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ def compile!(view)
278278
# regardless of the original source encoding.
279279
def compile(mod)
280280
encode!
281-
method_name = self.method_name
282281
code = @handler.call(self)
283282

284283
# Make sure that the resulting String to be eval'd is in the
@@ -333,7 +332,7 @@ def locals_code
333332
locals.each_with_object("") { |key, code| code << "#{key} = #{key} = local_assigns[:#{key}];" }
334333
end
335334

336-
protected def method_name #:nodoc:
335+
def method_name
337336
@method_name ||= begin
338337
m = "_#{identifier_method_name}__#{@identifier.hash}_#{__id__}"
339338
m.tr!("-".freeze, "_".freeze)

0 commit comments

Comments
 (0)