fn chomp(vm: &mut VM, mut self_val: Value, args: &Args2) -> VMResult {
    args.check_args_range(0, 1)?;
    let rs = if args.len() == 0 {
        "\n".to_string()
    } else {
        let mut arg = vm[0];
        if arg.is_nil() {
            return Ok(self_val);
        }
        arg.expect_string("1st arg")?.to_owned()
    };
    let self_ = self_val.expect_string("Receiver")?;
    let res = self_.trim_end_matches(&rs).to_string();
    Ok(Value::string(res))
}
String#chomp
https://docs.ruby-lang.org/ja/latest/method/String/i/chomp.html
ruruby/src/builtin/string.rs