summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/erb.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/erb.rb b/lib/erb.rb
index fade2c72ba..58f98ca00f 100644
--- a/lib/erb.rb
+++ b/lib/erb.rb
@@ -329,15 +329,17 @@ class ERB
end
def scan_line(line)
- line.split(SplitRegexp).each do |token|
- next if token.empty?
- yield(token)
+ line.split(SplitRegexp).each do |tokens|
+ tokens.each do |token|
+ next if token.empty?
+ yield(token)
+ end
end
end
def trim_line1(line)
line.split(TrimSplitRegexp).each do |token|
- next if token.empty?
+ next if token.empty?
if token == "%>\n"
yield('%>')
yield(:cr)