diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-04 08:08:31 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-04 08:08:31 +0000 |
commit | 2a067c6cec648981fd4e9b5f466bc2a11f29c79c (patch) | |
tree | c3a96b2727def5c7a385c47f0e870f31e07f1ff8 /test | |
parent | 89435793bc14e7434887b8559b993259837e161c (diff) | |
download | ruby-2a067c6cec648981fd4e9b5f466bc2a11f29c79c.tar.gz |
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')
-rwxr-xr-x | test/json/test_json_rails.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/json/test_json_rails.rb b/test/json/test_json_rails.rb index 6fd201bc49..29903642c3 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 |