Skip to content

Commit 8a45dce

Browse files
committed
Fix Gem::Specification documentation
1 parent 2001a64 commit 8a45dce

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

lib/rubygems/specification.rb

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@
55
# See LICENSE.txt for permissions.
66
#++
77

8+
require 'rubygems/version'
9+
require 'rubygems/requirement'
10+
require 'rubygems/platform'
11+
require 'rubygems/deprecate'
12+
13+
# :stopdoc:
14+
# date.rb can't be loaded for `make install` due to miniruby
15+
# Date is needed for old gems that stored #date as Date instead of Time.
16+
class Date; end
17+
# :startdoc:
18+
819
##
920
# The Specification class contains the information for a Gem. Typically
1021
# defined in a .gemspec file or a Rakefile, and looks like this:
@@ -20,32 +31,19 @@
2031
# s.homepage = 'https://rubygems.org/gems/example'
2132
# end
2233
#
23-
# Starting in RubyGems 1.9.0, a Specification can hold arbitrary
24-
# metadata. This metadata is accessed via Specification#metadata
25-
# and has the following restrictions:
34+
# Starting in RubyGems 1.9.0, a Specification can hold arbitrary
35+
# metadata. This metadata is accessed via Specification#metadata
36+
# and has the following restrictions:
2637
#
27-
# * Must be a Hash object
28-
# * All keys and values must be Strings
29-
# * Keys can be a maximum of 128 bytes and values can be a
30-
# maximum of 1024 bytes
31-
# * All strings must be UTF8, no binary data is allowed
38+
# * Must be a Hash object
39+
# * All keys and values must be Strings
40+
# * Keys can be a maximum of 128 bytes and values can be a
41+
# maximum of 1024 bytes
42+
# * All strings must be UTF8, no binary data is allowed
3243
#
33-
# For example, to add metadata for the location of a bugtracker:
44+
# For example, to add metadata for the location of a bugtracker:
3445
#
3546
# s.metadata = { "bugtracker" => "http://somewhere.com/blah" }
36-
#
37-
38-
39-
require 'rubygems/version'
40-
require 'rubygems/requirement'
41-
require 'rubygems/platform'
42-
require 'rubygems/deprecate'
43-
44-
# :stopdoc:
45-
# date.rb can't be loaded for `make install` due to miniruby
46-
# Date is needed for old gems that stored #date as Date instead of Time.
47-
class Date; end
48-
# :startdoc:
4947

5048
class Gem::Specification
5149

0 commit comments

Comments
 (0)