From 40b87c98859cf7c264f78fe15cc2bd61417d8a9b Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 6 Feb 2004 09:28:03 +0000 Subject: * several backports from 1.9 git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/find.rb | 5 +++-- lib/rexml/encodings/ISO-8859-1.rb | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/find.rb b/lib/find.rb index 9ca39cabc..52efde81f 100644 --- a/lib/find.rb +++ b/lib/find.rb @@ -36,7 +36,8 @@ module Find paths.collect!{|d| d.dup} while file = paths.shift catch(:prune) do - yield file + next unless File.exist? file + yield file.dup.taint begin if File.lstat(file).directory? then d = Dir.open(file) @@ -50,7 +51,7 @@ module Find else f = File.join(file, f) end - paths.unshift f + paths.unshift f.untaint end ensure d.close diff --git a/lib/rexml/encodings/ISO-8859-1.rb b/lib/rexml/encodings/ISO-8859-1.rb index 5beefbd40..32ddfbc90 100644 --- a/lib/rexml/encodings/ISO-8859-1.rb +++ b/lib/rexml/encodings/ISO-8859-1.rb @@ -1,6 +1,6 @@ module REXML module Encoding - @@__REXML_encoding_methods =<<-EOL + @@__REXML_encoding_methods =<<-'EOL' # Convert from UTF-8 def encode content array_utf8 = content.unpack('U*') -- cgit