diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-10 08:00:19 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-10 08:00:19 +0000 |
commit | 5d613c83ccb6992c6b99e5a23512719604bbdae9 (patch) | |
tree | 8f1591102f7c8e1a27bd3c30b43567ced67e2519 /lib/rubygems/specification.rb | |
parent | c12b28936266c205d174458f0bd21766154048f7 (diff) | |
download | ruby-5d613c83ccb6992c6b99e5a23512719604bbdae9.tar.gz |
Import RubyGems r1601. [ruby-core:15381].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/specification.rb')
-rw-r--r-- | lib/rubygems/specification.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 6338e73a1d..be03150c96 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -457,7 +457,7 @@ module Gem overwrite_accessor :default_executable do begin - if defined? @default_executable and @default_executable + if defined?(@default_executable) and @default_executable result = @default_executable elsif @executables and @executables.size == 1 result = Array(@executables).first @@ -471,14 +471,12 @@ module Gem end def add_bindir(executables) - if not defined? @executables || @executables.nil? - return nil - end + return nil if executables.nil? - if defined? @bindir and @bindir then - Array(@executables).map {|e| File.join(@bindir, e) } + if @bindir then + Array(executables).map { |e| File.join(@bindir, e) } else - @executables + executables end rescue return nil @@ -511,7 +509,7 @@ module Gem @test_files = [@test_suite_file].flatten @test_suite_file = nil end - if defined? @test_files and @test_files then + if defined?(@test_files) and @test_files then @test_files else @test_files = [] @@ -903,7 +901,7 @@ module Gem # Also, the summary and description are converted to a normal # format. def normalize - if defined? @extra_rdoc_files and @extra_rdoc_files then + if defined?(@extra_rdoc_files) and @extra_rdoc_files then @extra_rdoc_files.uniq! @files ||= [] @files.concat(@extra_rdoc_files) |