summaryrefslogtreecommitdiff
path: root/io_buffer.c
diff options
context:
space:
mode:
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,