aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-10-19 18:46:59 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-10-19 18:46:59 -0700
commit418ce487c4a41df2c3a3c1485107f32eb94fa493 (patch)
tree32cb67d824b2807d0a506ad3ccfdf8fb2bac0ecc /actionpack/lib
parentacb1624f2732a4fcfa006c3e8694020635baba6b (diff)
downloadrails-418ce487c4a41df2c3a3c1485107f32eb94fa493.tar.gz
rails-418ce487c4a41df2c3a3c1485107f32eb94fa493.tar.bz2
rails-418ce487c4a41df2c3a3c1485107f32eb94fa493.zip
Only undef to_json if it's defined
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/metal/responder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/responder.rb b/actionpack/lib/action_controller/metal/responder.rb
index a16ed97131..c6e847ba0f 100644
--- a/actionpack/lib/action_controller/metal/responder.rb
+++ b/actionpack/lib/action_controller/metal/responder.rb
@@ -95,7 +95,7 @@ module ActionController #:nodoc:
delegate :get?, :post?, :put?, :delete?, :to => :request
# Undefine :to_json since it's defined on Object
- undef_method :to_json
+ undef_method(:to_json) if method_defined?(:to_json)
# Initializes a new responder an invoke the proper format. If the format is
# not defined, call to_format.