aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/source_index.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/source_index.rb')
-rw-r--r--lib/rubygems/source_index.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/source_index.rb b/lib/rubygems/source_index.rb
index d033fd40fe..8caf7b2e35 100644
--- a/lib/rubygems/source_index.rb
+++ b/lib/rubygems/source_index.rb
@@ -85,7 +85,7 @@ class Gem::SourceIndex
def load_specification(file_name)
return nil unless file_name and File.exist? file_name
- spec_code = if RUBY_VERSION < '1.9' then
+ spec_code = if !defined?(Encoding) then
File.read file_name
else
File.read file_name, :encoding => 'UTF-8'