From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jun 21 16:30:05 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22719106564A for ; Sat, 21 Jun 2008 16:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F41FB8FC1E for ; Sat, 21 Jun 2008 16:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m5LGU4M5090856 for ; Sat, 21 Jun 2008 16:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m5LGU4qI090853; Sat, 21 Jun 2008 16:30:04 GMT (envelope-from gnats) Resent-Date: Sat, 21 Jun 2008 16:30:04 GMT Resent-Message-Id: <200806211630.m5LGU4qI090853@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, KIMURA Yasuhiro Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A6EE10657D7 for ; Sat, 21 Jun 2008 16:23:08 +0000 (UTC) (envelope-from yasu@home.utahime.org) Received: from utahime.as.wakwak.ne.jp (utahime.as.wakwak.ne.jp [61.205.238.40]) by mx1.freebsd.org (Postfix) with ESMTP id E8EE08FC19 for ; Sat, 21 Jun 2008 16:23:07 +0000 (UTC) (envelope-from yasu@home.utahime.org) Received: from eastasia.home.utahime.org (eastasia.home.utahime.org [192.168.174.1]) by utahime.as.wakwak.ne.jp (Postfix) with ESMTP id 422B41701D; Sun, 22 Jun 2008 01:23:06 +0900 (JST) Received: from eastasia.home.utahime.org (localhost [127.0.0.1]) by localhost-backdoor.home.utahime.org (Postfix) with ESMTP id 034B51728B; Sun, 22 Jun 2008 01:23:06 +0900 (JST) Received: from showtime.home.utahime.org (showtime.home.utahime.org [192.168.174.8]) by eastasia.home.utahime.org (Postfix) with ESMTP id BC56017106; Sun, 22 Jun 2008 01:23:05 +0900 (JST) Received: by showtime.home.utahime.org (Postfix, from userid 1000) id 89AE017013; Sun, 22 Jun 2008 01:23:05 +0900 (JST) Message-Id: <20080621162305.89AE017013@showtime.home.utahime.org> Date: Sun, 22 Jun 2008 01:23:05 +0900 (JST) From: KIMURA Yasuhiro To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/124837: [PATCH] lang/ruby18: update to 1.8.7-p17 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2008 16:30:05 -0000 >Number: 124837 >Category: ports >Synopsis: [PATCH] lang/ruby18: update to 1.8.7-p17 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sat Jun 21 16:30:04 UTC 2008 >Closed-Date: >Last-Modified: >Originator: KIMURA Yasuhiro >Release: FreeBSD 7.0-RELEASE-p2 i386 >Organization: >Environment: System: FreeBSD xxxx 7.0-RELEASE-p2 FreeBSD 7.0-RELEASE-p2 #0: Sat Jun 21 22:06:22 JST 2008 xxxx i386 >Description: Update to latest version 1.8.7-p17. >How-To-Repeat: >Fix: --- patch-ruby18 begins here --- Index: Mk/bsd.ruby.mk =================================================================== RCS file: /usr1/freebsd/cvsroot/ports/Mk/bsd.ruby.mk,v retrieving revision 1.168 diff -u -r1.168 bsd.ruby.mk --- Mk/bsd.ruby.mk 6 Apr 2008 10:29:53 -0000 1.168 +++ Mk/bsd.ruby.mk 21 Jun 2008 14:01:32 -0000 @@ -166,10 +166,10 @@ # # Ruby 1.8 # -RUBY_RELVERSION= 1.8.6 -RUBY_PORTREVISION= 2 +RUBY_RELVERSION= 1.8.7 +RUBY_PORTREVISION= 0 RUBY_PORTEPOCH= 1 -RUBY_PATCHLEVEL= 111 +RUBY_PATCHLEVEL= 17 . if ${RUBY_PATCHLEVEL} == 0 RUBY_VERSION?= ${RUBY_RELVERSION} Index: lang/ruby18/Makefile =================================================================== RCS file: /usr1/freebsd/cvsroot/ports/lang/ruby18/Makefile,v retrieving revision 1.134 diff -u -r1.134 Makefile --- lang/ruby18/Makefile 30 Oct 2007 11:24:58 -0000 1.134 +++ lang/ruby18/Makefile 21 Jun 2008 15:03:38 -0000 @@ -126,7 +126,6 @@ EXTDOCS= bigdecimal/bigdecimal_*.html \ dl/doc/dl.txt \ - enumerator/enumerator.txt \ etc/etc.txt* \ pty/README* \ readline/README* \ Index: lang/ruby18/distinfo =================================================================== RCS file: /usr1/freebsd/cvsroot/ports/lang/ruby18/distinfo,v retrieving revision 1.68 diff -u -r1.68 distinfo --- lang/ruby18/distinfo 30 Oct 2007 11:24:58 -0000 1.68 +++ lang/ruby18/distinfo 21 Jun 2008 14:31:36 -0000 @@ -1,3 +1,3 @@ -MD5 (ruby/ruby-1.8.6-p111.tar.bz2) = e1d38b7d4f1be55726d6927a3395ce3b -SHA256 (ruby/ruby-1.8.6-p111.tar.bz2) = 85c694678313818a5083bcfd66ae389fc053b506d93b5ad46f3764981c120fbb -SIZE (ruby/ruby-1.8.6-p111.tar.bz2) = 3919396 +MD5 (ruby/ruby-1.8.7-p17.tar.bz2) = 4bbcf952fad200f4d265cb77a123d2fc +SHA256 (ruby/ruby-1.8.7-p17.tar.bz2) = f205c586764ffbd944b4ec6439bd08286e3e7b27bc9448e74949e76c63f6016b +SIZE (ruby/ruby-1.8.7-p17.tar.bz2) = 4114057 Index: lang/ruby18/pkg-plist =================================================================== RCS file: /usr1/freebsd/cvsroot/ports/lang/ruby18/pkg-plist,v retrieving revision 1.62 diff -u -r1.62 pkg-plist --- lang/ruby18/pkg-plist 6 Apr 2008 10:29:53 -0000 1.62 +++ lang/ruby18/pkg-plist 21 Jun 2008 15:50:26 -0000 @@ -29,7 +29,6 @@ %%PORTDOCS%%%%RUBY_DOCDIR%%/bigdecimal/bigdecimal_en.html %%PORTDOCS%%%%RUBY_DOCDIR%%/bigdecimal/bigdecimal_ja.html %%PORTDOCS%%%%RUBY_DOCDIR%%/dl/dl.txt -%%PORTDOCS%%%%RUBY_DOCDIR%%/enumerator/enumerator.txt %%PORTDOCS%%%%RUBY_DOCDIR%%/etc/etc.txt %%PORTDOCS%%%%RUBY_DOCDIR%%/etc/etc.txt.ja %%PORTDOCS%%%%RUBY_DOCDIR%%/forwardable.rd @@ -53,7 +52,6 @@ %%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/pty %%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/irb %%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/etc -%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/enumerator %%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/dl %%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/bigdecimal %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/README @@ -123,6 +121,7 @@ %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/drb/speeds.rb %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/dualstack-fetch.rb %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/dualstack-httpd.rb +%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/erb/erb4html.rb %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/eval.rb %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/export.rb %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/exyacc.rb @@ -136,7 +135,6 @@ %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/from.rb %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/fullpath.rb %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/getopts.test -%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/goodfriday.rb %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/less.rb %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/list.rb %%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/list2.rb @@ -208,6 +206,7 @@ %%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/optparse %%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/openssl %%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/logger +%%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/erb %%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/drb %%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/dl %%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/curses @@ -292,7 +291,6 @@ %%RUBY_LIBDIR%%/%%RUBY_ARCH%%/dl.so %%RUBY_LIBDIR%%/%%RUBY_ARCH%%/dlconfig.h %%RUBY_LIBDIR%%/%%RUBY_ARCH%%/dln.h -%%RUBY_LIBDIR%%/%%RUBY_ARCH%%/enumerator.so %%RUBY_LIBDIR%%/%%RUBY_ARCH%%/env.h %%RUBY_LIBDIR%%/%%RUBY_ARCH%%/etc.so %%RUBY_LIBDIR%%/%%RUBY_ARCH%%/fcntl.so @@ -394,6 +392,7 @@ %%RUBY_LIBDIR%%/openssl/buffering.rb %%RUBY_LIBDIR%%/openssl/cipher.rb %%RUBY_LIBDIR%%/openssl/digest.rb +%%RUBY_LIBDIR%%/openssl/pkcs7.rb %%RUBY_LIBDIR%%/openssl/ssl.rb %%RUBY_LIBDIR%%/openssl/x509.rb %%RUBY_LIBDIR%%/openssl.rb @@ -532,17 +531,31 @@ %%RUBY_LIBDIR%%/rss/0.9.rb %%RUBY_LIBDIR%%/rss/1.0.rb %%RUBY_LIBDIR%%/rss/2.0.rb +%%RUBY_LIBDIR%%/rss/atom.rb %%RUBY_LIBDIR%%/rss/content.rb %%RUBY_LIBDIR%%/rss/converter.rb %%RUBY_LIBDIR%%/rss/dublincore.rb %%RUBY_LIBDIR%%/rss/image.rb +%%RUBY_LIBDIR%%/rss/itunes.rb +%%RUBY_LIBDIR%%/rss/slash.rb +%%RUBY_LIBDIR%%/rss/xml.rb +%%RUBY_LIBDIR%%/rss/content/1.0.rb +%%RUBY_LIBDIR%%/rss/content/2.0.rb +%%RUBY_LIBDIR%%/rss/dublincore/1.0.rb +%%RUBY_LIBDIR%%/rss/dublincore/2.0.rb +%%RUBY_LIBDIR%%/rss/dublincore/atom.rb %%RUBY_LIBDIR%%/rss/maker/0.9.rb %%RUBY_LIBDIR%%/rss/maker/1.0.rb %%RUBY_LIBDIR%%/rss/maker/2.0.rb +%%RUBY_LIBDIR%%/rss/maker/atom.rb %%RUBY_LIBDIR%%/rss/maker/base.rb %%RUBY_LIBDIR%%/rss/maker/content.rb %%RUBY_LIBDIR%%/rss/maker/dublincore.rb +%%RUBY_LIBDIR%%/rss/maker/entry.rb +%%RUBY_LIBDIR%%/rss/maker/feed.rb %%RUBY_LIBDIR%%/rss/maker/image.rb +%%RUBY_LIBDIR%%/rss/maker/itunes.rb +%%RUBY_LIBDIR%%/rss/maker/slash.rb %%RUBY_LIBDIR%%/rss/maker/syndication.rb %%RUBY_LIBDIR%%/rss/maker/taxonomy.rb %%RUBY_LIBDIR%%/rss/maker/trackback.rb @@ -567,6 +580,7 @@ %%RUBY_LIBDIR%%/runit/testsuite.rb %%RUBY_LIBDIR%%/runit/topublic.rb %%RUBY_LIBDIR%%/scanf.rb +%%RUBY_LIBDIR%%/securerandom.rb %%RUBY_LIBDIR%%/set.rb %%RUBY_LIBDIR%%/sha1.rb %%RUBY_LIBDIR%%/shell/builtin-command.rb @@ -655,6 +669,7 @@ %%RUBY_LIBDIR%%/uri/http.rb %%RUBY_LIBDIR%%/uri/https.rb %%RUBY_LIBDIR%%/uri/ldap.rb +%%RUBY_LIBDIR%%/uri/ldaps.rb %%RUBY_LIBDIR%%/uri/mailto.rb %%RUBY_LIBDIR%%/uri.rb %%RUBY_LIBDIR%%/weakref.rb @@ -833,6 +848,8 @@ @dirrm %%RUBY_LIBDIR%%/shell @dirrm %%RUBY_LIBDIR%%/runit/cui @dirrm %%RUBY_LIBDIR%%/runit +@dirrm %%RUBY_LIBDIR%%/rss/dublincore +@dirrm %%RUBY_LIBDIR%%/rss/content @dirrm %%RUBY_LIBDIR%%/rss/maker @dirrm %%RUBY_LIBDIR%%/rss @dirrm %%RUBY_LIBDIR%%/rinda @@ -882,4 +899,7 @@ @dirrmtry %%RUBY_SITEARCHLIBDIR%% @dirrmtry %%RUBY_SITELIBDIR%% @dirrmtry lib/ruby/site_ruby +@dirrmtry lib/ruby/vendor_ruby/%%RUBY_VER%%/%%RUBY_ARCH%% +@dirrmtry lib/ruby/vendor_ruby/%%RUBY_VER%% +@dirrmtry lib/ruby/vendor_ruby @dirrmtry lib/ruby Index: lang/ruby18/files/patch-io.c =================================================================== RCS file: /usr1/freebsd/cvsroot/ports/lang/ruby18/files/patch-io.c,v retrieving revision 1.1 diff -u -r1.1 patch-io.c --- lang/ruby18/files/patch-io.c 2 May 2006 12:15:24 -0000 1.1 +++ lang/ruby18/files/patch-io.c 21 Jun 2008 14:11:22 -0000 @@ -1,6 +1,6 @@ ---- io.c.orig Thu Mar 2 22:15:47 2006 -+++ io.c Thu Mar 2 22:16:58 2006 -@@ -4682,8 +4682,9 @@ +--- io.c.orig 2008-06-09 03:20:37.000000000 +0900 ++++ io.c 2008-06-21 23:10:15.000000000 +0900 +@@ -4970,8 +4970,9 @@ #if !defined(MSDOS) && !defined(__human68k__) static int io_cntl(fd, cmd, narg, io_p) @@ -11,12 +11,12 @@ { int retval; -@@ -4713,7 +4714,7 @@ +@@ -5001,7 +5002,7 @@ int io_p; { #if !defined(MSDOS) && !defined(__human68k__) - int cmd = NUM2ULONG(req); + unsigned long cmd = NUM2ULONG(req); - OpenFile *fptr; + rb_io_t *fptr; long len = 0; long narg = 0; Index: lang/ruby18/files/patch-lib_webrick_httpservlet_filehandler.rb =================================================================== RCS file: lang/ruby18/files/patch-lib_webrick_httpservlet_filehandler.rb diff -N lang/ruby18/files/patch-lib_webrick_httpservlet_filehandler.rb --- lang/ruby18/files/patch-lib_webrick_httpservlet_filehandler.rb 6 Apr 2008 10:29:54 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,51 +0,0 @@ ---- lib/webrick/httpservlet/filehandler.rb 2007-02-13 02:01:19.000000000 +0300 -+++ lib/webrick/httpservlet/filehandler.rb 2008-03-03 17:36:04.000000000 +0300 -@@ -163,6 +163,7 @@ - end - end - end -+ prevent_directory_traversal(req, res) - super(req, res) - end - -@@ -198,6 +199,22 @@ - - private - -+ def prevent_directory_traversal(req, res) -+ # Preventing directory traversal on DOSISH platforms; -+ # Backslashes (0x5c) in path_info are not interpreted as special -+ # character in URI notation. So the value of path_info should be -+ # normalize before accessing to the filesystem. -+ if File::ALT_SEPARATOR -+ # File.expand_path removes the trailing path separator. -+ # Adding a character is a workaround to save it. -+ # File.expand_path("/aaa/") #=> "/aaa" -+ # File.expand_path("/aaa/" + "x") #=> "/aaa/x" -+ expanded = File.expand_path(req.path_info + "x") -+ expanded[-1, 1] = "" # remove trailing "x" -+ req.path_info = expanded -+ end -+ end -+ - def exec_handler(req, res) - raise HTTPStatus::NotFound, "`#{req.path}' not found" unless @root - if set_filename(req, res) -@@ -256,7 +273,7 @@ - - def check_filename(req, res, name) - @options[:NondisclosureName].each{|pattern| -- if File.fnmatch("/#{pattern}", name) -+ if File.fnmatch("/#{pattern}", name, File::FNM_CASEFOLD) - @logger.warn("the request refers nondisclosure name `#{name}'.") - raise HTTPStatus::NotFound, "`#{req.path}' not found." - end -@@ -310,7 +327,7 @@ - - def nondisclosure_name?(name) - @options[:NondisclosureName].each{|pattern| -- if File.fnmatch(pattern, name) -+ if File.fnmatch(pattern, name, File::FNM_CASEFOLD) - return true - end - } Index: lang/ruby18/files/patch-mkmf.rb =================================================================== RCS file: /usr1/freebsd/cvsroot/ports/lang/ruby18/files/patch-mkmf.rb,v retrieving revision 1.6 diff -u -r1.6 patch-mkmf.rb --- lang/ruby18/files/patch-mkmf.rb 1 Oct 2006 19:10:48 -0000 1.6 +++ lang/ruby18/files/patch-mkmf.rb 21 Jun 2008 14:25:04 -0000 @@ -1,20 +1,20 @@ ---- lib/mkmf.rb.orig Thu Aug 17 09:47:50 2006 -+++ lib/mkmf.rb Wed Aug 30 13:14:44 2006 -@@ -113,8 +113,12 @@ +--- lib/mkmf.rb.orig 2008-05-29 20:23:36.000000000 +0900 ++++ lib/mkmf.rb 2008-06-21 23:21:27.000000000 +0900 +@@ -132,8 +132,12 @@ topdir = File.dirname(libdir = File.dirname(__FILE__)) extdir = File.expand_path("ext", topdir) +setuparchdir = topdir + \ + "/#{Config::CONFIG["ruby_version"]}/#{Config::CONFIG["arch"]}" $extmk = File.expand_path($0)[0, extdir.size+1] == extdir+"/" --if not $extmk and File.exist?(Config::CONFIG["archdir"] + "/ruby.h") +-if not $extmk and File.exist?(($hdrdir = Config::CONFIG["archdir"]) + "/ruby.h") +if not $extmk and File.exist?(setuparchdir + "/ruby.h") + $hdrdir = $topdir = setuparchdir -+elsif not $extmk and File.exist?(Config::CONFIG["archdir"] + "/ruby.h") - $hdrdir = $topdir = Config::CONFIG["archdir"] - elsif File.exist?(($top_srcdir ||= topdir) + "/ruby.h") and ++elsif not $extmk and File.exist?(($hdrdir = Config::CONFIG["archdir"]) + "/ruby.h") + $topdir = $hdrdir + elsif File.exist?(($hdrdir = ($top_srcdir ||= topdir)) + "/ruby.h") and File.exist?(($topdir ||= Config::CONFIG["topdir"]) + "/config.h") -@@ -1281,7 +1285,7 @@ +@@ -1554,7 +1558,7 @@ mfile.print <<-SITEINSTALL Index: lang/ruby18/files/patch-rexml-update =================================================================== RCS file: lang/ruby18/files/patch-rexml-update diff -N lang/ruby18/files/patch-rexml-update --- lang/ruby18/files/patch-rexml-update 6 Apr 2008 10:29:54 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,345 +0,0 @@ -diff -ruN ruby-1.8.6-p111/lib/rexml/attribute.rb ruby-1.8.6-p114/lib/rexml/attribute.rb ---- lib/rexml/attribute.rb 2007-07-28 06:46:08.000000000 +0400 -+++ lib/rexml/attribute.rb 2007-11-04 07:50:15.000000000 +0300 -@@ -50,7 +50,7 @@ - @element = first.element - end - elsif first.kind_of? String -- @element = parent if parent.kind_of? Element -+ @element = parent - self.name = first - @normalized = second.to_s - else -diff -ruN ruby-1.8.6-p111/lib/rexml/document.rb ruby-1.8.6-p114/lib/rexml/document.rb ---- lib/rexml/document.rb 2007-07-28 06:46:08.000000000 +0400 -+++ lib/rexml/document.rb 2007-11-04 07:50:15.000000000 +0300 -@@ -66,6 +66,7 @@ - def add( child ) - if child.kind_of? XMLDecl - @children.unshift child -+ child.parent = self - elsif child.kind_of? DocType - # Find first Element or DocType node and insert the decl right - # before it. If there is no such node, just insert the child at the -@@ -183,7 +184,7 @@ - output = Output.new( output, xml_decl.encoding ) - end - formatter = if indent > -1 -- if transitive -+ if trans - REXML::Formatters::Transitive.new( indent, ie_hack ) - else - REXML::Formatters::Pretty.new( indent, ie_hack ) -diff -ruN ruby-1.8.6-p111/lib/rexml/element.rb ruby-1.8.6-p114/lib/rexml/element.rb ---- lib/rexml/element.rb 2007-07-28 06:46:08.000000000 +0400 -+++ lib/rexml/element.rb 2007-11-04 07:50:15.000000000 +0300 -@@ -553,6 +553,7 @@ - def attribute( name, namespace=nil ) - prefix = nil - prefix = namespaces.index(namespace) if namespace -+ prefix = nil if prefix == 'xmlns' - attributes.get_attribute( "#{prefix ? prefix + ':' : ''}#{name}" ) - end - -@@ -854,15 +855,15 @@ - # Source (see Element.initialize). If not supplied or nil, a - # new, default Element will be constructed - # Returns:: the added Element -- # a = Element.new 'a' -- # a.elements.add Element.new 'b' #-> -- # a.elements.add 'c' #-> -+ # a = Element.new('a') -+ # a.elements.add(Element.new('b')) #-> -+ # a.elements.add('c') #-> - def add element=nil - rv = nil - if element.nil? -- Element.new "", self, @element.context -+ Element.new("", self, @element.context) - elsif not element.kind_of?(Element) -- Element.new element, self, @element.context -+ Element.new(element, self, @element.context) - else - @element << element - element.context = @element.context -diff -ruN ruby-1.8.6-p111/lib/rexml/encoding.rb ruby-1.8.6-p114/lib/rexml/encoding.rb ---- lib/rexml/encoding.rb 2007-07-28 06:46:08.000000000 +0400 -+++ lib/rexml/encoding.rb 2007-11-04 07:50:15.000000000 +0300 -@@ -56,8 +56,13 @@ - - def check_encoding str - # We have to recognize UTF-16, LSB UTF-16, and UTF-8 -- return UTF_16 if /\A\xfe\xff/n =~ str -- return UNILE if /\A\xff\xfe/n =~ str -+ if str[0] == 0xfe && str[1] == 0xff -+ str[0,2] = "" -+ return UTF_16 -+ elsif str[0] == 0xff && str[1] == 0xfe -+ str[0,2] = "" -+ return UNILE -+ end - str =~ /^\s*<\?xml\s+version\s*=\s*(['"]).*?\1\s+encoding\s*=\s*(["'])(.*?)\2/um - return $3.upcase if $3 - return UTF_8 -diff -ruN ruby-1.8.6-p111/lib/rexml/parsers/baseparser.rb ruby-1.8.6-p114/lib/rexml/parsers/baseparser.rb ---- lib/rexml/parsers/baseparser.rb 2007-07-28 06:46:08.000000000 +0400 -+++ lib/rexml/parsers/baseparser.rb 2007-11-04 07:50:15.000000000 +0300 -@@ -1,5 +1,7 @@ - require 'rexml/parseexception' -+require 'rexml/undefinednamespaceexception' - require 'rexml/source' -+require 'set' - - module REXML - module Parsers -@@ -24,7 +26,8 @@ - # Nat Price gave me some good ideas for the API. - class BaseParser - NCNAME_STR= '[\w:][\-\w\d.]*' -- NAME_STR= "(?:#{NCNAME_STR}:)?#{NCNAME_STR}" -+ NAME_STR= "(?:(#{NCNAME_STR}):)?(#{NCNAME_STR})" -+ UNAME_STR= "(?:#{NCNAME_STR}:)?#{NCNAME_STR}" - - NAMECHAR = '[\-\w\d\.:]' - NAME = "([\\w:]#{NAMECHAR}*)" -@@ -35,7 +38,7 @@ - - DOCTYPE_START = /\A\s*)/um -- ATTRIBUTE_PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\2/um -+ ATTRIBUTE_PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\4/um - COMMENT_START = /\A/um - CDATA_START = /\A/um - INSTRUCTION_START = /\A<\?/u - INSTRUCTION_PATTERN = /<\?(.*?)(\s+.*?)?\?>/um -- TAG_MATCH = /^<((?>#{NAME_STR}))\s*((?>\s+#{NAME_STR}\s*=\s*(["']).*?\3)*)\s*(\/)?>/um -+ TAG_MATCH = /^<((?>#{NAME_STR}))\s*((?>\s+#{UNAME_STR}\s*=\s*(["']).*?\5)*)\s*(\/)?>/um - CLOSE_MATCH = /^\s*<\/(#{NAME_STR})\s*>/um - - VERSION = /\bversion\s*=\s*["'](.*?)['"]/um -@@ -133,6 +136,7 @@ - @tags = [] - @stack = [] - @entities = [] -+ @nsstack = [] - end - - def position -@@ -188,6 +192,7 @@ - end - return [ :end_document ] if empty? - return @stack.shift if @stack.size > 0 -+ #STDERR.puts @source.encoding - @source.read if @source.buffer.size<2 - #STDERR.puts "BUFFER = #{@source.buffer.inspect}" - if @document_status == nil -@@ -213,6 +218,7 @@ - return [ :processing_instruction, *@source.match(INSTRUCTION_PATTERN, true)[1,2] ] - when DOCTYPE_START - md = @source.match( DOCTYPE_PATTERN, true ) -+ @nsstack.unshift(curr_ns=Set.new) - identity = md[1] - close = md[2] - identity =~ IDENTITY -@@ -288,6 +294,9 @@ - val = attdef[3] - val = attdef[4] if val == "#FIXED " - pairs[attdef[0]] = val -+ if attdef[0] =~ /^xmlns:(.*)/ -+ @nsstack[0] << $1 -+ end - end - end - return [ :attlistdecl, element, pairs, contents ] -@@ -312,6 +321,7 @@ - begin - if @source.buffer[0] == ?< - if @source.buffer[1] == ?/ -+ @nsstack.shift - last_tag = @tags.pop - #md = @source.match_to_consume( '>', CLOSE_MATCH) - md = @source.match( CLOSE_MATCH, true ) -@@ -345,19 +355,47 @@ - raise REXML::ParseException.new("missing attribute quote", @source) if @source.match(MISSING_ATTRIBUTE_QUOTES ) - raise REXML::ParseException.new("malformed XML: missing tag start", @source) - end -- attrs = [] -- if md[2].size > 0 -- attrs = md[2].scan( ATTRIBUTE_PATTERN ) -+ attributes = {} -+ prefixes = Set.new -+ prefixes << md[2] if md[2] -+ @nsstack.unshift(curr_ns=Set.new) -+ if md[4].size > 0 -+ attrs = md[4].scan( ATTRIBUTE_PATTERN ) - raise REXML::ParseException.new( "error parsing attributes: [#{attrs.join ', '}], excess = \"#$'\"", @source) if $' and $'.strip.size > 0 -+ attrs.each { |a,b,c,d,e| -+ if b == "xmlns" -+ if c == "xml" -+ if d != "http://www.w3.org/XML/1998/namespace" -+ msg = "The 'xml' prefix must not be bound to any other namespace "+ -+ "(http://www.w3.org/TR/REC-xml-names/#ns-decl)" -+ raise REXML::ParseException.new( msg, @source, self ) -+ end -+ elsif c == "xmlns" -+ msg = "The 'xmlns' prefix must not be declared "+ -+ "(http://www.w3.org/TR/REC-xml-names/#ns-decl)" -+ raise REXML::ParseException.new( msg, @source, self) -+ end -+ curr_ns << c -+ elsif b -+ prefixes << b unless b == "xml" -+ end -+ attributes[a] = e -+ } - end - -- if md[4] -+ # Verify that all of the prefixes have been defined -+ for prefix in prefixes -+ unless @nsstack.find{|k| k.member?(prefix)} -+ raise UndefinedNamespaceException.new(prefix,@source,self) -+ end -+ end -+ -+ if md[6] - @closed = md[1] -+ @nsstack.shift - else - @tags.push( md[1] ) - end -- attributes = {} -- attrs.each { |a,b,c| attributes[a] = c } - return [ :start_element, md[1], attributes ] - end - else -@@ -371,6 +409,8 @@ - # return PullEvent.new( :text, md[1], unnormalized ) - return [ :text, md[1] ] - end -+ rescue REXML::UndefinedNamespaceException -+ raise - rescue REXML::ParseException - raise - rescue Exception, NameError => error -diff -ruN ruby-1.8.6-p111/lib/rexml/parsers/treeparser.rb ruby-1.8.6-p114/lib/rexml/parsers/treeparser.rb ---- lib/rexml/parsers/treeparser.rb 2007-02-13 02:01:19.000000000 +0300 -+++ lib/rexml/parsers/treeparser.rb 2007-11-04 07:50:15.000000000 +0300 -@@ -1,4 +1,5 @@ - require 'rexml/validation/validationexception' -+require 'rexml/undefinednamespaceexception' - - module REXML - module Parsers -@@ -29,8 +30,7 @@ - return - when :start_element - tag_stack.push(event[1]) -- # find the observers for namespaces -- @build_context = @build_context.add_element( event[1], event[2] ) -+ el = @build_context = @build_context.add_element( event[1], event[2] ) - when :end_element - tag_stack.pop - @build_context = @build_context.parent -@@ -86,6 +86,8 @@ - end - rescue REXML::Validation::ValidationException - raise -+ rescue REXML::UndefinedNamespaceException -+ raise - rescue - raise ParseException.new( $!.message, @parser.source, @parser, $! ) - end -diff -ruN ruby-1.8.6-p111/lib/rexml/rexml.rb ruby-1.8.6-p114/lib/rexml/rexml.rb ---- lib/rexml/rexml.rb 2007-07-28 17:24:46.000000000 +0400 -+++ lib/rexml/rexml.rb 2007-11-04 07:50:15.000000000 +0300 -@@ -1,3 +1,4 @@ -+# -*- encoding: utf-8 -*- - # REXML is an XML toolkit for Ruby[http://www.ruby-lang.org], in Ruby. - # - # REXML is a _pure_ Ruby, XML 1.0 conforming, -@@ -10,8 +11,9 @@ - # - # Main page:: http://www.germane-software.com/software/rexml - # Author:: Sean Russell --# Version:: 3.1.7.1 --# Date:: 2007/209 -+# Version:: 3.1.7.2 -+# Date:: 2007/275 -+# Revision:: $Revision: 13815 $ - # - # This API documentation can be downloaded from the REXML home page, or can - # be accessed online[http://www.germane-software.com/software/rexml_doc] -@@ -20,10 +22,10 @@ - # or can be accessed - # online[http://www.germane-software.com/software/rexml/docs/tutorial.html] - module REXML -- COPYRIGHT = "Copyright © 2001-2007 Sean Russell " -- DATE = "2007/209" -- VERSION = "3.1.7.1" -- REVISION = "$Revision: 1270$".gsub(/\$Revision:|\$/,'').strip -+ COPYRIGHT = "Copyright \xC2\xA9 2001-2006 Sean Russell " -+ VERSION = "3.1.7.2" -+ DATE = "2007/275" -+ REVISION = "$Revision: 13815 $".gsub(/\$Revision:|\$/,'').strip - - Copyright = COPYRIGHT - Version = VERSION -diff -ruN ruby-1.8.6-p111/lib/rexml/source.rb ruby-1.8.6-p114/lib/rexml/source.rb ---- lib/rexml/source.rb 2007-07-28 06:46:08.000000000 +0400 -+++ lib/rexml/source.rb 2007-11-04 07:50:15.000000000 +0300 -@@ -17,8 +17,8 @@ - elsif arg.kind_of? Source - arg - else -- raise "#{source.class} is not a valid input stream. It must walk \n"+ -- "like either a String, IO, or Source." -+ raise "#{arg.class} is not a valid input stream. It must walk \n"+ -+ "like either a String, an IO, or a Source." - end - end - end -@@ -134,6 +134,7 @@ - def initialize(arg, block_size=500, encoding=nil) - @er_source = @source = arg - @to_utf = false -+ - # Determining the encoding is a deceptively difficult issue to resolve. - # First, we check the first two bytes for UTF-16. Then we - # assume that the encoding is at least ASCII enough for the '>', and -@@ -145,13 +146,16 @@ - str = @source.read( 2 ) - if encoding - self.encoding = encoding -- elsif /\A(?:\xfe\xff|\xff\xfe)/n =~ str -- self.encoding = check_encoding( str ) -- elsif (0xef == str[0] && 0xbb == str[1]) -+ elsif 0xfe == str[0] && 0xff == str[1] -+ @line_break = "\000>" -+ elsif 0xff == str[0] && 0xfe == str[1] -+ @line_break = ">\000" -+ elsif 0xef == str[0] && 0xbb == str[1] - str += @source.read(1) - str = '' if (0xbf == str[2]) -+ @line_break = ">" - else -- @line_break = '>' -+ @line_break = ">" - end - super str+@source.readline( @line_break ) - end -diff -ruN ruby-1.8.6-p111/lib/rexml/undefinednamespaceexception.rb ruby-1.8.6-p114/lib/rexml/undefinednamespaceexception.rb ---- lib/rexml/undefinednamespaceexception.rb 1970-01-01 03:00:00.000000000 +0300 -+++ lib/rexml/undefinednamespaceexception.rb 2007-11-04 07:50:15.000000000 +0300 -@@ -0,0 +1,8 @@ -+require 'rexml/parseexception' -+module REXML -+ class UndefinedNamespaceException < ParseException -+ def initialize( prefix, source, parser ) -+ super( "Undefined prefix #{prefix} found" ) -+ end -+ end -+end Index: lang/ruby-mode.el/pkg-plist =================================================================== RCS file: /usr1/freebsd/cvsroot/ports/lang/ruby-mode.el/pkg-plist,v retrieving revision 1.6 diff -u -r1.6 pkg-plist --- lang/ruby-mode.el/pkg-plist 3 Apr 2007 21:57:48 -0000 1.6 +++ lang/ruby-mode.el/pkg-plist 21 Jun 2008 16:05:41 -0000 @@ -6,9 +6,9 @@ lib/xemacs/site-lisp/rubydb3x.el %%RUBY_ELISPDIR%%/README %%RUBY_ELISPDIR%%/inf-ruby.el -%%RUBY_ELISPDIR%%/rdebug.el %%RUBY_ELISPDIR%%/ruby-electric.el %%RUBY_ELISPDIR%%/ruby-mode.el +%%RUBY_ELISPDIR%%/ruby-style.el %%RUBY_ELISPDIR%%/rubydb2x.el %%RUBY_ELISPDIR%%/rubydb3x.el @dirrmtry lib/xemacs/site-lisp --- patch-ruby18 ends here --- >Release-Note: >Audit-Trail: >Unformatted: