From 617e7ee05c400cb6370b5fa8181552d0f512c777 Mon Sep 17 00:00:00 2001 From: nagachika Date: Tue, 10 Mar 2020 11:41:32 +0000 Subject: r66845 introduced mixed declarations and code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index 94e425a277..3f7dbde50d 100644 --- a/io.c +++ b/io.c @@ -4261,6 +4261,8 @@ VALUE rb_io_ungetbyte(VALUE io, VALUE b) { rb_io_t *fptr; + VALUE v; + unsigned char c; GetOpenFile(io, fptr); rb_io_check_byte_readable(fptr); @@ -4269,8 +4271,8 @@ rb_io_ungetbyte(VALUE io, VALUE b) return Qnil; case T_FIXNUM: case T_BIGNUM: ; - VALUE v = rb_int_modulo(b, INT2FIX(256)); - unsigned char c = NUM2INT(v) & 0xFF; + v = rb_int_modulo(b, INT2FIX(256)); + c = NUM2INT(v) & 0xFF; b = rb_str_new((const char *)&c, 1); break; default: -- cgit v1.2.3