Skip to content

Commit

Permalink
Remove all as_json methods to opal-activesupport
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Nov 28, 2013
1 parent 0df6db6 commit 4668da5
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions stdlib/json.rb
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 4668da5

Please sign in to comment.