aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/ext/builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/ext/builder.rb')
-rw-r--r--lib/rubygems/ext/builder.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb
index 6382a8f5c7..b3b9033962 100644
--- a/lib/rubygems/ext/builder.rb
+++ b/lib/rubygems/ext/builder.rb
@@ -148,9 +148,21 @@ EOF
def build_extension extension, dest_path # :nodoc:
results = []
+ # FIXME: Determine if this line is necessary and, if so, why.
+ # Notes:
+ # 1. As far as I can tell, this method is only called by +build_extensions+.
+ # 2. The existence of this line implies +extension+ is, or previously was,
+ # sometimes +false+ or +nil+.
+ # 3. #1 and #2 combined suggests, but does not confirm, that
+ # +@specs.extensions+ sometimes contained +false+ or +nil+ values.
+ # 4. Nothing seems to explicitly handle +extension+ being empty,
+ # which makes me wonder both what it should do and what it does.
+ #
+ # - @duckinator
extension ||= '' # I wish I knew why this line existed
+
extension_dir =
- File.expand_path File.join @gem_dir, File.dirname(extension)
+ File.expand_path File.join(@gem_dir, File.dirname(extension))
lib_dir = File.join @spec.full_gem_path, @spec.raw_require_paths.first
builder = builder_for extension
@@ -200,6 +212,7 @@ EOF
FileUtils.rm_f @spec.gem_build_complete_path
+ # FIXME: action at a distance: @ran_rake modified deep in build_extension(). - @duckinator
@ran_rake = false # only run rake once
@spec.extensions.each do |extension|