mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix warning spew for 1.9
This commit is contained in:
parent
6e7b02b21a
commit
665c7ad29d
1 changed files with 5 additions and 1 deletions
|
@ -239,7 +239,11 @@ module ActionView #:nodoc:
|
|||
name = controller.class.name.gsub(/::/, '__')
|
||||
|
||||
Subclasses.class_eval do
|
||||
remove_const(name) if const_defined?(name)
|
||||
if method(:const_defined?).arity == 1
|
||||
remove_const(name) if const_defined?(name) # Ruby 1.8.x
|
||||
else
|
||||
remove_const(name) if const_defined?(name, false) # Ruby 1.9.x
|
||||
end
|
||||
const_set(name, self)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue