From 7eadd51dfe2631b11cbfc1ea20a4bec4f21faa20 Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 2 Dec 2010 04:36:54 +0000 Subject: Setup Symbol#to_json to avoid conflict. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/json/test_json_rails.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/json') diff --git a/test/json/test_json_rails.rb b/test/json/test_json_rails.rb index daa053c82d..be9eb49f06 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 -- cgit v1.2.3