Skip to content

Commit

Permalink
Prefer RB_NUM2LONG for string length. (#7379)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Feb 25, 2023
1 parent d3ee9e5 commit d0031db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io_buffer.c
Expand Up @@ -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,
Expand Down

0 comments on commit d0031db

Please sign in to comment.