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 075a9bfb78..63f5bd2c24 100644
--- a/io_buffer.c
+++ b/io_buffer.c
@@ -1125,7 +1125,7 @@ io_buffer_get_string(int argc, VALUE *argv, VALUE self)
size_t offset = 0;
size_t length = data->size;
- rb_encoding *encoding = NULL;
+ rb_encoding *encoding = rb_ascii8bit_encoding();
if (argc >= 1) {
offset = NUM2SIZET(argv[0]);