Project

General

Profile

Bug #4686

test/rubygems/test_gem_package_tar_output.rb should require rubygems/security

Added by sorah (Sorah Fukumori) about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 1.9.3dev (2011-05-13 trunk 31542) [x86_64-darwin10.7.0]
Backport:
[ruby-core:36168]

Description

Hi,

When run test-all with parallel option ("-j"), test_self_open_signed(TestGemPackageTarOutput) can be failed.

1) Error:
test_self_open_signed(TestGemPackageTarOutput):
NameError: uninitialized constant Gem::Security
/Users/sorah/git/ruby/ruby/test/rubygems/test_gem_package_tar_output.rb:61:in `test_self_open_signed'

Because if running test-all with -j, the running order of test files can be not equal to the order when running test-all without -j.

So, if the test expects that already 'openssl' or 'rubygem/security' is required before that test runs,
we should fix to require 'rubygem/security' on the top of the test file.

--
Patch is below:

diff --git a/test/rubygems/test_gem_package_tar_output.rb b/test/rubygems/test_gem_package_tar_output.rb
index 77f3185..01b4a0f 100644
--- a/test/rubygems/test_gem_package_tar_output.rb
+++ b/test/rubygems/test_gem_package_tar_output.rb
@@ -6,6 +6,7 @@

require 'rubygems/package/tar_test_case'
require 'rubygems/package/tar_output'
+require 'rubygems/security'

class TestGemPackageTarOutput < Gem::Package::TarTestCase

Updated by drbrain (Eric Hodel) about 9 years ago

  • Status changed from Open to Closed

This has been committed to rubygems trunk, thank you!

Also available in: Atom PDF