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, 2 insertions, 0 deletions
diff --git a/io_buffer.c b/io_buffer.c
index 45dbfd02da..bd902ed8d4 100644
--- a/io_buffer.c
+++ b/io_buffer.c
@@ -259,6 +259,8 @@ rb_io_buffer_type_allocate(VALUE self)
VALUE
rb_io_buffer_type_for(VALUE klass, VALUE string)
{
+ StringValue(string);
+
VALUE instance = rb_io_buffer_type_allocate(klass);
struct rb_io_buffer *data = NULL;