summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-12 09:30:42 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-12 09:30:42 +0000
commitb487f7881fd220a13313ebeb3968f17d45bb2b23 (patch)
tree52f453388c11a8e55f98d49ba375fa1498d55925 /io.c
parent1e22306569e43251f946145ab49662ee6fe76151 (diff)
* io.c (rb_io_ungetc): always see Bignum. On 32bit valid value
may be a Bignum. On 64bit for errors. [ruby-dev:42366] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/io.c b/io.c
index cb1997a486..21d6d12c9c 100644
--- a/io.c
+++ b/io.c
@@ -3231,11 +3231,9 @@ rb_io_ungetc(VALUE io, VALUE c)
if (FIXNUM_P(c)) {
c = rb_enc_uint_chr(FIX2UINT(c), io_read_encoding(fptr));
}
-#if SIZEOF_LONG > SIZEOF_INT
else if (TYPE(c) == T_BIGNUM) {
c = rb_enc_uint_chr(NUM2UINT(c), io_read_encoding(fptr));
}
-#endif
else {
SafeStringValue(c);
}