summaryrefslogtreecommitdiff
path: root/io_buffer.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2023-02-25 23:04:10 +1300
committerGitHub <noreply@github.com>2023-02-25 23:04:10 +1300
commitd0031db9b3d7c951ae786f47a6c41de8f3afb2eb (patch)
tree73a530156ebb2bc4d0f06c6538a4c2b04e6e58c2 /io_buffer.c
parentd3ee9e590caa2177abd9b1a52b30ff63aaa68c8f (diff)
downloadruby-d0031db9b3d7c951ae786f47a6c41de8f3afb2eb.tar.gz
Prefer RB_NUM2LONG for string length. (#7379)
Diffstat (limited to 'io_buffer.c')
-rw-r--r--io_buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_buffer.c b/io_buffer.c
index 513eddc954..881929cc40 100644
--- a/io_buffer.c
+++ b/io_buffer.c
@@ -423,7 +423,7 @@ rb_io_buffer_type_for(VALUE klass, VALUE string)
VALUE
rb_io_buffer_type_string(VALUE klass, VALUE length)
{
- VALUE string = rb_str_new(NULL, NUM2SIZET(length));
+ VALUE string = rb_str_new(NULL, RB_NUM2LONG(length));
struct io_buffer_for_yield_instance_arguments arguments = {
.klass = klass,