mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (bigdivrem): access boundary bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ba9003a0a3
commit
eeb7234919
6 changed files with 25 additions and 10 deletions
|
@ -1,3 +1,7 @@
|
|||
Fri May 11 02:00:44 2001 Ryo HAYASAKA <ryoh@jaist.ac.jp>
|
||||
|
||||
* bignum.c (bigdivrem): access boundary bug.
|
||||
|
||||
Tue May 8 17:12:43 2001 K.Kosako <kosako@sofnec.co.jp>
|
||||
|
||||
* eval.c (is_defined): core dumped during instance_eval for
|
||||
|
|
2
bignum.c
2
bignum.c
|
@ -918,7 +918,7 @@ bigdivrem(x, y, divp, modp)
|
|||
if (modp) { /* just normalize remainder */
|
||||
*modp = rb_big_clone(z);
|
||||
zds = BDIGITS(*modp);
|
||||
while (0 < ny && !zds[ny-1]) ny--;
|
||||
while (ny-- && !zds[ny]); ++ny;
|
||||
if (dd) {
|
||||
t2 = 0; i = ny;
|
||||
while(i--) {
|
||||
|
|
|
@ -543,6 +543,8 @@ if test "$with_dln_a_out" != yes; then
|
|||
rb_cv_dlopen=yes;;
|
||||
sysv4*) LDSHARED='ld -G'
|
||||
rb_cv_dlopen=yes;;
|
||||
nto-qnx*) LDSHARED="qcc -shared"
|
||||
rb_cv_dlopen=yes ;;
|
||||
esix*|uxpds*) LDSHARED="ld -G"
|
||||
rb_cv_dlopen=yes ;;
|
||||
osf*) LDSHARED="$CC -shared"
|
||||
|
|
6
dir.c
6
dir.c
|
@ -134,13 +134,13 @@ range(pat, test, flags)
|
|||
((s) == string || pathname && isdirsep(*(s))))
|
||||
static int
|
||||
fnmatch(pat, string, flags)
|
||||
char *pat;
|
||||
char *string;
|
||||
const char *pat;
|
||||
const char *string;
|
||||
int flags;
|
||||
{
|
||||
int c;
|
||||
int test;
|
||||
char *s = string;
|
||||
const char *s = string;
|
||||
int escape = !(flags & FNM_NOESCAPE);
|
||||
int pathname = flags & FNM_PATHNAME;
|
||||
int period = flags & FNM_PERIOD;
|
||||
|
|
|
@ -96,10 +96,19 @@ class CGI
|
|||
end
|
||||
|
||||
class FileStore
|
||||
def check_id(id)
|
||||
/[^0-9a-zA-Z]/ =~ id.to_s ? false : true
|
||||
end
|
||||
module_function :check_id
|
||||
|
||||
def initialize(session, option={})
|
||||
dir = option['tmpdir'] || ENV['TMP'] || '/tmp'
|
||||
prefix = option['prefix'] || ''
|
||||
path = dir+"/"+prefix+session.session_id
|
||||
id = session.session_id
|
||||
unless check_id(id)
|
||||
raise ArgumentError, "session_id `%s' is invalid" % id
|
||||
end
|
||||
path = dir+"/"+prefix+id
|
||||
path.untaint
|
||||
unless File::exist? path
|
||||
@hash = {}
|
||||
|
@ -149,9 +158,9 @@ class CGI
|
|||
class MemoryStore
|
||||
GLOBAL_HASH_TABLE = {}
|
||||
|
||||
def initialize(session, option={})
|
||||
def initialize(session, option=nil)
|
||||
@session_id = session.session_id
|
||||
GLOBAL_HASH_TABLE[@session_id] = {}
|
||||
GLOBAL_HASH_TABLE[@session_id] ||= {}
|
||||
end
|
||||
|
||||
def restore
|
||||
|
@ -167,7 +176,7 @@ class CGI
|
|||
end
|
||||
|
||||
def delete
|
||||
GLOBAL_HASH_TABLE[@session_id] = nil
|
||||
GLOBAL_HASH_TABLE.delete(@session_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#define RUBY_VERSION "1.6.4"
|
||||
#define RUBY_RELEASE_DATE "2001-05-08"
|
||||
#define RUBY_RELEASE_DATE "2001-05-11"
|
||||
#define RUBY_VERSION_CODE 164
|
||||
#define RUBY_RELEASE_CODE 20010508
|
||||
#define RUBY_RELEASE_CODE 20010511
|
||||
|
|
Loading…
Add table
Reference in a new issue