diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2023-02-25 23:04:10 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-25 23:04:10 +1300 |
commit | d0031db9b3d7c951ae786f47a6c41de8f3afb2eb (patch) | |
tree | 73a530156ebb2bc4d0f06c6538a4c2b04e6e58c2 /io_buffer.c | |
parent | d3ee9e590caa2177abd9b1a52b30ff63aaa68c8f (diff) |
Prefer RB_NUM2LONG for string length. (#7379)
Notes
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
Diffstat (limited to 'io_buffer.c')
-rw-r--r-- | io_buffer.c | 2 |
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, |