--pgp-sign-Multipart_Mon_Jun__2_15:47:28_2008-1
Content-Type: text/plain; charset=US-ASCII

At Mon, 2 Jun 2008 06:37:21 +0900,
Kirill A. Shutemov wrote:
> On Sun, Jun 01, 2008 at 12:25:08AM +0900, Akinori MUSHA wrote:
> > Folks,
> >
> > It is my pleasure to announce that Ruby 1.8.7 has just been released.
>
> ERB is unusable without strscan. TrimScanner(at least) is broken:
>
> > testrb test/erb/test_erb.rb
> Loaded suite test_erb.rb
> Started
> ....E..E.EEF
> Finished in 0.030524 seconds.
> <skip/>
> 12 tests, 31 assertions, 1 failures, 4 errors

Hmm, someone should have tested erb without strscan.

Does this patch work for you?

Index: erb.rb
--- erb.rb	(revision 16747)
+++ erb.rb	(working copy)
@@ -327,9 +327,11 @@
       end

       def scan_line(line)
-        line.scan(/(.*?)(<%%|%%>|<%%#|<%|%>|\n|\z)/m) do |token|
-	  next if token.empty?
-	  yield(token)
+        line.scan(/(.*?)(<%%|%%>|<%%#|<%|%>|\n|\z)/m) do |tokens|
+          tokens.each do |token|
+            next if token.empty?
+            yield(token)
+          end
 	end
       end


--
Akinori MUSHA / http://akinori.org/

--pgp-sign-Multipart_Mon_Jun__2_15:47:28_2008-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEABECAAYFAkhDl4AACgkQkgvvx5/Z4e7sqgCg3nmn25ejAxg2QOc0l7GDVfkw
uV4Ani5tKmvLtQbAmdZ90wKtLGdNtrow
y2
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Mon_Jun__2_15:47:28_2008-1--