aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/json
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-02 22:32:28 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-04 11:58:41 -0300
commitd6e06ea8275cdc3f126f926ed9b5349fde374b10 (patch)
tree2883aca23c6bcb13dd2acb389948bf0bb04f9781 /activesupport/lib/active_support/json
parentc8019c0611791b2716c6bed48ef8dcb177b7869c (diff)
downloadrails-d6e06ea8275cdc3f126f926ed9b5349fde374b10.tar.gz
rails-d6e06ea8275cdc3f126f926ed9b5349fde374b10.tar.bz2
rails-d6e06ea8275cdc3f126f926ed9b5349fde374b10.zip
Remove deprecated ActiveSupport::JSON::Encoding::CircularReferenceError.
Diffstat (limited to 'activesupport/lib/active_support/json')
-rw-r--r--activesupport/lib/active_support/json/encoding.rb22
1 files changed, 0 insertions, 22 deletions
diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb
index 20833eff90..48f4967892 100644
--- a/activesupport/lib/active_support/json/encoding.rb
+++ b/activesupport/lib/active_support/json/encoding.rb
@@ -112,28 +112,6 @@ module ActiveSupport
# Sets the encoder used by Rails to encode Ruby objects into JSON strings
# in +Object#to_json+ and +ActiveSupport::JSON.encode+.
attr_accessor :json_encoder
-
- # Deprecate CircularReferenceError
- def const_missing(name)
- if name == :CircularReferenceError
- message = "The JSON encoder in Rails 4.1 no longer offers protection from circular references. " \
- "You are seeing this warning because you are rescuing from (or otherwise referencing) " \
- "ActiveSupport::Encoding::CircularReferenceError. In the future, this error will be " \
- "removed from Rails. You should remove these rescue blocks from your code and ensure " \
- "that your data structures are free of circular references so they can be properly " \
- "serialized into JSON.\n\n" \
- "For example, the following Hash contains a circular reference to itself:\n" \
- " h = {}\n" \
- " h['circular'] = h\n" \
- "In this case, calling h.to_json would not work properly."
-
- ActiveSupport::Deprecation.warn message
-
- SystemStackError
- else
- super
- end
- end
end
self.use_standard_json_time_format = true