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:
parent
054e4bc4fd
commit
9d389d6510
1 changed files with 0 additions and 4 deletions
|
@ -347,10 +347,6 @@ class ERB
|
|||
end
|
||||
attr_reader :value
|
||||
alias :to_s :value
|
||||
|
||||
def empty?
|
||||
@value.empty?
|
||||
end
|
||||
end
|
||||
|
||||
class Scanner # :nodoc:
|
||||
|
|
Loading…
Reference in a new issue