青木です。

String#each がなくなった影響で、erb の trim_mode=1, 2 が
エラーになってます。

~/src/ruby % ruby -v -I./lib -rerb -e 'ERB.new("", nil, 2).result'
ruby 1.9.0 (2006-10-17) [x86_64-linux]
/home/aamine/src/ruby/lib/erb.rb:311:in `ERB::Compiler::TrimScanner#scan': undefined method `each' for "":String (NoMethodError)
        from /home/aamine/src/ruby/lib/erb.rb:524:in `ERB::Compiler#compile'
        from /home/aamine/src/ruby/lib/erb.rb:691:in `initialize'
        from -e:1:in `Class#new'
        from -e:1

Index: lib/erb.rb
===================================================================
RCS file: /var/cvs/src/ruby/lib/erb.rb,v
retrieving revision 1.16
diff -u -r1.16 erb.rb
--- lib/erb.rb	10 Jan 2006 15:21:45 -0000	1.16
+++ lib/erb.rb	17 Oct 2006 12:08:00 -0000
@@ -304,11 +304,11 @@
       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 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)


--
青木峰郎