summaryrefslogtreecommitdiffstats
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
commit99664f9ec38d8ec55e0199ce54f587aebb030b96 (patch)
treee2b67a8b71cd446e24e20160fabe034ba147259c
parent5d30d35036f6bfd3588e0e71f59b42baff3e61ed (diff)
downloadruby-99664f9ec38d8ec55e0199ce54f587aebb030b96.tar.gz
ruby-99664f9ec38d8ec55e0199ce54f587aebb030b96.tar.xz
ruby-99664f9ec38d8ec55e0199ce54f587aebb030b96.zip
* parse.y (rb_intern3): check symbol table overflow before generate
next id. [ruby-core:26092] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--parse.y2
2 files changed, 4 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 07ec4aad3..88d191876 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
-Thu Oct 15 16:57:38 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Oct 15 18:26:12 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (rb_intern3): check symbol table overflow.
- [ruby-core:26092]
+ * parse.y (rb_intern3): check symbol table overflow before generate
+ next id. [ruby-core:26092]
Thu Oct 15 15:14:15 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
diff --git a/parse.y b/parse.y
index 4005e7265..ceaeed29a 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);