зеркало из https://github.com/github/ruby.git
Reverting nobu's rubygems patch. It needs: 1) to have a test, 2) to be UTF8, and 3) to work on 1.8 (see Gem.read_binary). (It should also be submitted to the rubygems repo or tracker)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a525f4d5fb
Коммит
d26fb035ca
|
@ -24,12 +24,6 @@ Tue Jan 18 07:53:52 2011 Tanaka Akira <akr@fsij.org>
|
|||
|
||||
* eval_intern.h: parenthesize macro arguments.
|
||||
|
||||
Tue Jan 18 06:49:38 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/rubygems/source_index.rb (Gem#load_specification): read in
|
||||
binary mode to get rid of failures caused by mismatch between
|
||||
default internal encoding and encoding comments.
|
||||
|
||||
Tue Jan 18 04:42:44 2011 Aaron Patterson <aaron@tenderlovemaking.com>
|
||||
|
||||
* ext/psych/lib/psych/parser.rb (Mark): Adding a class to wrap
|
||||
|
|
|
@ -85,7 +85,11 @@ class Gem::SourceIndex
|
|||
def load_specification(file_name)
|
||||
return nil unless file_name and File.exist? file_name
|
||||
|
||||
spec_code = File.binread(file_name).untaint
|
||||
spec_code = if defined? Encoding then
|
||||
File.read file_name, :encoding => 'UTF-8'
|
||||
else
|
||||
File.read file_name
|
||||
end.untaint
|
||||
|
||||
begin
|
||||
gemspec = eval spec_code, binding, file_name
|
||||
|
|
Загрузка…
Ссылка в новой задаче