ruby-changes:7891
From: mame <ko1@a...>
Date: Thu, 18 Sep 2008 19:44:26 +0900 (JST)
Subject: [ruby-changes:7891] Ruby:r19412 (trunk): * st.c (new_size): raise RuntimeError when st_table is too big.
mame 2008-09-18 19:44:09 +0900 (Thu, 18 Sep 2008) New Revision: 19412 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19412 Log: * st.c (new_size): raise RuntimeError when st_table is too big. Modified files: trunk/ChangeLog trunk/st.c Index: ChangeLog =================================================================== --- ChangeLog (revision 19411) +++ ChangeLog (revision 19412) @@ -1,3 +1,7 @@ +Thu Sep 18 19:43:04 2008 Yusuke Endoh <mame@t...> + + * st.c (new_size): raise RuntimeError when st_table is too big. + Thu Sep 18 18:23:23 2008 Tanaka Akira <akr@f...> * transcode.c (enc_arg): must take pointer argument to avoid GC Index: st.c =================================================================== --- st.c (revision 19411) +++ st.c (revision 19412) @@ -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 @@ 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 } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/