зеркало из https://github.com/github/ruby.git
* 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:
Родитель
1fe4c7af5b
Коммит
2f32af52c4
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче