summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-05 09:39:48 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-05 09:39:48 +0000
commit590a8a14d2399025c1624429246c287795ea1bec (patch)
treed5dbd1722ac67757360b090c5c2890d99b0fb865 /string.c
parent3cb172efc685164d464eea7b681ede8cc595cab3 (diff)
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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@26011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/string.c b/string.c
index 5cf5d9bc9..725ba34ee 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);
}