1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

erb.rb: drop unreachable method

This seems to be unreachable from first introduction at r21286.

In ERB implementation, `#empty?` is only called for each member of
return value of `String#scan`, and `ERB::Compiler::PercentLine` is never
returned from `String#scan`.

Also, in `ERB::Compiler#compile`, as it's yielded only when stag is nil,
methods called to `ERB::Compiler::PercentLine` object yielded from
`ERB::Compiler::TrimScanner#scan` are only: `#nil?`, `#==`, `to_s`.

Thus `ERB::Compiler::PercentLine#empty?` is never used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2017-09-26 11:50:07 +00:00
parent 054e4bc4fd
commit 9d389d6510

View file

@ -347,10 +347,6 @@ class ERB
end end
attr_reader :value attr_reader :value
alias :to_s :value alias :to_s :value
def empty?
@value.empty?
end
end end
class Scanner # :nodoc: class Scanner # :nodoc: