青山です。

1.6 が近いという事で、取り急ぎ、1.5.4 のバグ報告。
再現が難しく、データの . 1つ削除しただけでも再現しません。

$ /usr/local/bin/ruby -v
ruby 1.5.4 (2000-06-28) [i586-linux]

(gdb) run test.rb
Starting program: /usr/local/bin/ruby test.rb

Program received signal SIGABRT, Aborted.
0x4011f5d1 in kill ()
(gdb) backtrace 
#0  0x4011f5d1 in kill ()
#1  0x4011f2b8 in gsignal ()
#2  0x40120911 in abort ()
#3  0x4002d2df in rb_bug () at error.c:162
#4  0x400467da in rb_gc_mark (ptr=0x401ffc58) at gc.c:650
#5  0x40046710 in rb_gc_mark (ptr=0x4020dd34) at gc.c:631
#6  0x4003c3e7 in blk_mark (data=0x806fe20) at eval.c:5628
#7  0x4004669e in rb_gc_mark (ptr=0x4020060c) at gc.c:598
#8  0x40045faa in mark_entry (key=8757, value=1075840524) at gc.c:370
#9  0x400830f6 in st_foreach (table=0x804a1f0, func=0x40045f8c <mark_entry>, 
    arg=0x0) at st.c:489
#10 0x40045fe0 in rb_mark_tbl (tbl=0x804a1f0) at gc.c:379
#11 0x400466ae in rb_gc_mark (ptr=0x40203654) at gc.c:602
#12 0x4004662f in rb_gc_mark (ptr=0x40203668) at gc.c:570
#13 0x4004662f in rb_gc_mark (ptr=0x4020367c) at gc.c:570
#14 0x4004662f in rb_gc_mark (ptr=0x40203690) at gc.c:570
#15 0x40046503 in rb_gc_mark (ptr=0x402036a4) at gc.c:565
#16 0x40046503 in rb_gc_mark (ptr=0x40200558) at gc.c:565
#17 0x40045faa in mark_entry (key=8861, value=1075840344) at gc.c:370
#18 0x400830f6 in st_foreach (table=0x804a1f0, func=0x40045f8c <mark_entry>, 
    arg=0x0) at st.c:489
#19 0x40045fe0 in rb_mark_tbl (tbl=0x804a1f0) at gc.c:379
#20 0x400466ae in rb_gc_mark (ptr=0x4020dd20) at gc.c:602
#21 0x40045faa in mark_entry (key=2833, value=1075895584) at gc.c:370
#22 0x400830f6 in st_foreach (table=0x804a4c8, func=0x40045f8c <mark_entry>, 
    arg=0x0) at st.c:489
#23 0x40045fe0 in rb_mark_tbl (tbl=0x804a4c8) at gc.c:379
#24 0x400466ae in rb_gc_mark (ptr=0x4020dce4) at gc.c:602
#25 0x4004662f in rb_gc_mark (ptr=0x4020dcd0) at gc.c:570
#26 0x4004662f in rb_gc_mark (ptr=0x4020dcbc) at gc.c:570
#27 0x40046503 in rb_gc_mark (ptr=0x4020dcf8) at gc.c:565
#28 0x40046503 in rb_gc_mark (ptr=0x4020bcdc) at gc.c:565
#29 0x40046503 in rb_gc_mark (ptr=0x4020bcf0) at gc.c:565
#30 0x40046503 in rb_gc_mark (ptr=0x401ffc20) at gc.c:565
#31 0x40045f34 in mark_locations_array (x=0xbfffe624, n=1) at gc.c:343
#32 0x40046d7d in rb_gc_mark_frame (frame=0xbfffe57c) at gc.c:860
#33 0x40046df1 in rb_gc () at gc.c:925
#34 0x40045a47 in ruby_xmalloc (size=5760) at gc.c:75
#35 0x4007b91f in ruby_re_match (bufp=0x8070f58, 
    string_arg=0x80719a0 "        .\n", size=10, pos=0, regs=0x400b28ec)
    at regex.c:3549
#36 0x4007b590 in ruby_re_search (bufp=0x8070f58, 
    string=0x80719a0 "        .\n", size=10, startpos=0, range=10, 
    regs=0x400b28ec) at regex.c:3237
#37 0x40071aaf in rb_reg_search (re=1075839544, str=1075837984, pos=0, 
    reverse=0) at re.c:620
#38 0x400723e5 in rb_reg_match (re=1075839544, str=1075837984) at re.c:946
#39 0x400724bd in rb_reg_match_m (re=1075839544, str=1075837984) at re.c:974
#40 0x400380eb in call_cfunc (func=0x4007249c <rb_reg_match_m>, 
    recv=1075839544, len=1, argc=1, argv=0xbfffe624) at eval.c:3936
#41 0x40038643 in rb_call0 (klass=1075861344, recv=1075839544, id=6481, 
    argc=1, argv=0xbfffe624, body=0x40205580, nosuper=1) at eval.c:4069
#42 0x40038e09 in rb_call (klass=1075861344, recv=1075839544, mid=6481, 
    argc=1, argv=0xbfffe624, scope=0) at eval.c:4265
#43 0x40033cfe in rb_eval (self=1075891504, n=0x402001e8) at eval.c:2377
#44 0x400336aa in rb_eval (self=1075891504, n=0x402001d4) at eval.c:2318
#45 0x400325e2 in rb_eval (self=1075891504, n=0x4020038c) at eval.c:1979
#46 0x40032902 in rb_eval (self=1075891504, n=0x4020015c) at eval.c:2047
#47 0x40030136 in eval_node (self=1075891504) at eval.c:1036
#48 0x4003033b in ruby_run () at eval.c:1110
#49 0x8048693 in main (argc=2, argv=0xbffffc54, envp=0xbffffc60) at main.c:45
#50 0x401197a2 in   ()


----- test.rb
#!/usr/local/bin/ruby

while line = DATA.gets
  /./.match(line)
  /^  <H2>/.match(line)
  /^    <H3>/.match(line)
  true if /^( +)<PRE>/.match(line) ... /^( +)<\/PRE>/.match(line)
end

__END__
      <H4>...</H4>
        <P>
          ............................................................
          ..........................
        </P>
      <H4>...</H4>
        <PRE>
          .....................
          ...
        </PRE>
      <H4>...</H4>
        <P>
          <TT>....</TT>...
        </P>
      <H4>...</H4>
        <P>
        </P>
    <H3></H3>
      <PRE>
        .
      </PRE>
    <H3></H3>
      <PRE>
        .
        .
      </PRE>
    <H3></H3>
      <PRE>
        .
      </PRE>
    <H3></H3>
      <PRE>
        .
        .
        .
      </PRE>
    <H3></H3>
      <PRE>
        .
        .
----- test.rb


-- 
青山 和光 Wakou Aoyama <wakou / fsinet.or.jp>