From 83f2ffcf4388f08e1b15d58b66fff1dfad9e99ef Mon Sep 17 00:00:00 2001 From: Erich Menge Date: Wed, 30 May 2012 11:29:09 -0500 Subject: Deprecate ActiveSupport::JSON::Variable Reason: ActiveSupport::JSON::Variable is not used anymore internally. It was deprecated in 3-2-stable but we reverted all the deprecation for point releases. See #6536 and #6546. Conflicts: activesupport/lib/active_support/json/variable.rb --- activesupport/test/json/encoding_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activesupport/test/json') diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb index a947635f4a..7ed71f9abc 100644 --- a/activesupport/test/json/encoding_test.rb +++ b/activesupport/test/json/encoding_test.rb @@ -85,6 +85,13 @@ class TestJSONEncoding < ActiveSupport::TestCase end end + def test_json_variable + assert_deprecated do + assert_equal ActiveSupport::JSON::Variable.new('foo'), 'foo' + assert_equal ActiveSupport::JSON::Variable.new('alert("foo")'), 'alert("foo")' + end + end + def test_hash_encoding assert_equal %({\"a\":\"b\"}), ActiveSupport::JSON.encode(:a => :b) assert_equal %({\"a\":1}), ActiveSupport::JSON.encode('a' => 1) -- cgit v1.2.3