REXML package warnings

Hi. I am using REXML package that comes with ruby and I get these
annoying warning messages:

C:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character
class has -' without escape C:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class has-’ without escape
C:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character
class has -' without escape C:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character class has-’ without escape
C:/ruby/lib/ruby/site_ruby/1.8/rexml/doctype.rb:196: warning: regexp
has `]’ without escape

is there any simple way to hide these warnings? I am including the
package by

require "rexml/document"
include REXML

I would like to see the warnings related to my own code though…

Any comments appreciated.
Ignas

it seem you’re using the pragprog installer for 1.8.1.
For some strange reason te installer puts rexml version 2.7.3,
included in 181, in
ruby\lib\ruby\1.8 (good)
and an older rexml (2.5.7) in
ruby\lib\ruby\site_ruby\1.8\ (bad)

just rename the second one (to rrexml as an example) so that you can
use the one included with ruby 1.8.1
HTH.

···

il 12 Mar 2004 02:52:12 -0800, toxid@centras.lt (Ignas Kukenys) ha scritto::

Hi. I am using REXML package that comes with ruby and I get these
annoying warning messages:

Ignas Kukenys wrote:

Hi. I am using REXML package that comes with ruby and I get these
annoying warning messages:

I fixed this by the following change in lib/ruby/site_ruby/1.8/rexml/:

diff -u2 -r /tmp/rexml/doctype.rb ./doctype.rb
— /tmp/rexml/doctype.rb 2004-02-25 13:56:43.683123300 +1100
+++ ./doctype.rb 2004-02-25 13:51:43.513034900 +1100
@@ -194,5 +194,5 @@
raise ParseException.new( “Invalid end of DOCTYPE declaration
"#{source.buffer}"”, source ) if md.nil?
end

  •   		source.match(/\s*]\s*>/um, true)
    
  •   		source.match(/\s*\]\s*>/um, true)
      	rescue ParseException
      		raise
    

diff -u2 -r /tmp/rexml/entity.rb ./entity.rb
— /tmp/rexml/entity.rb 2004-02-25 13:55:33.167949600 +1100
+++ ./entity.rb 2004-02-25 13:53:40.559295300 +1100
@@ -8,5 +8,5 @@
class Entity < Child
include XMLTokens

  •   PUBIDCHAR = "\x20\x0D\x0Aa-zA-Z0-9-()+,./:=?;!*@$_%#"
    
  •   PUBIDCHAR = "-\x20\x0D\x0Aa-zA-Z0-9()+,./:=?;!*@$_%#"
      SYSTEMLITERAL = %Q{((?:"[^"]*")|(?:'[^']*'))}
      PUBIDLITERAL = Q{("[#{PUBIDCHAR}']*"|'[#{PUBIDCHAR}]*')}
    

wow, that was something i couldn’t have possibly found out by myself.
thanx for the help, really appreciated! I’ve posted a note at the ruby
windowsinstaller page, hoping they’ll fix it in the future versions.

···

Hi. I am using REXML package that comes with ruby and I get these
annoying warning messages:

it seem you’re using the pragprog installer for 1.8.1.
For some strange reason te installer puts rexml version 2.7.3,
included in 181, in
ruby\lib\ruby\1.8 (good)
and an older rexml (2.5.7) in
ruby\lib\ruby\site_ruby\1.8\ (bad)

just rename the second one (to rrexml as an example) so that you can
use the one included with ruby 1.8.1
HTH.