public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Ruby 1.9 compat: remove instance variables and global variables from block 
parameters

[#1000 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
amatsuda (author)
Tue Sep 09 00:26:22 -0700 2008
jeremy (committer)
Tue Sep 09 10:35:53 -0700 2008
commit  5f7c42413b099f8811c45a27202cce5dc9e7d285
tree    1e1cd84dea9c819646de928e1191b4b1e193b5ba
parent  8e68ec4dcceb606853a50d41076c7d5e118089b7
...
461
462
463
464
 
465
466
 
467
468
 
469
470
471
...
552
553
554
555
 
556
557
 
558
559
560
 
561
562
563
...
598
599
600
601
 
602
603
604
...
689
690
691
692
 
693
694
695
...
461
462
463
 
464
465
 
466
467
 
468
469
470
471
...
552
553
554
 
555
556
 
557
558
559
 
560
561
562
563
...
598
599
600
 
601
602
603
604
...
689
690
691
 
692
693
694
695
0
@@ -461,11 +461,11 @@ module Commands
0
         
0
         o.on("-r", "--root=DIR", String,
0
              "Set an explicit rails app directory.",
0
-             "Default: #{@rails_root}") { |@rails_root| self.environment = RailsEnvironment.new(@rails_root) }
0
+             "Default: #{@rails_root}") { |rails_root| @rails_root = rails_root; self.environment = RailsEnvironment.new(@rails_root) }
0
         o.on("-s", "--source=URL1,URL2", Array,
0
-             "Use the specified plugin repositories instead of the defaults.") { |@sources|}
0
+             "Use the specified plugin repositories instead of the defaults.") { |sources| @sources = sources}
0
         
0
-        o.on("-v", "--verbose", "Turn on verbose output.") { |$verbose| }
0
+        o.on("-v", "--verbose", "Turn on verbose output.") { |verbose| $verbose = verbose }
0
         o.on("-h", "--help", "Show this help message.") { puts o; exit }
0
         
0
         o.separator ""
0
@@ -552,12 +552,12 @@ module Commands
0
         o.separator   "Options:"
0
         o.separator   ""
0
         o.on(         "-s", "--source=URL1,URL2", Array,
0
-                      "Use the specified plugin repositories.") {|@sources|}
0
+                      "Use the specified plugin repositories.") {|sources| @sources = sources}
0
         o.on(         "--local", 
0
-                      "List locally installed plugins.") {|@local| @remote = false}
0
+                      "List locally installed plugins.") {|local| @local, @remote = local, false}
0
         o.on(         "--remote",
0
                       "List remotely available plugins. This is the default behavior",
0
-                      "unless --local is provided.") {|@remote|}
0
+                      "unless --local is provided.") {|remote| @remote = remote}
0
       end
0
     end
0
     
0
@@ -598,7 +598,7 @@ module Commands
0
         o.separator   "Options:"
0
         o.separator   ""
0
         o.on(         "-c", "--check", 
0
-                      "Report status of repository.") { |@sources|}
0
+                      "Report status of repository.") { |sources| @sources = sources}
0
       end
0
     end
0
     
0
@@ -689,7 +689,7 @@ module Commands
0
         o.separator   "Options:"
0
         o.separator   ""
0
         o.on(         "-l", "--list", 
0
-                      "List but don't prompt or add discovered repositories.") { |@list| @prompt = !@list }
0
+                      "List but don't prompt or add discovered repositories.") { |list| @list, @prompt = list, !@list }
0
         o.on(         "-n", "--no-prompt", 
0
                       "Add all new repositories without prompting.") { |v| @prompt = !v }
0
       end

Comments