<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,8 @@
+== (unreleased)
+
+* Ruby 1.9 compatibility [Jamis Buck]
+
+
 == 2.5.0 / August 28, 2008
 
 * Allow :gateway to be set to an array, in which case a chain of tunnels is created [Kerry Buckley]</diff>
      <filename>CHANGELOG.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -67,7 +67,7 @@ module Capistrano
         raise ArgumentError, &quot;expected a block&quot; unless block_given?
 
         namespace_already_defined = namespaces.key?(name)
-        if all_methods.include?(name.to_s) &amp;&amp; !namespace_already_defined
+        if all_methods.any? { |m| m.to_sym == name } &amp;&amp; !namespace_already_defined
           thing = tasks.key?(name) ? &quot;task&quot; : &quot;method&quot;
           raise ArgumentError, &quot;defining a namespace named `#{name}' would shadow an existing #{thing} with that name&quot;
         end
@@ -92,7 +92,7 @@ module Capistrano
         raise ArgumentError, &quot;expected a block&quot; unless block_given?
 
         task_already_defined = tasks.key?(name)
-        if all_methods.include?(name.to_s) &amp;&amp; !task_already_defined
+        if all_methods.any? { |m| m.to_sym == name } &amp;&amp; !task_already_defined
           thing = namespaces.key?(name) ? &quot;namespace&quot; : &quot;method&quot;
           raise ArgumentError, &quot;defining a task named `#{name}' would shadow an existing #{thing} with that name&quot;
         end</diff>
      <filename>lib/capistrano/configuration/namespaces.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@ module Capistrano
       Capistrano::Configuration.protected_instance_methods +
       Capistrano::Configuration.private_instance_methods
 
-    if methods.include?(name.to_s)
+    if methods.any? { |m| m.to_sym == name }
       raise Capistrano::Error, &quot;registering a plugin named `#{name}' would shadow a method on Capistrano::Configuration with the same name&quot;
     end
 </diff>
      <filename>lib/capistrano/extensions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,7 @@ module Capistrano
     def log(level, message, line_prefix=nil)
       if level &lt;= self.level
         indent = &quot;%*s&quot; % [MAX_LEVEL, &quot;*&quot; * (MAX_LEVEL - level)]
-        message.each do |line|
+        (RUBY_VERSION &gt;= &quot;1.9&quot; ? message.lines : message).each do |line|
           if line_prefix
             device.puts &quot;#{indent} [#{line_prefix}] #{line.strip}\n&quot;
           else</diff>
      <filename>lib/capistrano/logger.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,7 @@ module Capistrano
       def initialize(configuration)
         @configuration = configuration
         @success = true
+        @hosts = nil
       end
 
       def directory(path, options={})
@@ -83,7 +84,7 @@ module Capistrano
 
       def message
         s = @message.dup
-        s &lt;&lt; &quot; (#{@hosts})&quot; if @hosts &amp;&amp; @hosts.any?
+        s &lt;&lt; &quot; (#{@hosts})&quot; if @hosts
         s
       end
 </diff>
      <filename>lib/capistrano/recipes/deploy/remote_dependency.rb</filename>
    </modified>
    <modified>
      <diff>@@ -123,9 +123,9 @@ module Capistrano
           def cvs_revision(rev)
             revision = &quot;&quot;
             revision &lt;&lt; case revision_type(rev)
-              when :date:
+              when :date
                 &quot;-D \&quot;#{rev}\&quot;&quot; if revision_type(rev) == :date
-              when :revision:
+              when :revision
                 &quot;-r #{rev}&quot;
               else
                 &quot;-r #{head}&quot;</diff>
      <filename>lib/capistrano/recipes/deploy/scm/cvs.rb</filename>
    </modified>
    <modified>
      <diff>@@ -119,9 +119,9 @@ module Capistrano
         # verbosity configuration grokking :)
         def verbose
           case variable(:scm_verbose)
-            when nil:   nil
-            when false: &quot;--quiet&quot;
-            else        &quot;--verbose&quot;
+            when nil   then nil
+            when false then &quot;--quiet&quot;
+            else            &quot;--verbose&quot;
           end
         end
         </diff>
      <filename>lib/capistrano/recipes/deploy/scm/mercurial.rb</filename>
    </modified>
    <modified>
      <diff>@@ -261,7 +261,8 @@ class CLIOptionsTest &lt; Test::Unit::TestCase
     assert_equal &quot;world&quot;, ENV[&quot;HELLO&quot;]
     assert_equal &quot;value&quot;, ENV[&quot;ANOTHER&quot;]
   ensure
-    ENV[&quot;HELLO&quot;] = ENV[&quot;ANOTHER&quot;] = nil
+    ENV.delete(&quot;HELLO&quot;)
+    ENV.delete(&quot;ANOTHER&quot;)
   end
 
   def test_remaining_args_should_be_added_to_actions_list
@@ -269,7 +270,7 @@ class CLIOptionsTest &lt; Test::Unit::TestCase
     @cli.parse_options!
     assert_equal %w(something else), @cli.args
   ensure
-    ENV[&quot;HELLO&quot;] = nil
+    ENV.delete(&quot;HELLO&quot;)
   end
 
   def test_search_for_default_recipe_file_should_look_for_Capfile</diff>
      <filename>test/cli/options_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,7 +23,7 @@ class ConfigurationLoadingTest &lt; Test::Unit::TestCase
 
   def teardown
     MockConfig.instance = nil
-    $&quot;.delete &quot;#{File.dirname(__FILE__)}/../fixtures/custom.rb&quot;
+    $LOADED_FEATURES.delete_if { |a| a =~ /fixtures\/custom\.rb$/ }
   end
 
   def test_initialize_should_init_collections</diff>
      <filename>test/configuration/loading_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -108,9 +108,9 @@ class ConfigurationNamespacesDSLTest &lt; Test::Unit::TestCase
   end
 
   def test_defining_ask_should_add_task_as_method
-    assert !@config.methods.include?(&quot;original&quot;)
+    assert !@config.methods.any? { |m| m.to_sym == :original }
     @config.task(:original) { puts &quot;foo&quot; }
-    assert @config.methods.include?(&quot;original&quot;)
+    assert @config.methods.any? { |m| m.to_sym == :original }
   end
 
   def test_calling_defined_task_should_delegate_to_execute_task</diff>
      <filename>test/configuration/namespace_dsl_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -59,7 +59,7 @@ class ConfigurationServersTest &lt; Test::Unit::TestCase
     task = new_task(:testing)
     assert_equal %w(app1 app2 app3 file).sort, @config.find_servers_for_task(task).map { |s| s.host }.sort
   ensure
-    ENV['ROLES'] = nil
+    ENV.delete('ROLES')
   end
 
   def test_task_with_hosts_as_environment_variable_should_apply_only_to_those_hosts
@@ -67,7 +67,7 @@ class ConfigurationServersTest &lt; Test::Unit::TestCase
     task = new_task(:testing)
     assert_equal %w(foo bar).sort, @config.find_servers_for_task(task).map { |s| s.host }.sort
   ensure
-    ENV['HOSTS'] = nil
+    ENV.delete('HOSTS')
   end
 
   def test_task_with_hosts_as_environment_variable_should_not_inspect_roles_at_all
@@ -75,7 +75,7 @@ class ConfigurationServersTest &lt; Test::Unit::TestCase
     task = new_task(:testing, @config, :roles =&gt; :bogus)
     assert_equal %w(foo bar).sort, @config.find_servers_for_task(task).map { |s| s.host }.sort
   ensure
-    ENV['HOSTS'] = nil
+    ENV.delete('HOSTS')
   end
 
   def test_task_with_only_should_apply_only_to_matching_tasks</diff>
      <filename>test/configuration/servers_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ require 'capistrano/role'
 
 class RoleTest &lt; Test::Unit::TestCase
   def test_clearing_a_populated_role_should_yield_no_servers
-    role = Capistrano::Role.new(&quot;app1.capistrano.test&quot;, lambda { &quot;app2.capistrano.test&quot; })
+    role = Capistrano::Role.new(&quot;app1.capistrano.test&quot;, lambda { |o| &quot;app2.capistrano.test&quot; })
     assert_equal 2, role.servers.size
     role.clear
     assert role.servers.empty?</diff>
      <filename>test/role_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>63aaed463cf3d4e8b1b426e126eea6b1f199435d</id>
    </parent>
  </parents>
  <author>
    <name>Jamis Buck</name>
    <email>jamis@37signals.com</email>
  </author>
  <url>http://github.com/jamis/capistrano/commit/d558838408f425a029b4d2fd158d362dc60f9fd3</url>
  <id>d558838408f425a029b4d2fd158d362dc60f9fd3</id>
  <committed-date>2008-09-06T15:11:16-07:00</committed-date>
  <authored-date>2008-09-06T15:11:16-07:00</authored-date>
  <message>tests all pass under Ruby 1.9</message>
  <tree>5a908289a252c828dec0e5070811c2ac367c3330</tree>
  <committer>
    <name>Jamis Buck</name>
    <email>jamis@37signals.com</email>
  </committer>
</commit>
