mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0b38e9bc9d
commit
f8cf213ba2
2 changed files with 11 additions and 9 deletions
|
@ -1,3 +1,9 @@
|
|||
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,11 +85,7 @@ class Gem::SourceIndex
|
|||
def load_specification(file_name)
|
||||
return nil unless file_name and File.exist? file_name
|
||||
|
||||
spec_code = if defined? Encoding then
|
||||
File.read file_name, :encoding => 'UTF-8'
|
||||
else
|
||||
File.read file_name
|
||||
end.untaint
|
||||
spec_code = File.binread(file_name).untaint
|
||||
|
||||
begin
|
||||
gemspec = eval spec_code, binding, file_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue