From 69b51262f3ec90a2ac9553d7cd34ee285ec59ad5 Mon Sep 17 00:00:00 2001 From: yugui Date: Sat, 5 Dec 2009 09:39:48 +0000 Subject: merges r25351 from trunk into ruby_1_9_1. fixes the backport task #2214. -- * parse.y (rb_intern3): check symbol table overflow. [ruby-core:26092] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index 5cf5d9bc97..725ba34ee0 100644 --- a/string.c +++ b/string.c @@ -6379,25 +6379,10 @@ VALUE rb_str_intern(VALUE s) { VALUE str = RB_GC_GUARD(s); - VALUE sym; - ID id, id2; + ID id; id = rb_intern_str(str); - sym = ID2SYM(id); - id2 = SYM2ID(sym); - if (id != id2) { - const char *name = rb_id2name(id2); - - if (name) { - rb_raise(rb_eRuntimeError, "symbol table overflow (%s given for %s)", - name, RSTRING_PTR(str)); - } - else { - rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %s)", - RSTRING_PTR(str)); - } - } - return sym; + return ID2SYM(id); } -- cgit v1.2.3