summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-18 10:44:09 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-18 10:44:09 +0000
commitb11b2b498c741e08e11e8e51cf5c86dea00ff103 (patch)
tree1a2ac916e44e563d5e6f62cddf33e6b3b52dfd7e /st.c
parent6b050e719b116cdef93c1330f464858b8c8c1b37 (diff)
* st.c (new_size): raise RuntimeError when st_table is too big.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.c')
-rw-r--r--st.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/st.c b/st.c
index a51d7cf..54e1072 100644
--- a/st.c
+++ b/st.c
@@ -6,9 +6,7 @@
#include "regint.h"
#include "st.h"
#else
-#include "ruby/config.h"
-#include "ruby/defines.h"
-#include "ruby/st.h"
+#include "ruby/ruby.h"
#endif
#include <stdio.h>
@@ -135,6 +133,9 @@ new_size(int size)
if (newsize > size) return primes[i];
}
/* Ran out of polynomials */
+#ifndef NOT_RUBY
+ rb_raise(rb_eRuntimeError, "st_table too big");
+#endif
return -1; /* should raise exception */
#endif
}