def chomp(sep = $/) "ruby\n".chomp #=> "ruby" end
Returns a new string with the trailing newline removed.
End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
This is the JSON generator implemented as a C extension. It can be configured to be used by setting
JSON
JSON.generator = JSON::Ext::Generator
with the method generator= in JSON.