[Rubygems-developers] [ rubygems-Bugs-25677 ] Gem::Specification#validate fails if homepage is unspecified

noreply at rubyforge.org noreply at rubyforge.org
Sat Apr 25 04:09:50 EDT 2009


Bugs item #25677, was opened at 2009-04-25 08:09
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=25677&group_id=126

Category: other
Group: v1.3.x
Status: Open
Resolution: None
Priority: 3
Submitted By: Mike Burrows (asplake)
Assigned to: Nobody (None)
Summary: Gem::Specification#validate fails if homepage is unspecified

Initial Comment:
rubygems/specification.rb:886:
    unless homepage.empty? or homepage =~ /\A[a-z][a-z\d+.-]*:/i then

The above line fails with
  undefined method `empty?' for nil:NilClass
if homepage is nil, and the helpful "no #{attribute} specified" warning a few lines later is never reached.

Perhaps someone assumed that everyone has #empty? defined on NilClass?  I worked around this problem (and identified my missing homepage setting) by doing just that in my Rakefile.

Thank you for an otherwise wonderful thing!
Mike


RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.2
  - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-9
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
     - /Users/asplake/.gem/ruby/1.8
     - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=25677&group_id=126


More information about the Rubygems-developers mailing list