GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of rails/rails
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/ddollar/rails.git
Fixed problems with dependency caching and controller hierarchies on Ruby 
1.8.2 in development mode #351

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@317 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
dhh (author)
Sun Jan 02 10:32:56 -0800 2005
commit  375568b7cb476285a9f8ea2c748d4987a477a119
tree    7fe592d6b1ff4c4e4a5a4df3bb6f30246a679e83
parent  569f2ea85bbe7edd96e81d883d1da6f22d203a87
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *SVN*
0
 
0
+* Fixed problems with dependency caching and controller hierarchies on Ruby 1.8.2 in development mode #351
0
+
0
 * Added automated rewriting of the shebang lines on installs through the gem rails command #379 [Manfred Stienstra]
0
 
0
 * Fixed that generated action_mailers doesnt need to require the action_mailer since thats already done in the environment #382 [Lucas Carlson]
...
233
234
235
236
 
237
238
239
...
233
234
235
 
236
237
238
239
0
@@ -233,7 +233,7 @@ spec = Gem::Specification.new do |s|
0
     on top of either MySQL, PostgreSQL, or SQLite with eRuby-based templates.
0
   EOF
0
 
0
- s.add_dependency('rake', '>= 0.4.11')
0
+ s.add_dependency('rake', '>= 0.4.14')
0
   s.add_dependency('activerecord', '>= 1.3.0')
0
   s.add_dependency('actionpack', '>= 1.1.0')
0
   s.add_dependency('actionmailer', '>= 0.5.0')
...
41
42
43
44
45
 
46
47
 
48
49
50
...
74
75
76
 
 
 
 
 
 
 
77
78
...
41
42
43
 
 
44
45
 
46
47
48
49
...
73
74
75
76
77
78
79
80
81
82
83
84
0
@@ -41,10 +41,9 @@ class Dispatcher
0
       ActionController::Base.process_with_exception(request, response, exception).out
0
     ensure
0
       if Dependencies.mechanism == :load
0
- Object.send(:remove_const, "ApplicationController") if Object.const_defined?(:ApplicationController)
0
- Object.send(:remove_const, controller_class_name(controller_name)) if Object.const_defined?(controller_class_name(controller_name))
0
+ remove_class_hierarchy(controller_class(controller_name), ActionController::Base)
0
         ActiveRecord::Base.reset_column_information_and_inheritable_attributes_for_all_subclasses
0
- Dependencies.reload
0
+ Dependencies.reload rescue nil # Ignore out of order reloading errors for Controllers
0
       end
0
       
0
       Breakpoint.deactivate_drb if defined?(BREAKPOINT_SERVER_PORT)
0
@@ -74,4 +73,11 @@ class Dispatcher
0
   def self.module_name(parameters)
0
     parameters["module"].gsub(/[^_a-zA-Z0-9]/, "").untaint if parameters["module"]
0
   end
0
+
0
+ def self.remove_class_hierarchy(klass, until_superclass)
0
+ while klass
0
+ Object.send(:remove_const, "#{klass}".intern)
0
+ klass = (klass.superclass unless until_superclass == klass.superclass)
0
+ end
0
+ end
0
 end
0
\ No newline at end of file

Comments

    No one has commented yet.