ruby-changes:20895
From: drbrain <ko1@a...>
Date: Fri, 12 Aug 2011 12:33:27 +0900 (JST)
Subject: [ruby-changes:20895] drbrain:r32944 (ruby_1_9_3): * lib/rake: Update to Rake 0.9.2.2. Prevent pollution of toplevel
drbrain 2011-08-12 12:29:02 +0900 (Fri, 12 Aug 2011) New Revision: 32944 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32944 Log: * lib/rake: Update to Rake 0.9.2.2. Prevent pollution of toplevel namespace by Commands. Remove unused variable and debugging statement in tests. Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/lib/rake/application.rb branches/ruby_1_9_3/lib/rake/dsl_definition.rb branches/ruby_1_9_3/lib/rake/version.rb branches/ruby_1_9_3/test/rake/helper.rb branches/ruby_1_9_3/test/rake/test_rake_dsl.rb branches/ruby_1_9_3/test/rake/test_rake_functional.rb Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 32943) +++ ruby_1_9_3/ChangeLog (revision 32944) @@ -1,3 +1,9 @@ +Fri Aug 12 12:28:17 2011 Eric Hodel <drbrain@s...> + + * lib/rake: Update to Rake 0.9.2.2. Prevent pollution of toplevel + namespace by Commands. Remove unused variable and debugging + statement in tests. + Fri Aug 12 09:00:24 2011 Eric Hodel <drbrain@s...> * backport r32941 from trunk Index: ruby_1_9_3/lib/rake/dsl_definition.rb =================================================================== --- ruby_1_9_3/lib/rake/dsl_definition.rb (revision 32943) +++ ruby_1_9_3/lib/rake/dsl_definition.rb (revision 32944) @@ -144,10 +144,12 @@ Rake.application.add_import(fn) end end + end + DeprecatedCommands = Object.new.extend(DSL) + module DeprecatedObjectDSL # :nodoc: - Commands = Object.new.extend DSL DSL.private_instance_methods(false).each do |name| line = __LINE__+1 class_eval %{ @@ -160,8 +162,8 @@ end $stderr.puts "WARNING: DSL method \#{self.class}##{name} called at \#{caller.first}" end - Rake::DeprecatedObjectDSL::Commands.send(:#{name}, *args, &block) - end + Rake::DeprecatedCommands.send(:#{name}, *args, &block) + end private :#{name} }, __FILE__, line end Index: ruby_1_9_3/lib/rake/application.rb =================================================================== --- ruby_1_9_3/lib/rake/application.rb (revision 32943) +++ ruby_1_9_3/lib/rake/application.rb (revision 32944) @@ -348,6 +348,7 @@ ], ['--rakelibdir', '--rakelib', '-R RAKELIBDIR', "Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')", + # HACK Use File::PATH_SEPARATOR lambda { |value| options.rakelib = value.split(':') } ], ['--require', '-r MODULE', "Require MODULE before executing rakefile.", Index: ruby_1_9_3/lib/rake/version.rb =================================================================== --- ruby_1_9_3/lib/rake/version.rb (revision 32943) +++ ruby_1_9_3/lib/rake/version.rb (revision 32944) @@ -1,5 +1,5 @@ module Rake - VERSION = '0.9.2.1' + VERSION = '0.9.2.2' module Version # :nodoc: all MAJOR, MINOR, BUILD = VERSION.split '.' Index: ruby_1_9_3/test/rake/test_rake_functional.rb =================================================================== --- ruby_1_9_3/test/rake/test_rake_functional.rb (revision 32943) +++ ruby_1_9_3/test/rake/test_rake_functional.rb (revision 32944) @@ -436,7 +436,7 @@ def run_ruby(option_list) puts "COMMAND: [#{RUBY} #{option_list.join ' '}]" if @verbose - inn, out, err, wait = Open3.popen3(Gem.ruby, *option_list) + inn, out, err = Open3.popen3(Gem.ruby, *option_list) inn.close @out = out.read Index: ruby_1_9_3/test/rake/helper.rb =================================================================== --- ruby_1_9_3/test/rake/helper.rb (revision 32943) +++ ruby_1_9_3/test/rake/helper.rb (revision 32944) @@ -282,7 +282,6 @@ task :prep => :clean do mkdir_p 'src' N.times do |n| - puts "DBG: Touching src/foo#{n}" touch "src/foo#{n}" end end Index: ruby_1_9_3/test/rake/test_rake_dsl.rb =================================================================== --- ruby_1_9_3/test/rake/test_rake_dsl.rb (revision 32943) +++ ruby_1_9_3/test/rake/test_rake_dsl.rb (revision 32944) @@ -56,6 +56,10 @@ assert_match(/test_rake_dsl\.rb:\d+/, err) end + def test_no_commands_constant + assert ! defined?(Commands), "should not define Commands" + end + def test_deprecated_object_dsl_with_suppressed_warnings Rake.application.options.ignore_deprecate = true out, err = capture_io do -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/