Return-Path: X-Original-To: apmail-buildr-commits-archive@www.apache.org Delivered-To: apmail-buildr-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7E305DBD5 for ; Tue, 11 Dec 2012 20:05:23 +0000 (UTC) Received: (qmail 42524 invoked by uid 500); 11 Dec 2012 20:05:23 -0000 Delivered-To: apmail-buildr-commits-archive@buildr.apache.org Received: (qmail 42500 invoked by uid 500); 11 Dec 2012 20:05:23 -0000 Mailing-List: contact commits-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@buildr.apache.org Delivered-To: mailing list commits@buildr.apache.org Received: (qmail 42492 invoked by uid 99); 11 Dec 2012 20:05:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2012 20:05:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2012 20:05:22 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 34281238890B; Tue, 11 Dec 2012 20:05:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@buildr.apache.org From: donaldp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121211200502.34281238890B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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$}