class Float

work around floating point numbers not being printed precisely enough

Public Instance Methods

orig_t_s()

note: can not override to_json (this is not done recursively, e.g. in a Hash, before ruby 1.9)

Alias for: to_s
to_s() click to toggle source
# File lib/scalaroid.rb, line 51
def to_s
  if not finite?
    orig_to_json(*a)
  else
    sprintf("%#.17g", self)
  end
end
Also aliased as: orig_t_s