From b9a4cf2aca343d8d9cd370775af927cd750a17b2 Mon Sep 17 00:00:00 2001 From: drbrain Date: Wed, 5 Feb 2014 22:18:25 +0000 Subject: * lib/rubygems: Update to RubyGems 2.2.2. Complete history at: http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.2.2+%2F+2014-02-05 * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rubygems/specification.rb | 44 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'lib/rubygems/specification.rb') diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index e98f3284cd..f4e609a5eb 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -240,6 +240,28 @@ class Gem::Specification < Gem::BasicSpecification attr_reader :summary + ## + # Singular writer for #authors + # + # Usage: + # + # spec.author = 'John Jones' + + def author= o + self.authors = [o] + end + + ## + # Sets the list of authors, ensuring it is an array. + # + # Usage: + # + # spec.authors = ['John Jones', 'Mary Smith'] + + def authors= value + @authors = Array(value).flatten.grep(String) + end + ## # The platform this gem runs on. # @@ -442,28 +464,6 @@ class Gem::Specification < Gem::BasicSpecification add_dependency_with_type(gem, :runtime, *requirements) end - ## - # Singular writer for #authors - # - # Usage: - # - # spec.author = 'John Jones' - - def author= o - self.authors = [o] - end - - ## - # Sets the list of authors, ensuring it is an array. - # - # Usage: - # - # spec.authors = ['John Jones', 'Mary Smith'] - - def authors= value - @authors = Array(value).flatten.grep(String) - end - ## # Executables included in the gem. # -- cgit v1.2.3