diff options
author | Carl Lerche <carllerche@mac.com> | 2009-10-08 10:58:04 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2009-10-08 10:58:04 -0700 |
commit | 665c7ad29d5614b8f5535d317f1dd2803ddcaa7d (patch) | |
tree | a3ccc9fff3c07a5569fa1ef33267c1f3cf679ee6 /actionpack/lib/action_view/base.rb | |
parent | 6e7b02b21a65bcf86dbd61d37dcf682e4153bd99 (diff) | |
download | rails-665c7ad29d5614b8f5535d317f1dd2803ddcaa7d.tar.gz rails-665c7ad29d5614b8f5535d317f1dd2803ddcaa7d.tar.bz2 rails-665c7ad29d5614b8f5535d317f1dd2803ddcaa7d.zip |
Fix warning spew for 1.9
Diffstat (limited to 'actionpack/lib/action_view/base.rb')
-rw-r--r-- | actionpack/lib/action_view/base.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 5a4e1bee43..82b419d846 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -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 |