diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-07-01 00:49:36 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-07-01 00:52:29 +0900 |
commit | 302f353fd9223d020e48495eaa7a03ce5d539409 (patch) | |
tree | 1eea0062c2ded83890afe4e5ec1755af506495f6 /ext | |
parent | b6f6fc6e870d00e5151647f3f14eaa16b8fe145b (diff) |
[ruby/stringio] Fix the result of `StringIO#truncate` so compatible with `File`
https://github.com/ruby/stringio/commit/16847fea32
Diffstat (limited to 'ext')
-rw-r--r-- | ext/stringio/stringio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 1b21c2e60f..9ba2cd92a1 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -1668,7 +1668,7 @@ strio_truncate(VALUE self, VALUE len) if (plen < l) { MEMZERO(RSTRING_PTR(string) + plen, char, l - plen); } - return len; + return INT2FIX(0); } /* |