* lib/erb.rb: String#each was removed, use #each_line instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
aamine 2006-10-17 13:03:24 +00:00
Родитель 1fe4c7af5b
Коммит 2f32af52c4
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Tue Oct 17 22:03:08 2006 Minero Aoki <aamine@loveruby.net>
* lib/erb.rb: String#each was removed, use #each_line instead.
Tue Oct 17 08:04:31 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (rb_str_lines): now takes optional argument for the

Просмотреть файл

@ -304,11 +304,11 @@ class ERB
def scan(&block)
@stag = nil
if @percent
@src.each do |line|
@src.each_line do |line|
percent_line(line, &block)
end
else
@src.each do |line|
@src.each_line do |line|
@scan_line.call(line, &block)
end
end
@ -392,7 +392,7 @@ class ERB
class SimpleScanner < Scanner # :nodoc:
def scan
@src.each do |line|
@src.each_line do |line|
line.split(SplitRegexp).each do |token|
next if token.empty?
yield(token)