summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-15 09:26:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-15 09:26:15 +0000
commite5e49b3a2797249708eb3fa4754c58f718da50c9 (patch)
treee2b67a8b71cd446e24e20160fabe034ba147259c /parse.y
parent37531934e6e39c4863db87134c04efa3d3d63f61 (diff)
* parse.y (rb_intern3): check symbol table overflow before generate
next id. [ruby-core:26092] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 4005e7265f..ceaeed29a4 100644
--- a/parse.y
+++ b/parse.y
@@ -9498,7 +9498,7 @@ rb_intern3(const char *name, long len, rb_encoding *enc)
mbstr:;
}
new_id:
- if (!(global_symbols.last_id << (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT))) {
+ if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) {
if (len > 20) {
rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)",
name);