def chomp(sep = $/) "ruby\n".chomp #=> "ruby" end
Returns a new string with the trailing newline removed.
Maintenance Ruby 3.3 gets fixes, but no new features. 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.