instance method
numenc
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v3.0.20Available in: v2.3.18 v3.0.20
Signature
numenc(x)
No documentation comment.
Parameters
-
xreq
Source
# File activesupport/lib/active_support/json/backends/okjson.rb, line 492
def numenc(x)
if ((x.nan? || x.infinite?) rescue false)
raise Error, "Numeric cannot be represented: #{x}"
end
"#{x}"
end
Defined in activesupport/lib/active_support/json/backends/okjson.rb line 492
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::OkJson