Skip to content

Commit

Permalink
Make sure rubygems/package can be directly required reliably
Browse files Browse the repository at this point in the history
  • Loading branch information
bronzdoc committed Jun 2, 2020
1 parent 82a440a commit 73c199b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/rubygems/package.rb
Expand Up @@ -42,6 +42,7 @@
# #files are the files in the .gem tar file, not the Ruby files in the gem
# #extract_files and #contents automatically call #verify

require "rubygems"
require 'rubygems/security'
require 'rubygems/specification'
require 'rubygems/user_interaction'
Expand Down
6 changes: 6 additions & 0 deletions test/rubygems/test_project_sanity.rb
Expand Up @@ -12,4 +12,10 @@ def test_manifest_is_up_to_date
assert status.success?, "Expected Manifest.txt to be up to date, but it's not. Run `rake update_manifest` to sync it."
end

def test_require_rubygems_package
_, status = Open3.capture2e("ruby -v --disable-gems -I 'lib' -e 'require \"rubygems/package\"'")

assert status.success?
end

end

0 comments on commit 73c199b

Please sign in to comment.