Skip to content

Instantly share code, notes, and snippets.

@erikh
Created November 23, 2010 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikh/b50b26a6e5cc2124ffee to your computer and use it in GitHub Desktop.
Save erikh/b50b26a6e5cc2124ffee to your computer and use it in GitHub Desktop.
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 0cd5692..7b5374d 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -503,7 +503,7 @@ class Gem::Specification
def self.load file
return unless file && File.file?(file)
- file = file.untaint
+ file = file.untaint if (file.tainted? and !file.frozen?)
code = if defined? Encoding
File.read file, :encoding => "UTF-8"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment