From 163ab0a4da61699c84bba46cd9d7bdd6c67ba1e5 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 23 Mar 2012 04:19:24 +0000 Subject: * bignum.c (rb_str_to_inum): must be ASCII compatible encoding as well as String#hex and String#oct. [ruby-core:43566][Bug #6192] * string.c (rb_must_asciicompat): check if ASCII compatible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bignum.c | 1 + 1 file changed, 1 insertion(+) (limited to 'bignum.c') diff --git a/bignum.c b/bignum.c index fae29652b6..678a65bba7 100644 --- a/bignum.c +++ b/bignum.c @@ -775,6 +775,7 @@ rb_str_to_inum(VALUE str, int base, int badcheck) VALUE ret; StringValue(str); + rb_must_asciicompat(str); if (badcheck) { s = StringValueCStr(str); } -- cgit v1.2.3