buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject svn commit: r1420372 - in /buildr/trunk: lib/buildr/core/application.rb spec/core/application_spec.rb
Date Tue, 11 Dec 2012 20:04:59 GMT
Author: donaldp
Date: Tue Dec 11 20:04:55 2012
New Revision: 1420372

URL: http://svn.apache.org/viewvc?rev=1420372&view=rev
Log:
Ruby 1.9 variants will expand the name of the file prior to placing it on the $LOADED_FEATURES
list. Adopt this convention

Modified:
    buildr/trunk/lib/buildr/core/application.rb
    buildr/trunk/spec/core/application_spec.rb

Modified: buildr/trunk/lib/buildr/core/application.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/application.rb?rev=1420372&r1=1420371&r2=1420372&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/application.rb (original)
+++ buildr/trunk/lib/buildr/core/application.rb Tue Dec 11 20:04:55 2012
@@ -492,8 +492,9 @@ module Buildr
       end
 
       files.each do |file|
+        file = File.expand_path(file)
         unless $LOADED_FEATURES.include?(file)
-          load File.expand_path(file)
+          load file
           $LOADED_FEATURES << file
         end
       end

Modified: buildr/trunk/spec/core/application_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/core/application_spec.rb?rev=1420372&r1=1420371&r2=1420372&view=diff
==============================================================================
--- buildr/trunk/spec/core/application_spec.rb (original)
+++ buildr/trunk/spec/core/application_spec.rb Tue Dec 11 20:04:55 2012
@@ -296,7 +296,7 @@ describe Buildr::Application do
     it 'should not load files from the rakelib more than once' do
       write_task 'tasks/new_one.rake'
       write_task 'tasks/already.rake'
-      $LOADED_FEATURES << 'tasks/already.rake'
+      $LOADED_FEATURES << File.expand_path('tasks/already.rake')
 
       loaded_tasks.should have(1).task
       loaded_tasks.first.should =~ %r{tasks/new_one\.rake$}



Mime
View raw message