Skip to content

Commit

Permalink
This commit was manufactured by cvs2svn to create tag 'v1_4_3'.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.ruby-lang.org/repos/ruby/tags/v1_4_3@582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
(no author) committed Dec 7, 1999
1 parent 49afb7c commit 0dde9ed
Show file tree
Hide file tree
Showing 65 changed files with 3,418 additions and 718 deletions.
196 changes: 196 additions & 0 deletions ChangeLog
@@ -1,3 +1,195 @@
Mon Dec 6 15:55:30 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>

* numeric.c (fix_rshift): Fix -1 >> 32 returned 0. (-1 is true)

* numeric.c (fix_rshift): Fix 1 >> -1 returned 0. (2 is true)

Mon Dec 6 11:47:23 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* sprintf.c (rb_f_sprintf): formatted string must be tainted if
any of parameters is tainted.

* file.c (rb_file_s_expand_path): expanded file path need not to
be tainted always.

Sat Dec 4 01:40:22 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* bignum.c (rb_big_rand): should not use rand/random where drand48
may be available. RANDOM_NUMBER should be provided from outside.

Fri Dec 3 09:54:59 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* eval.c (rb_f_require): should check require 'feature.o' too.

Thu Dec 2 11:58:15 1999 Koji Arai <JCA02266@nifty.ne.jp>

* eval.c (rb_thread_loading): should maintain loading_tbl.

Thu Dec 2 10:21:43 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* eval.c (rb_thread_loading_done): wrong parameter to st_delete().

Wed Dec 1 09:47:33 1999 Kazunori NISHI <kazunori@swlab.csce.kyushu-u.ac.jp>

* string.c (rb_str_split_method): should increment end too.

Tue Nov 30 01:46:18 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* re.c (rb_reg_source): generated source string must be tainted if
regex is tainted.

* file.c (rb_file_s_basename): basename should not be tainted
unless the original path is tainted.

* file.c (rb_file_s_dirname): ditto.

Mon Nov 29 15:28:52 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* variable.c (rb_path2class): evaluated value from path should be
module or class.

Fri Nov 26 18:12:49 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* eval.c (rb_exec_end_proc): should remove only end_procs defined
within load wrapper.

* eval.c (rb_load): save and restore ruby_wrapper around loading.

* eval.c (rb_mark_end_proc): mark end procs registered by END{} or
at_exit{}.

* eval.c (rb_set_end_proc): should not call rb_global_variable()
on heap address; it crashed mod_ruby.

Fri Nov 26 18:12:49 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* enum.c (enum_grep): does not return nil.

* eval.c (rb_mark_end_proc): mark end procs registered by END{} or
at_exit{}.

* eval.c (rb_set_end_proc): should not call rb_global_variable()
on heap address; it crashed mod_ruby.

Thu Nov 18 16:18:27 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* lib/pstore.rb: mutual lock by flock(2).

Thu Nov 18 11:44:13 1999 Masahiro Tomita <tommy@tmtm.org>

* io.c (read_all): should check bytes too.

Mon Nov 15 16:50:34 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* enum.c (enum_grep): grep with block returns collection of
evaluated values of block over matched elements.

Mon Nov 15 04:50:33 1999 Koji Arai <JCA02266@nifty.ne.jp>

* re.c (rb_reg_source): should not call rb_reg_expr_str()
everytime.

Fri Nov 12 23:52:19 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>

* process.c (rb_f_system): argument check for NT, __EMX__, DJGPP.

Wed Nov 10 21:54:11 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>

* hash.c (rb_any_cmp): Fixed return without value.

Tue Nov 9 13:21:04 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>

* configure.in: AC_MINIX move to before AC_EXEEXT and AC_OBJEXT.

Mon Nov 8 19:52:29 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>

* configure.in: Renamed AC_CHAR_UNSIGNED to AC_C_CHAR_UNSIGNED.

* configure.in: Added default to AC_CHECK_SIZEOF().

Mon Nov 8 14:28:18 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* eval.c (rb_f_eval): fake outer scope when eval() called without
bindings.

* eval.c (rb_f_binding): should copy last_class in the outer frame too.

Sun Nov 7 18:31:04 1999 Yasuhiro Fukuma <yasuf@big.or.jp>

* eval.c (is_defined): last_class may be 0.

Sat Nov 6 19:26:55 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>

* Makefile.in: Added depend entry make parse.@OBJEXT@ from parse.c
for UCB make

Wed Nov 3 08:52:57 1999 Masaki Fukushima <fukusima@goto.info.waseda.ac.jp>

* io.c (Init_IO): forgot to use INT2FIX() around SEEK_SET, etc.

Wed Nov 3 00:25:20 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* string.c (rb_str_split_method): use mbclen2() to handle kcode
option of regexp objects.

Sun Oct 31 13:12:42 1999 WATANABE Hirofumi <eban@os.rim.or.jp>

* regex.c (re_compile_pattern): wrong [\W] match.

Thu Oct 28 13:35:40 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* string.c (rb_str_split_method): should be mbchar aware with
single char separators.

Wed Oct 27 12:57:21 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* random.c (rb_f_srand): random seed should be unsigned.

Tue Oct 26 19:20:54 1999 Koji Arai <JCA02266@nifty.ne.jp>

* marshal.c (r_object): should register class/module objects.

Sat Oct 23 15:59:39 1999 Takaaki Tateishi <ttate@jaist.ac.jp>

* process.c (rb_f_system): should require at least one argument.

Thu Oct 21 16:14:19 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* dir.c (fnmatch): use eban's fnmatch; do not depend on systems's
fnmatch (which may have portability problem) anymore.

Wed Oct 20 15:14:24 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* marshal.c (marshal_load): should protect the generated object
table (arg->data) from GC.

Mon Oct 18 16:15:52 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* ext/nkf/nkf.c (rb_nkf_kconv): output should be NUL terminated.

Fri Oct 15 22:50:41 1999 WATANABE Hirofumi <eban@os.rim.or.jp>

* error.c (sys_nerr): on CYGWIN, it is _sys_nerr.

Fri Oct 15 01:32:31 1999 WATANABE Hirofumi <eban@os.rim.or.jp>

* ext/Win32API/Win32API.c (Win32API_Call): need to use NUM2ULONG,
not NUM2INT.

Tue Oct 12 22:29:04 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* eval.c (block_pass): should copy block to prevent modifications.
tag in the structure should be updated from latest prot_tag.

* eval.c (proc_s_new): tag in struct BLOCK should not point into
unused stack.

* io.c (io_read): length may be 0 or negative.

Tue Oct 12 13:26:27 1999 Jun-ichiro itojun Hagino <itojun@itojun.org>

* signal.c (posix_signal): RETSIGTYPE may be void.

Mon Oct 11 17:42:25 1999 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>

* parse.y (rb_intern): should generate distinct ID_ATTRSET symbols
Expand All @@ -16,6 +208,10 @@ Mon Oct 4 12:42:32 1999 Kazuhiko Izawa <izawa@erec.che.tohoku.ac.jp>

* pack.c (pack_unpack): % in printf format should be %%.

Wed Oct 6 17:13:19 1999 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>

* ruby.c (addpath): rubylib_mangled_path() modified.

Mon Oct 4 10:01:40 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* variable.c (rb_obj_instance_variables): should always return
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST
Expand Up @@ -75,7 +75,6 @@ util.c
variable.c
version.c
version.h
beos/ruby.def.in
cygwin/GNUmakefile.in
ext/Setup
ext/Setup.dj
Expand All @@ -89,6 +88,7 @@ lib/Env.rb
lib/README
lib/base64.rb
lib/cgi.rb
lib/cgi/session.rb
lib/cgi-lib.rb
lib/complex.rb
lib/date.rb
Expand Down
2 changes: 2 additions & 0 deletions Makefile.in
Expand Up @@ -141,6 +141,8 @@ parse.c: parse.y
$(YACC) $<
mv -f y.tab.c parse.c

parse.@OBJEXT@: parse.c

alloca.@OBJEXT@: @srcdir@/missing/alloca.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/alloca.c

Expand Down
25 changes: 13 additions & 12 deletions array.c
Expand Up @@ -280,6 +280,7 @@ VALUE
rb_ary_pop(ary)
VALUE ary;
{
rb_ary_modify(ary);
if (RARRAY(ary)->len == 0) return Qnil;
if (RARRAY(ary)->len * 10 < RARRAY(ary)->capa && RARRAY(ary)->capa > ARY_DEFAULT_SIZE) {
RARRAY(ary)->capa = RARRAY(ary)->len * 2;
Expand All @@ -294,6 +295,7 @@ rb_ary_shift(ary)
{
VALUE top;

rb_ary_modify(ary);
if (RARRAY(ary)->len == 0) return Qnil;

top = RARRAY(ary)->ptr[0];
Expand Down Expand Up @@ -821,6 +823,7 @@ rb_ary_reverse(ary)
VALUE *p1, *p2;
VALUE tmp;

rb_ary_modify(ary);
if (RARRAY(ary)->len == 0) return ary;

p1 = RARRAY(ary)->ptr;
Expand Down Expand Up @@ -940,22 +943,19 @@ rb_ary_delete_at(ary, at)
VALUE ary;
VALUE at;
{
long i1, i2, pos;
long i, pos = NUM2LONG(at), len = RARRAY(ary)->len;
VALUE del = Qnil;

rb_ary_modify(ary);
pos = NUM2LONG(at);
for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
if (i1 == pos) {
del = RARRAY(ary)->ptr[i1];
continue;
}
if (i1 != i2) {
RARRAY(ary)->ptr[i2] = RARRAY(ary)->ptr[i1];
}
i2++;
if (pos >= len) return Qnil;
if (pos < 0) pos += len;
if (pos < 0) return Qnil;

del = RARRAY(ary)->ptr[pos];
for (i = pos + 1; i < len; i++, pos++) {
RARRAY(ary)->ptr[pos] = RARRAY(ary)->ptr[i];
}
RARRAY(ary)->len = i2;
RARRAY(ary)->len = pos;

return del;
}
Expand Down Expand Up @@ -1005,6 +1005,7 @@ static VALUE
rb_ary_clear(ary)
VALUE ary;
{
rb_ary_modify(ary);
RARRAY(ary)->len = 0;
if (ARY_DEFAULT_SIZE*3 < RARRAY(ary)->capa) {
RARRAY(ary)->capa = ARY_DEFAULT_SIZE * 2;
Expand Down
17 changes: 7 additions & 10 deletions bignum.c
Expand Up @@ -20,7 +20,7 @@ typedef unsigned short USHORT;
#define BIGRAD (1L << BITSPERDIG)
#define DIGSPERINT ((unsigned int)(sizeof(long)/sizeof(short)))
#define BIGUP(x) ((unsigned long)(x) << BITSPERDIG)
#define BIGDN(x) (((x)<0) ? ~((~(x))>>BITSPERDIG) : (x)>>BITSPERDIG)
#define BIGDN(x) RSHIFT(x,BITSPERDIG)
#define BIGLO(x) ((USHORT)((x) & (BIGRAD-1)))

static VALUE
Expand Down Expand Up @@ -1255,20 +1255,17 @@ rb_big_abs(x)
*/

VALUE
rb_big_rand(max)
rb_big_rand(max, rand)
VALUE max;
double rand;
{
struct RBignum *v;
VALUE v;
long len;

len = RBIGNUM(max)->len;
v = RBIGNUM(bignew(len,1));
len = RBIGNUM(v)->len;
v = bignew(len,1);
while (len--) {
#ifdef HAVE_RANDOM
BDIGITS(v)[len] = random();
#else
BDIGITS(v)[len] = rand();
#endif
BDIGITS(v)[len] = ((USHORT)~0) * rand;
}

return rb_big_mod((VALUE)v, max);
Expand Down

0 comments on commit 0dde9ed

Please sign in to comment.