summaryrefslogtreecommitdiff
path: root/test/json
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-02 04:36:54 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-02 04:36:54 +0000
commit7eadd51dfe2631b11cbfc1ea20a4bec4f21faa20 (patch)
tree82a1bae324cb215ee481c0fea4560e041a718efc /test/json
parente41ed50bf0b2a2f657b88b0a328331f91385d6c0 (diff)
Setup Symbol#to_json to avoid conflict.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30016 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 daa053c..be9eb49 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