Skip to content

Commit 4668da5

Browse files
committedNov 28, 2013
Remove all as_json methods to opal-activesupport
1 parent 0df6db6 commit 4668da5

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed
 

‎stdlib/json.rb

-26
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,6 @@ class Object
103103
def to_json
104104
to_s.to_json
105105
end
106-
107-
# FIXME: remove this
108-
def as_json
109-
nil
110-
end
111106
end
112107

113108
class Array
@@ -122,15 +117,9 @@ def to_json
122117
return '[' + result.join(', ') + ']';
123118
}
124119
end
125-
126120
end
127121

128122
class Boolean
129-
# FIXME: remove this
130-
def as_json
131-
self
132-
end
133-
134123
def to_json
135124
`(self == true) ? 'true' : 'false'`
136125
end
@@ -152,33 +141,18 @@ def to_json
152141
end
153142

154143
class NilClass
155-
# FIXME: remove this
156-
def as_json
157-
self
158-
end
159-
160144
def to_json
161145
'null'
162146
end
163147
end
164148

165149
class Numeric
166-
# FIXME: remove this
167-
def as_json
168-
self
169-
end
170-
171150
def to_json
172151
`self.toString()`
173152
end
174153
end
175154

176155
class String
177-
# FIXME: remove this
178-
def as_json
179-
self
180-
end
181-
182156
alias to_json inspect
183157
end
184158

0 commit comments

Comments
 (0)
Please sign in to comment.