Skip to content

Commit

Permalink
990531
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed May 31, 1999
1 parent 1307f8d commit 8a4cbc7
Show file tree
Hide file tree
Showing 39 changed files with 745 additions and 397 deletions.
50 changes: 50 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
Mon May 31 16:06:28 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* version 1.3.4 - preliminary release for 1.4

Mon May 31 15:57:41 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* io.c (rb_io_fptr_close): close on IO which main_thread is
waiting cause serious exception, that vanishes the actual fd
closing. Invocation of rb_thread_fd_close() is deferred
a little.

Sat May 29 18:27:13 1999 Koji Arai <JCA02266@nifty.ne.jp>

* regex.c (re_match): stack boundary check needed.

Sat May 29 12:27:00 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* ext/tcltklib/tcltklib.c (ip_invoke): proper ref count management
to avoid leak.

* eval.c (ruby_run): moved ruby_require_libraries() to handle `-r'
from ruby_options() to avoid stack corruption for threads
created in libraries.

Sat May 29 02:22:12 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* eval.c (rb_yield_0): when `for' appeared in blocks, it
introduced new scope for local variables.

Fri May 28 17:16:49 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* string.c (rb_str_squeeze_bang): squeeze AND of the arguments.
UNDOCUMENTED.

* string.c (rb_str_count): new UNDOCUMENTED method.

* string.c (rb_str_delete_bang): delete AND of the arg ranges.
UNDOCUMENTED FEATURE for 1.3.x.

* ext/socket/socket.c (setipaddr): re-wrote using ip_addrsetup().

* ext/sockt/socket.c (ip_addrsetup): decode symbolic address
<broadcast>.

Thu May 27 12:27:42 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* string.c (tr_trans): should handle NUL (\0) within strings.

Tue May 25 16:45:11 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* io.c (rb_f_syscall): syscall may return values other than zero
Expand Down Expand Up @@ -224,6 +272,8 @@ Mon May 3 09:37:22 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

Fri Apr 30 18:57:41 1999 Yukihiro Matsumoto <matz@netlab.co.jp>

* version 1.3.3

* string.c (rb_str_rindex): position should be END point, not
START point.

Expand Down
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ XLDFLAGS = @XLDFLAGS@
EXTLIBS =
LIBS = @LIBS@ $(EXTLIBS)
MISSING = @LIBOBJS@ @ALLOCA@
LDSHARED = @LDSHARED@
DLDFLAGS = @DLDFLAGS@
LDSHARED = @LIBRUBY_LDSHARED@
DLDFLAGS = @LIBRUBY_DLDFLAGS@
SOLIBS = @SOLIBS@

RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
Expand Down
15 changes: 11 additions & 4 deletions config_h.dj
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#define USE_THREAD 1
#define SIZEOF_INT 4
#define SIZEOF_SHORT 2
#define SIZEOF_LONG 4
#define SIZEOF_VOIDP 4
#define SIZEOF_FLOAT 4
#define SIZEOF_DOUBLE 8
#define HAVE_PROTOTYPES 1
#define TOKEN_PASTE(x,y) x##y
#define HAVE_STDARG_PROTOTYPES 1
#define HAVE_ATTR_NORETURN 1
#define HAVE_DIRENT_H 1
Expand Down Expand Up @@ -38,6 +42,9 @@
#define HAVE_STRSTR 1
#define HAVE_STRTOUL 1
#define HAVE_STRDUP 1
#define HAVE_ISINF 1
#define HAVE_ISNAN 1
#define HAVE_FINITE 1
#define HAVE_FMOD 1
#define HAVE_RANDOM 1
#define HAVE_WAITPID 1
Expand All @@ -57,8 +64,8 @@
#define RSHIFT(x,y) ((x)>>y)
#define FILE_COUNT _cnt
#define DLEXT ".o"
#define RUBY_LIB "/usr/local/lib/ruby"
#define RUBY_SITE_LIB "/usr/local/lib/ruby/site_ruby"
#define RUBY_ARCHLIB "/usr/local/lib/ruby/i386-djgpp"
#define RUBY_SITE_ARCHLIB "/usr/local/lib/ruby/site_ruby/i386-djgpp"
#define RUBY_LIB "/usr/local/lib/ruby/1.3"
#define RUBY_SITE_LIB "/usr/local/lib/ruby/1.3/site_ruby"
#define RUBY_PLATFORM "i386-djgpp"
#define RUBY_ARCHLIB "/usr/local/lib/ruby/1.3/i386-djgpp"
#define RUBY_SITE_ARCHLIB "/usr/local/lib/1.3/ruby/site_ruby/i386-djgpp"
2 changes: 1 addition & 1 deletion config_s.dj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
s%@CFLAGS@%-g -O2%g
s%@CFLAGS@%-O2%g
s%@CPPFLAGS@%%g
s%@CXXFLAGS@%%g
s%@DEFS@% -DUSE_THREAD=1 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DSIZEOF_VOIDP=4 -DHAVE_PROTOTYPES=1 -DHAVE_STDARG_PROTOTYPES=1 -DHAVE_ATTR_NORETURN=1 -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_PWD_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_STRING_H=1 -DHAVE_UTIME_H=1 -DHAVE_MEMORY_H=1 -DHAVE_DIRECT_H=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_ST_RDEV=1 -DGETGROUPS_T=gid_t -DRETSIGTYPE=void -DHAVE_ALLOCA=1 -Dvfork=fork -DHAVE_DUP2=1 -DHAVE_SETENV=1 -DHAVE_MEMMOVE=1 -DHAVE_MKDIR=1 -DHAVE_STRCASECMP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_STRCHR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOUL=1 -DHAVE_STRDUP=1 -DHAVE_FMOD=1 -DHAVE_RANDOM=1 -DHAVE_WAITPID=1 -DHAVE_GETCWD=1 -DHAVE_TRUNCATE=1 -DHAVE_CHSIZE=1 -DHAVE_TIMES=1 -DHAVE_UTIMES=1 -DHAVE_FCNTL=1 -DHAVE_SETITIMER=1 -DHAVE_GETGROUPS=1 -DHAVE_SIGPROCMASK=1 -DHAVE_SIGACTION=1 -DHAVE_SETSID=1 -DPOSIX_SIGNAL=1 -DBSD_SETPGRP=setpgrp -DRSHIFT=\(x,y\)\ \(\(x\)\>\>y\) -DFILE_COUNT=_cnt -DDLEXT=\".so\" -DRUBY_LIB=\"/usr/local/lib/ruby\" -DRUBY_SITE_LIB=\"/usr/local/lib/ruby/site_ruby\" -DRUBY_ARCHLIB=\"/usr/local/lib/ruby/i386-djgpp\" -DRUBY_SITE_ARCHLIB=\"/usr/local/lib/ruby/site_ruby/i386-djgpp\" -DRUBY_PLATFORM=\"i386-djgpp\" %g
Expand Down
17 changes: 17 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4453,6 +4453,8 @@ if test "$host_os" = "beos"; then
esac
fi

LIBRUBY_LDSHARED=$LDSHARED
LIBRUBY_DLDFLAGS=$DLDFLAGS
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR).$(TEENY)'
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so'
# Check whether --enable-enable-shared or --disable-enable-shared was given.
Expand Down Expand Up @@ -4480,6 +4482,17 @@ if test "$enable_shared" = 'yes'; then
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).sl.$(MAJOR).$(MINOR).$(TEENY)'
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).sl.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).sl'
;;
aix*)
if test "$GCC" = yes; then
LIBRUBY_LDSHARED='$(CC) -shared'
LIBRUBY_DLDFLAGS='-Wl,-bE:ruby.imp'
else
LIBRUBY_LDSHARED='/usr/ccs/bin/ld'
LIBRUBY_DLDFLAGS='-bE:ruby.imp -bM:SRE -bnoentry'
fi
LIBRUBYARG='-L./ -Wl,lib$(RUBY_INSTALL_NAME).so'
SOLIBS='-lm -lc'
;;
*)
;;
esac
Expand Down Expand Up @@ -4507,6 +4520,8 @@ esac





ri_prefix=
test "$program_prefix" != NONE &&
ri_prefix=$program_prefix
Expand Down Expand Up @@ -4740,6 +4755,8 @@ s%@STRIP@%$STRIP%g
s%@EXTSTATIC@%$EXTSTATIC%g
s%@binsuffix@%$binsuffix%g
s%@setup@%$setup%g
s%@LIBRUBY_LDSHARED@%$LIBRUBY_LDSHARED%g
s%@LIBRUBY_DLDFLAGS@%$LIBRUBY_DLDFLAGS%g
s%@RUBY_INSTALL_NAME@%$RUBY_INSTALL_NAME%g
s%@LIBRUBY_A@%$LIBRUBY_A%g
s%@LIBRUBY_SO@%$LIBRUBY_SO%g
Expand Down
20 changes: 17 additions & 3 deletions configure.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
@echo off
sed -f top.sed Makefile.in >Makefile
sed -f top.sed ext/extmk.rb.in > ext\extmk.rb
sed -n "/VERSION/s/[^0-9.]\+//gp" < version.h > version.out
cut -d. -f1 version.out > major.out
cut -d. -f2 version.out > minor.out
cut -d. -f3 version.out > teeny.out
sed "s/^/s,@MAJOR@,/;s/$/,/g" major.out >> top.sed
sed "s/^/s,@MINOR@,/;s/$/,/g" minor.out >> top.sed
sed "s/^/s,@TEENY@,/;s/$/,/g" teeny.out >> top.sed
rm version.out major.out minor.out teeny.out
sed -f top.sed < Makefile.in > Makefile
sed -f top.sed < ext\extmk.rb.in > ext\extmk.rb
copy ext\Setup.dj ext\Setup
copy config_h.dj config.h
copy config_s.dj config.status
if not (%OS%) == (Windows_NT) goto LFN
copy missing\vsnprintf.c missing\vsnprint.c
copy config_s.dj config.sta
goto end
:LFN
copy config_s.dj config.status
:end
15 changes: 15 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,8 @@ if test "$host_os" = "beos"; then
esac
fi

LIBRUBY_LDSHARED=$LDSHARED
LIBRUBY_DLDFLAGS=$DLDFLAGS
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR).$(TEENY)'
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so'
AC_ARG_ENABLE(enable-shared,
Expand All @@ -676,6 +678,17 @@ if test "$enable_shared" = 'yes'; then
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).sl.$(MAJOR).$(MINOR).$(TEENY)'
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).sl.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).sl'
;;
aix*)
if test "$GCC" = yes; then
LIBRUBY_LDSHARED='$(CC) -shared'
LIBRUBY_DLDFLAGS='-Wl,-bE:ruby.imp'
else
LIBRUBY_LDSHARED='/usr/ccs/bin/ld'
LIBRUBY_DLDFLAGS='-bE:ruby.imp -bM:SRE -bnoentry'
fi
LIBRUBYARG='-L./ -Wl,lib$(RUBY_INSTALL_NAME).so'
SOLIBS='-lm -lc'
;;
*)
;;
esac
Expand All @@ -695,6 +708,8 @@ case "$host_os" in
;;
esac

AC_SUBST(LIBRUBY_LDSHARED)
AC_SUBST(LIBRUBY_DLDFLAGS)
AC_SUBST(RUBY_INSTALL_NAME)
AC_SUBST(LIBRUBY_A)
AC_SUBST(LIBRUBY_SO)
Expand Down
2 changes: 2 additions & 0 deletions dln.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ char *dln_argv0;
# include <strings.h>
#endif

#ifndef xmalloc
void *xmalloc();
void *xcalloc();
void *xrealloc();
#endif

#include <stdio.h>
#ifndef NT
Expand Down
47 changes: 25 additions & 22 deletions eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ struct BLOCK {
struct tag *tag;
int iter;
int vmode;
int d_scope;
struct RVarmap *d_vars;
VALUE orig_thread;
struct BLOCK *prev;
Expand All @@ -428,10 +429,11 @@ static struct BLOCK *ruby_block;
_block.frame.file = ruby_sourcefile;\
_block.frame.line = ruby_sourceline;\
_block.scope = ruby_scope; \
_block.d_vars = ruby_dyna_vars; \
_block.prev = ruby_block; \
_block.iter = ruby_iter->iter; \
_block.vmode = scope_vmode; \
_block.d_scope = Qtrue; \
_block.d_vars = ruby_dyna_vars; \
ruby_block = &_block;

#define POP_BLOCK() \
Expand All @@ -440,7 +442,6 @@ static struct BLOCK *ruby_block;

#define PUSH_BLOCK2(b) { \
struct BLOCK * volatile _old; \
struct BLOCK * volatile _old_call; \
_old = ruby_block; \
ruby_block = b;

Expand All @@ -459,27 +460,20 @@ struct RVarmap *ruby_dyna_vars;
}

static struct RVarmap*
new_dvar(id, value)
new_dvar(id, value, prev)
ID id;
VALUE value;
struct RVarmap *prev;
{
NEWOBJ(vars, struct RVarmap);
OBJSETUP(vars, 0, T_VARMAP);
vars->id = id;
vars->val = value;
vars->next = ruby_dyna_vars;
vars->next = prev;

return vars;
}

static void
mark_dvar(vars)
struct RVarmap *vars;
{
ruby_dyna_vars = new_dvar(0, 0);
ruby_dyna_vars->next = vars;
}

VALUE
rb_dvar_defined(id)
ID id;
Expand Down Expand Up @@ -513,7 +507,7 @@ rb_dvar_push(id, value)
ID id;
VALUE value;
{
ruby_dyna_vars = new_dvar(id, value);
ruby_dyna_vars = new_dvar(id, value, ruby_dyna_vars);
}

static void
Expand Down Expand Up @@ -942,13 +936,8 @@ ruby_options(argc, argv)

PUSH_TAG(PROT_NONE)
if ((state = EXEC_TAG()) == 0) {
NODE *save;

ruby_process_options(argc, argv);
ext_init = 1; /* Init_ext() called in ruby_process_options */
save = ruby_eval_tree;
ruby_require_modules();
ruby_eval_tree = save;
}
POP_TAG();
if (state) {
Expand Down Expand Up @@ -999,7 +988,12 @@ ruby_run()
PUSH_TAG(PROT_NONE);
PUSH_ITER(ITER_NOT);
if ((state = EXEC_TAG()) == 0) {
NODE *save;

if (!ext_init) Init_ext();
save = ruby_eval_tree;
ruby_require_libraries();
ruby_eval_tree = save;
eval_node(ruby_top_self);
}
POP_ITER();
Expand Down Expand Up @@ -1940,6 +1934,7 @@ rb_eval(self, node)
char *file = ruby_sourcefile;
int line = ruby_sourceline;

_block.d_scope = Qfalse;
recv = rb_eval(self, node->nd_iter);
PUSH_ITER(ITER_PRE);
ruby_sourcefile = file;
Expand Down Expand Up @@ -3157,7 +3152,14 @@ rb_yield_0(val, self, klass)
old_scope = ruby_scope;
ruby_scope = block->scope;
ruby_block = block->prev;
mark_dvar(block->d_vars);
if (block->d_scope) {
/* put place holder for dynamic (in-block) local variables */
ruby_dyna_vars = new_dvar(0, 0, block->d_vars);
}
else {
/* FOR does not introduce new scope */
ruby_dyna_vars = block->d_vars;
}
ruby_class = klass?klass:block->klass;
if (!self) self = block->self;
node = block->body;
Expand Down Expand Up @@ -6195,7 +6197,8 @@ rb_thread_fd_close(fd)
th_raise_file = ruby_sourcefile;
th_raise_line = ruby_sourceline;
curr_thread = th;
rb_thread_restore_context(main_thread, RESTORE_RAISE);
rb_thread_ready(th);
rb_thread_restore_context(curr_thread, RESTORE_RAISE);
}
}
END_FOREACH(th);
Expand Down Expand Up @@ -6265,7 +6268,7 @@ rb_thread_schedule()
}

if (num_waiting_on_fd > 0 || num_waiting_on_timer > 0) {
fd_set readfds;
fd_set readfds, writefds, exceptfds;
struct timeval delay_tv, *delay_ptr;
double delay, now; /* OK */

Expand Down Expand Up @@ -7008,8 +7011,8 @@ rb_thread_cleanup()

FOREACH_THREAD(th) {
if (th != curr_thread && th->status != THREAD_KILLED) {
rb_thread_ready(th);
th->status = THREAD_TO_KILL;
th->wait_for = 0;
}
}
END_FOREACH(th);
Expand Down
1 change: 0 additions & 1 deletion ext/Setup
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#option nodynamic

interbase
#GD
#curses
#dbm
Expand Down
Loading

0 comments on commit 8a4cbc7

Please sign in to comment.