summaryrefslogtreecommitdiff
path: root/test/json
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-04 08:08:31 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-04 08:08:31 +0000
commit2a067c6cec648981fd4e9b5f466bc2a11f29c79c (patch)
treec3a96b2727def5c7a385c47f0e870f31e07f1ff8 /test/json
parent89435793bc14e7434887b8559b993259837e161c (diff)
Setup Symbol#to_json to avoid conflict.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/json')
-rwxr-xr-xtest/json/test_json_rails.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/json/test_json_rails.rb b/test/json/test_json_rails.rb
index 6fd201b..2990364 100755
--- a/test/json/test_json_rails.rb
+++ b/test/json/test_json_rails.rb
@@ -13,6 +13,14 @@ require 'date'
class TC_JSONRails < Test::Unit::TestCase
include JSON
+ def setup
+ Symbol.class_eval do
+ def to_json(*a)
+ to_s.to_json(*a)
+ end
+ end
+ end
+
class A
def initialize(a)
@a = a