Hi --

On Tue, 28 Oct 2003, Daniel Carrera wrote:
> Can anyone confirm this? :
>
> $ ruby -v
> ruby 1.8.0 (2003-08-04) [sparc-solaris2.8]
> $ ruby -rrexml/document -e ""
> /home3/dcarrera/lib/ruby/site_ruby/1.8/rexml/doctype.rb:178: warning:
> regexp has `]' without escape
>
>
> Indeed, if you look at the source, line 178 has:
> -----------
> begin
> ...
> source.match(/\s*]\s*>/um, true) <--------
> ^^^^^^^^^
> rescue ParseException
> -----------
>
> That doesn't look right to me. On the other hand, I did have rexml
> working before I reinstalled Ruby, and if this were a but it would have
> been noticed.
>
> Can anyone shed any light on this? Is this line correct? (it must be).
> If so, does anyone know what might be wrong with my system?
The line looks OK to me; my guess is that it's matching part of
"<!DOCTYPE ... [ ... ]>" or something similar that has the "]>"
sequence.

The warning (not error :-) message is new in 1.8.0, so I guess anyone
who's put a literal ] in a regex should probably now escape it.


David

--
David Alan Black
home: [email][email protected][/email]
work: [email][email protected][/email]
Web: [url]http://pirate.shu.edu/~blackdav[/url]