mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Setup Symbol#to_json to avoid conflict.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
89435793bc
commit
2a067c6cec
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue