From 9d389d6510d8dadfa2ee1e246b5e205d2eeb7de4 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Tue, 26 Sep 2017 11:50:07 +0000 Subject: [PATCH] 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 --- lib/erb.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/erb.rb b/lib/erb.rb index 813ff98253..74974696d7 100644 --- a/lib/erb.rb +++ b/lib/erb.rb @@ -347,10 +347,6 @@ class ERB end attr_reader :value alias :to_s :value - - def empty? - @value.empty? - end end class Scanner # :nodoc: