summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-03-15 00:26:03 +0900
committergit <svn-admin@ruby-lang.org>2022-03-15 08:40:35 +0900
commitb85457c710d597281c936d0ac062e542563798cd (patch)
tree47a14ff9080c9618be602957e9cac9a62a6f81b2 /lib
parent63b1633f869d6866ed70dbf80efc954d26127a04 (diff)
[rubygems/rubygems] [DOC] Enable Gem::Package example
Other code must not be between the doc and class definition. https://github.com/rubygems/rubygems/commit/366784aae5
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/package.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/rubygems/package.rb b/lib/rubygems/package.rb
index a81c5f307c..2dd8e8c28e 100644
--- a/lib/rubygems/package.rb
+++ b/lib/rubygems/package.rb
@@ -3,7 +3,12 @@
# Copyright (C) 2004 Mauricio Julio Fernández Pradier
# See LICENSE.txt for additional licensing information.
#++
-#
+
+require_relative "../rubygems"
+require_relative 'security'
+require_relative 'user_interaction'
+
+##
# Example using a Gem::Package
#
# Builds a .gem file given a Gem::Specification. A .gem file is a tarball
@@ -41,10 +46,6 @@
# #files are the files in the .gem tar file, not the Ruby files in the gem
# #extract_files and #contents automatically call #verify
-require_relative "../rubygems"
-require_relative 'security'
-require_relative 'user_interaction'
-
class Gem::Package
include Gem::UserInteraction