summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-07-01 00:49:36 +0900
committergit <svn-admin@ruby-lang.org>2022-07-01 00:52:29 +0900
commit302f353fd9223d020e48495eaa7a03ce5d539409 (patch)
tree1eea0062c2ded83890afe4e5ec1755af506495f6 /ext
parentb6f6fc6e870d00e5151647f3f14eaa16b8fe145b (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.c2
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);
}
/*