Skip to content

Commit

Permalink
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions stdlib/json.rb
Original file line number Diff line number Diff line change
@@ -103,11 +103,6 @@ class Object
def to_json
to_s.to_json
end

# FIXME: remove this
def as_json
nil
end
end

class Array
@@ -122,15 +117,9 @@ def to_json
return '[' + result.join(', ') + ']';
}
end

end

class Boolean
# FIXME: remove this
def as_json
self
end

def to_json
`(self == true) ? 'true' : 'false'`
end
@@ -152,33 +141,18 @@ def to_json
end

class NilClass
# FIXME: remove this
def as_json
self
end

def to_json
'null'
end
end

class Numeric
# FIXME: remove this
def as_json
self
end

def to_json
`self.toString()`
end
end

class String
# FIXME: remove this
def as_json
self
end

alias to_json inspect
end

0 comments on commit 4668da5

Please sign in to comment.