summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog80
-rw-r--r--MANIFEST3
-rw-r--r--Makefile.in1
-rw-r--r--README.EXT4
-rw-r--r--array.c7
-rw-r--r--config_h.dj2
-rw-r--r--config_s.dj4
-rw-r--r--configure10
-rw-r--r--configure.bat21
-rw-r--r--configure.in9
-rw-r--r--defines.h9
-rw-r--r--dir.c12
-rw-r--r--dln.c4
-rw-r--r--env.h1
-rw-r--r--eval.c160
-rw-r--r--ext/Setup.emx16
-rw-r--r--ext/Setup.nt13
-rw-r--r--ext/cygwin32_ld.rb90
-rw-r--r--ext/etc/etc.txt72
-rw-r--r--ext/etc/etc.txt.jp (renamed from ext/etc/etc.doc)3
-rw-r--r--ext/extmk.rb.in103
-rw-r--r--ext/md5/md5.txt38
-rw-r--r--ext/md5/md5.txt.jp (renamed from ext/md5/md5.doc)3
-rw-r--r--ext/socket/socket.c8
-rw-r--r--ext/tcltklib/extconf.rb4
-rw-r--r--ext/tcltklib/tcltklib.c4
-rw-r--r--file.c39
-rw-r--r--gc.c5
-rw-r--r--hash.c19
-rw-r--r--io.c8
-rw-r--r--lib/debug.rb14
-rw-r--r--lib/mkmf.rb8
-rw-r--r--misc/ruby-mode.el4
-rw-r--r--object.c8
-rw-r--r--range.c3
-rw-r--r--ruby.c3
-rw-r--r--ruby.h2
-rw-r--r--rubysig.h12
-rw-r--r--top.sed5
-rw-r--r--util.c2
-rw-r--r--version.h8
-rw-r--r--win32/Makefile180
-rw-r--r--win32/config.h5
-rw-r--r--win32/config.status17
-rwxr-xr-xwin32/ntsetup.bat3
-rw-r--r--win32/ruby.def288
46 files changed, 867 insertions, 447 deletions
diff --git a/ChangeLog b/ChangeLog
index 83cc64e0d3..550b5b3c30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,78 @@
+Fri Aug 6 15:01:07 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * version 1.3.7 - version 1.4 beta
+
+ * ext/socket/socket.c (s_recv): UDPsocket#recvfrom now returns
+ IPsocket#addr information.
+
+ * array.c (rb_ary_subary): ary[-3,3] should not return nil.
+
+Thu Aug 5 10:58:01 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * eval.c (thread_mark): protect old ruby_frame from GC during it
+ replaced by eval().
+
+ * eval.c (eval): do not modify frame.prev; binding should preserve
+ information about calling() too.
+
+ * eval.c (rb_yield_0): no arity check for mere yield; but only for
+ Proc#call.
+
+Tue Aug 3 22:07:13 1999 Kazuhiro HIWADA <hiwada@kuee.kyoto-u.ac.jp>
+
+ * object.c (rb_mod_clone): should check if iv_tbl, m_tbl are
+ initialized.
+
+Tue Aug 3 19:03:02 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * hash.c (rb_any_cmp): use rb_with_disable_interrupt() to ensure
+ clearance of rb_prohibit_interrupt even on failure.
+
+ * eval.c (rb_with_disable_interrupt): new function added.
+
+Sat Jul 31 23:23:44 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * eval.c (rb_thread_create_0): set THREAD_RAISED flag on thread
+ termination by exception.
+
+ * eval.c (rb_thread_join): `$!' may not be nil for the threads
+ created in rescue clause.
+
+ * eval.c (rb_thread_status): ditto.
+
+ * eval.c (rb_thread_join): should re-raise exception for already
+ dead threads too.
+
+Fri Jul 30 17:56:54 1999 GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp>
+
+ * object.c (rb_mod_ge): wrong comparison.
+
+Fri Jul 30 12:15:44 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+
+ * ext/tcltklib/extconf.rb: win32 support.
+
+ * lib/mkmf.rb: use append_library().
+
+ * ext/extmk.rb.in: ditto.
+
+Fri Jul 30 02:11:48 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * array.c (rb_ary_delete): should return nil for deleting non
+ existing item.
+
+ * io.c (rb_io_close): call rb_sys_wait() on explicit close.
+
+ * io.c (rb_io_fptr_close): do not call rb_sys_wait() on finalize.
+
+ * eval.c (yield_under_i): cbase context should be maintaind for
+ Module#module_eval(). suggested by <inaba@st.rim.or.jp>.
+
+Wed Jul 28 01:18:28 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * Makefile.in: add -I$(hdrdir)/lib to install using ftools.
+
+ * util.c: use HAVE_FCNTL_H, not HAVE_FCNTL
+
Wed Jul 28 18:24:45 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
* version 1.3.6 - version 1.4 alpha
@@ -31,6 +106,11 @@ Thu Jul 22 19:37:22 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
* eval.c (rb_thread_join): get_backtrace() may retrun Qnil.
typecheck added.
+Tue Jul 20 14:36:43 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * range.c (range_each): do not treat String specially (for future
+ override).
+
Tue Jul 20 02:28:34 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
* io.c (rb_gets): $_ should be nil, when get returns nil.
diff --git a/MANIFEST b/MANIFEST
index e9a2bfca0f..1b9e448360 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -83,9 +83,8 @@ ext/Setup.emx
ext/Setup.nt
ext/Setup.x68
ext/aix_mksym.rb
-ext/cygwin32_ld.rb
+ext/mswin32_extmk.rb
ext/extmk.rb.in
-ext/extmk.rb.nt
lib/CGI.rb
lib/English.rb
lib/Env.rb
diff --git a/Makefile.in b/Makefile.in
index d6981a46dd..6eb1f76ae4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -234,7 +234,6 @@ enum.@OBJEXT@: enum.c ruby.h config.h defines.h intern.h
error.@OBJEXT@: error.c ruby.h config.h defines.h intern.h env.h
eval.@OBJEXT@: eval.c ruby.h config.h defines.h intern.h node.h env.h rubysig.h st.h dln.h
file.@OBJEXT@: file.c ruby.h config.h defines.h intern.h rubyio.h rubysig.h
-fnmatch.@OBJEXT@: fnmatch.c config.h fnmatch.h
gc.@OBJEXT@: gc.c ruby.h config.h defines.h intern.h rubysig.h st.h node.h env.h re.h regex.h
hash.@OBJEXT@: hash.c ruby.h config.h defines.h intern.h st.h rubysig.h util.h
inits.@OBJEXT@: inits.c ruby.h config.h defines.h intern.h
diff --git a/README.EXT b/README.EXT
index cc6c963baf..241d6fa8cd 100644
--- a/README.EXT
+++ b/README.EXT
@@ -2,7 +2,7 @@
This document explains how to make extention libraries for Ruby.
-1¡¥Basic knowledge
+1. Basic knowledge
In C, variables have types and data do not have types. In contrast,
Ruby variables do not have static type and data themselves have
@@ -417,7 +417,7 @@ The pointer to the structure will be assigned to the variable sval.
See example below for detail.
-4¡¥Example - Creating dbm extension
+4. Example - Creating dbm extension
OK, here's the example to make extension library. This is the
extension to access dbm. The full source is included in ext/
diff --git a/array.c b/array.c
index 128f7de704..766d3044af 100644
--- a/array.c
+++ b/array.c
@@ -355,9 +355,12 @@ rb_ary_subary(ary, beg, len)
{
VALUE ary2;
- if (len < 0) return Qnil;
if (beg > RARRAY(ary)->len) return Qnil;
- if (beg < 0) return Qnil;
+ if (beg < 0) {
+ len += beg;
+ beg = 0;
+ }
+ if (len < 0) return Qnil;
if (beg + len > RARRAY(ary)->len) {
len = RARRAY(ary)->len - beg;
}
diff --git a/config_h.dj b/config_h.dj
index aac8fcb667..d64be54dfb 100644
--- a/config_h.dj
+++ b/config_h.dj
@@ -53,7 +53,7 @@
#define HAVE_CHSIZE 1
#define HAVE_TIMES 1
#define HAVE_UTIMES 1
-#define HAVE_FCNTL 1
+#define HAVE_FCNTL_H 1
/*#define HAVE_SETITIMER 1*/
#define HAVE_GETGROUPS 1
#define HAVE_SIGPROCMASK 1
diff --git a/config_s.dj b/config_s.dj
index 41b83660ac..7ba18e4376 100644
--- a/config_s.dj
+++ b/config_s.dj
@@ -32,7 +32,7 @@ s%@AR@%ar%g
s%@INSTALL_PROGRAM@%${INSTALL}%g
s%@INSTALL_DATA@%${INSTALL} -m 644%g
s%@SET_MAKE@%%g
-s%@LIBOBJS@% crypt.o flock.o snprintf.o%g
+s%@LIBOBJS@% crypt.o flock.o fnmatch.o snprintf.o%g
s%@ALLOCA@%%g
s%@DEFAULT_KCODE@%%g
s%@EXEEXT@%.exe%g
@@ -47,7 +47,9 @@ s%@EXTSTATIC@%%g
s%@binsuffix@%.exe%g
s%@setup@%Setup%g
s%@LIBRUBY@%libruby.a%g
+s%@LIBRUBY_A@%libruby.a%g
s%@LIBRUBYARG@%libruby.a%g
+s%@LIBRUBY_SO@%%g
s%@SOLIBS@%%g
s%@srcdir%.%g
s%@arch@%i386-djgpp%g
diff --git a/configure b/configure
index b42807d40b..04a8c14334 100644
--- a/configure
+++ b/configure
@@ -4495,29 +4495,24 @@ EOF
fi
LIBOBJS="$LIBOBJS x68.o"
CFLAGS="$CFLAGS -fansi-only -cc1-stack=196608 -cpp-stack=2694144"
- binsuffix=.x
+ EXEEXT=.x
+ OBJEXT=o
setup=Setup.x68
;;
os2_emx)
LIBOBJS="$LIBOBJS os2.o"
- binsuffix=.exe
setup=Setup.emx
;;
cygwin*)
- binsuffix=.exe
setup=Setup
;;
*)
- binsuffix=
setup=Setup
;;
esac
-
-
-
if test "$prefix" = NONE; then
prefix=$ac_default_prefix
fi
@@ -4887,7 +4882,6 @@ s%@LDSHARED@%$LDSHARED%g
s%@DLEXT@%$DLEXT%g
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
diff --git a/configure.bat b/configure.bat
index 34d61a9071..bbde277ddd 100644
--- a/configure.bat
+++ b/configure.bat
@@ -1,12 +1,17 @@
@echo off
-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
+grep -qs MAJOR top.sed
+if errorlevel 1 goto seen
+if errorlevel 0 goto not_seen
+:seen
+ 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
+:not_seen
sed -f top.sed < Makefile.in > Makefile
sed -f top.sed < ext\extmk.rb.in > ext\extmk.rb
copy ext\Setup.dj ext\Setup
diff --git a/configure.in b/configure.in
index b07e76fd45..6c36e1b694 100644
--- a/configure.in
+++ b/configure.in
@@ -596,28 +596,23 @@ rb_cv_missing_fconvert=yes, rb_cv_missing_fconvert=no, rb_cv_missing_fconvert=no
fi
LIBOBJS="$LIBOBJS x68.o"
CFLAGS="$CFLAGS -fansi-only -cc1-stack=196608 -cpp-stack=2694144"
- binsuffix=.x
+ EXEEXT=.x
+ OBJEXT=o
setup=Setup.x68
;;
dnl OS/2 environment w/ Autoconf 2.1x for EMX
os2_emx)
LIBOBJS="$LIBOBJS os2.o"
- binsuffix=.exe
setup=Setup.emx
;;
cygwin*)
- binsuffix=.exe
setup=Setup
;;
*)
- binsuffix=
setup=Setup
;;
esac
-
-
-AC_SUBST(binsuffix)
AC_SUBST(setup)
if test "$prefix" = NONE; then
diff --git a/defines.h b/defines.h
index 21d589b55d..8e6eb83ca7 100644
--- a/defines.h
+++ b/defines.h
@@ -44,11 +44,16 @@
#define FLUSH_REGISTER_WINDOWS /* empty */
#endif
+#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
+#define DOSISH 1
+#endif
+
#if defined(MSDOS) || defined(NT) || defined(__human68k__)
-#define RUBY_PATH_SEP ";"
+#define PATH_SEP ";"
#else
-#define RUBY_PATH_SEP ":"
+#define PATH_SEP ":"
#endif
+#define PATH_SEP_CHAR PATH_SEP[0]
#if defined(__human68k__) || defined(__CYGWIN32__)
#undef HAVE_RANDOM
diff --git a/dir.c b/dir.c
index e5b8ca779a..31116a9fff 100644
--- a/dir.c
+++ b/dir.c
@@ -538,7 +538,7 @@ dir_s_glob(dir, str)
{
char *p, *pend;
char buffer[MAXPATHLEN], *buf = buffer;
- char *t, *t0;
+ char *t;
int nest;
VALUE ary;
@@ -552,18 +552,14 @@ dir_s_glob(dir, str)
while (p < pend) {
t = buf;
+ nest = 0;
while (p < pend && isdelim(*p)) p++;
while (p < pend && !isdelim(*p)) {
+ if (*p == '{') nest+=2;
+ if (*p == '}') nest+=3;
*t++ = *p++;
}
*t = '\0';
- t0 = buf;
- nest = 0;
- while (t0 < t) {
- if (*t0 == '{') nest+=2;
- if (*t0 == '}') nest+=3;
- t0++;
- }
if (nest == 0) {
push_globs(ary, buf);
}
diff --git a/dln.c b/dln.c
index daf3a9d60a..e6c7adde70 100644
--- a/dln.c
+++ b/dln.c
@@ -103,7 +103,7 @@ init_funcname(buf, file)
#endif
sprintf(buf, FUNCNAME_PATTERN, slash + 1);
- for (p = buf; *p; p++) { /* Delete suffix it it exists */
+ for (p = buf; *p; p++) { /* Delete suffix if it exists */
if (*p == '.') {
*p = '\0'; break;
}
@@ -1605,7 +1605,7 @@ dln_find_1(fname, path, exe_flag)
int fspace;
/* extract a component */
- ep = strchr(dp, RUBY_PATH_SEP[0]);
+ ep = strchr(dp, PATH_SEP[0]);
if (ep == NULL)
ep = dp+strlen(dp);
diff --git a/env.h b/env.h
index bdaac91950..5875dc6ee9 100644
--- a/env.h
+++ b/env.h
@@ -19,6 +19,7 @@ extern struct FRAME {
VALUE last_class;
VALUE cbase;
struct FRAME *prev;
+ struct FRAME *tmp;
char *file;
int line;
int iter;
diff --git a/eval.c b/eval.c
index 0a558769aa..ea9f49f30f 100644
--- a/eval.c
+++ b/eval.c
@@ -398,6 +398,7 @@ static struct SCOPE *top_scope;
#define PUSH_FRAME() { \
struct FRAME _frame; \
_frame.prev = ruby_frame; \
+ _frame.tmp = 0; \
_frame.file = ruby_sourcefile; \
_frame.line = ruby_sourceline; \
_frame.iter = ruby_iter->iter; \
@@ -420,11 +421,15 @@ struct BLOCK {
struct tag *tag;
int iter;
int vmode;
- int d_scope;
+ int flags;
struct RVarmap *d_vars;
VALUE orig_thread;
struct BLOCK *prev;
};
+
+#define BLOCK_D_SCOPE 1
+#define BLOCK_DYNAMIC 2
+
static struct BLOCK *ruby_block;
#define PUSH_BLOCK(v,b) { \
@@ -441,7 +446,7 @@ static struct BLOCK *ruby_block;
_block.prev = ruby_block; \
_block.iter = ruby_iter->iter; \
_block.vmode = scope_vmode; \
- _block.d_scope = Qtrue; \
+ _block.flags = BLOCK_D_SCOPE; \
_block.d_vars = ruby_dyna_vars; \
ruby_block = &_block;
@@ -679,7 +684,7 @@ static VALUE ruby_wrapper; /* security wrapper */
static VALUE rb_eval _((VALUE,NODE*));
static VALUE eval _((VALUE,VALUE,VALUE,char*,int));
static NODE *compile _((VALUE, char*, int));
-static VALUE rb_yield_0 _((VALUE, VALUE, VALUE));
+static VALUE rb_yield_0 _((VALUE, VALUE, VALUE, int));
static VALUE rb_call _((VALUE,VALUE,ID,int,VALUE*,int));
static VALUE module_setup _((VALUE,NODE*));
@@ -1159,7 +1164,7 @@ rb_eval_string_wrap(str, state)
POP_CLASS();
if (state) {
*state = status;
- if (status == 0) {
+ if (status) {
JUMP_TAG(status);
}
}
@@ -1931,7 +1936,7 @@ rb_eval(self, node)
char *file = ruby_sourcefile;
int line = ruby_sourceline;
- _block.d_scope = Qfalse;
+ _block.flags &= ~BLOCK_D_SCOPE;
recv = rb_eval(self, node->nd_iter);
PUSH_ITER(ITER_PRE);
ruby_sourcefile = file;
@@ -2002,7 +2007,7 @@ rb_eval(self, node)
else {
result = Qnil;
}
- result = rb_yield_0(result, 0, 0);
+ result = rb_yield_0(result, 0, 0, Qfalse);
break;
case NODE_RESCUE:
@@ -3114,8 +3119,9 @@ rb_f_iterator_p()
}
static VALUE
-rb_yield_0(val, self, klass)
+rb_yield_0(val, self, klass, acheck)
VALUE val, self, klass; /* OK */
+ int acheck;
{
NODE *node;
volatile VALUE result = Qnil;
@@ -3138,7 +3144,7 @@ rb_yield_0(val, self, klass)
old_scope = ruby_scope;
ruby_scope = block->scope;
ruby_block = block->prev;
- if (block->d_scope) {
+ if (block->flags & BLOCK_D_SCOPE) {
/* put place holder for dynamic (in-block) local variables */
ruby_dyna_vars = new_dvar(0, 0, block->d_vars);
}
@@ -3153,9 +3159,9 @@ rb_yield_0(val, self, klass)
PUSH_TAG(PROT_NONE);
if ((state = EXEC_TAG()) == 0) {
if (nd_type(block->var) == NODE_MASGN)
- massign(self, block->var, val, 1);
+ massign(self, block->var, val, acheck);
else
- assign(self, block->var, val, 1);
+ assign(self, block->var, val, acheck);
}
POP_TAG();
if (state) goto pop_state;
@@ -3211,13 +3217,13 @@ VALUE
rb_yield(val)
VALUE val;
{
- return rb_yield_0(val, 0, 0);
+ return rb_yield_0(val, 0, 0, Qfalse);
}
static VALUE
rb_f_loop()
{
- for (;;) { rb_yield_0(Qnil, 0, 0); }
+ for (;;) { rb_yield_0(Qnil, 0, 0, Qfalse); }
}
static VALUE
@@ -3501,6 +3507,26 @@ rb_ensure(b_proc, data1, e_proc, data2)
return result;
}
+VALUE
+rb_with_disable_interrupt(proc, data)
+ VALUE (*proc)();
+ VALUE data;
+{
+ VALUE result; /* OK */
+ int status;
+
+ DEFER_INTS;
+ PUSH_TAG(PROT_NONE);
+ if ((status = EXEC_TAG()) == 0) {
+ result = (*proc)(data);
+ }
+ POP_TAG();
+ ALLOW_INTS;
+ if (status) JUMP_TAG(status);
+
+ return result;
+}
+
static int last_call_status;
#define CSTAT_PRIV 1
@@ -3846,10 +3872,8 @@ rb_call0(klass, recv, id, argc, argv, body, nosuper)
rb_raise(rb_eArgError, "wrong # of arguments(%d for %d)",
argc, opt);
}
-#if 1
ruby_frame->argc = opt;
ruby_frame->argv = local_vars+2;
-#endif
}
if (local_vars) {
@@ -4175,6 +4199,7 @@ eval(self, src, scope, file, line)
struct BLOCK * volatile old_block;
struct RVarmap * volatile old_d_vars;
int volatile old_vmode;
+ struct FRAME * volatile old_frame;
struct FRAME frame;
char *filesave = ruby_sourcefile;
int linesave = ruby_sourceline;
@@ -4195,7 +4220,8 @@ eval(self, src, scope, file, line)
/* PUSH BLOCK from data */
frame = data->frame;
- frame.prev = ruby_frame;
+ frame.tmp = ruby_frame; /* gc protection */
+ old_frame = ruby_frame;
ruby_frame = &(frame);
old_scope = ruby_scope;
ruby_scope = data->scope;
@@ -4233,7 +4259,7 @@ eval(self, src, scope, file, line)
POP_CLASS();
ruby_in_eval--;
if (!NIL_P(scope)) {
- ruby_frame = ruby_frame->prev;
+ ruby_frame = old_frame;
if (FL_TEST(ruby_scope, SCOPE_DONT_RECYCLE))
FL_SET(old_scope, SCOPE_DONT_RECYCLE);
ruby_scope = old_scope;
@@ -4296,6 +4322,7 @@ rb_f_eval(argc, argv, self)
return eval(self, src, scope, file, line);
}
+/* function to call func under the specified class/module context */
static VALUE
exec_under(func, under, args)
VALUE (*func)();
@@ -4337,6 +4364,7 @@ eval_under_i(args)
return eval(args[0], args[1], Qnil, (char*)args[2], (int)args[3]);
}
+/* string eval under the class/module context */
static VALUE
eval_under(under, self, src, file, line)
VALUE under, self, src;
@@ -4357,9 +4385,35 @@ static VALUE
yield_under_i(self)
VALUE self;
{
- return rb_yield_0(self, self, ruby_class);
+ if (ruby_block->flags & BLOCK_DYNAMIC) {
+ struct BLOCK * volatile old_block = ruby_block;
+ struct BLOCK block = *ruby_block;
+ volatile VALUE cbase = ruby_block->frame.cbase;
+ /* cbase should be pointed from volatile local variable */
+ /* to be protected from GC. */
+ VALUE result;
+ int state;
+
+ /* copy the block to avoid modifying global data. */
+ block.frame.cbase = ruby_frame->cbase;
+ ruby_block = &block;
+
+ PUSH_TAG(PROT_NONE);
+ if ((state = EXEC_TAG()) == 0) {
+ result = rb_yield_0(self, self, ruby_class, Qfalse);
+ }
+ POP_TAG();
+ ruby_block = old_block;
+ if (state) JUMP_TAG(state);
+
+ return result;
+ }
+ /* static block, no need to restore */
+ ruby_block->frame.cbase = ruby_frame->cbase;
+ return rb_yield_0(self, self, ruby_class, Qfalse);
}
+/* block eval under the class/module context */
static VALUE
yield_under(under, self)
VALUE under, self;
@@ -4496,7 +4550,7 @@ find_file(file)
rb_ary_push(vpath, str);
}
}
- vpath = rb_ary_join(vpath, rb_str_new2(RUBY_PATH_SEP));
+ vpath = rb_ary_join(vpath, rb_str_new2(PATH_SEP));
path = STR2CSTR(vpath);
if (safe_level >= 2 && !rb_path_check(path)) {
rb_raise(rb_eSecurityError, "loading from unsefe path %s", path);
@@ -4753,6 +4807,13 @@ rb_f_require(obj, fname)
return Qtrue;
}
+VALUE
+rb_require(fname)
+ const char *fname;
+{
+ return rb_f_require(Qnil, rb_str_new2(fname));
+}
+
static VALUE
require_method(argc, argv, self)
int argc;
@@ -5414,6 +5475,7 @@ proc_s_new(klass)
else {
data->prev = 0;
}
+ data->flags |= BLOCK_DYNAMIC;
scope_dup(data->scope);
proc_save_safe_level(proc);
@@ -5485,7 +5547,7 @@ proc_call(proc, args)
state = EXEC_TAG();
if (state == 0) {
proc_set_safe_level(proc);
- result = rb_yield_0(args, 0, 0);
+ result = rb_yield_0(args, 0, 0, Qtrue);
}
POP_TAG();
@@ -5871,7 +5933,7 @@ struct thread {
VALUE wrapper;
VALUE trace;
- int misc; /* misc. states (vmode/rb_trap_immediate) */
+ int flags; /* misc. states (vmode/rb_trap_immediate/raised) */
char *file;
int line;
@@ -5896,6 +5958,8 @@ struct thread {
VALUE thread;
};
+#define THREAD_RAISED 0x200
+
static thread_t curr_thread = 0;
static int num_waiting_on_fd = 0;
static int num_waiting_on_timer = 0;
@@ -5954,17 +6018,22 @@ thread_mark(th)
frame = th->frame;
while (frame && frame != top_frame) {
frame = ADJ(frame);
- if (frame->argv && !STACK(frame->argv)) {
- rb_gc_mark_frame(frame);
+ rb_gc_mark_frame(frame);
+ if (frame->tmp) {
+ struct FRAME *tmp = ADJ(frame->tmp);
+
+ while (tmp && tmp != top_frame) {
+ tmp = ADJ(tmp);
+ rb_gc_mark_frame(tmp);
+ tmp = tmp->prev;
+ }
}
frame = frame->prev;
}
block = th->block;
while (block) {
block = ADJ(block);
- if (block->frame.argv && !STACK(block->frame.argv)) {
- rb_gc_mark_frame(&block->frame);
- }
+ rb_gc_mark_frame(&block->frame);
block = block->prev;
}
}
@@ -6025,7 +6094,7 @@ rb_thread_save_context(th)
th->wrapper = ruby_wrapper;
th->dyna_vars = ruby_dyna_vars;
th->block = ruby_block;
- th->misc = scope_vmode | (rb_trap_immediate<<8);
+ th->flags = scope_vmode | (rb_trap_immediate<<8);
th->iter = ruby_iter;
th->tag = prot_tag;
th->errinfo = ruby_errinfo;
@@ -6093,8 +6162,8 @@ rb_thread_restore_context(th, exit)
ruby_wrapper = th->wrapper;
ruby_dyna_vars = th->dyna_vars;
ruby_block = th->block;
- scope_vmode = th->misc&SCOPE_MASK;
- rb_trap_immediate = th->misc>>8;
+ scope_vmode = th->flags&SCOPE_MASK;
+ rb_trap_immediate = (th->flags&0x100)?1:0;
ruby_iter = th->iter;
prot_tag = th->tag;
ruby_errinfo = th->errinfo;
@@ -6563,18 +6632,19 @@ rb_thread_join(thread)
{
thread_t th = rb_thread_check(thread);
- if (rb_thread_dead(th)) return thread;
- if (th == curr_thread)
- rb_raise(rb_eThreadError, "recursive join");
- if ((th->wait_for & WAIT_JOIN) && th->join == curr_thread)
- rb_raise(rb_eThreadError, "Thread#join: deadlock");
- curr_thread->status = THREAD_STOPPED;
- curr_thread->join = th;
- num_waiting_on_join++;
- curr_thread->wait_for |= WAIT_JOIN;
- rb_thread_schedule();
+ if (!rb_thread_dead(th)) {
+ if (th == curr_thread)
+ rb_raise(rb_eThreadError, "recursive join");
+ if ((th->wait_for & WAIT_JOIN) && th->join == curr_thread)
+ rb_raise(rb_eThreadError, "Thread#join: deadlock - mutual join");
+ curr_thread->status = THREAD_STOPPED;
+ curr_thread->join = th;
+ num_waiting_on_join++;
+ curr_thread->wait_for |= WAIT_JOIN;
+ rb_thread_schedule();
+ }
- if (!NIL_P(th->errinfo)) {
+ if (!NIL_P(th->errinfo) && (th->flags & THREAD_RAISED)) {
VALUE oldbt = get_backtrace(th->errinfo);
VALUE errat = make_backtrace();
@@ -6895,6 +6965,7 @@ rb_thread_create_0(fn, arg, klass)
status = th->status;
rb_thread_remove();
if (state && status != THREAD_TO_KILL && !NIL_P(ruby_errinfo)) {
+ th->flags |= THREAD_RAISED;
if (state == TAG_FATAL) {
/* fatal error within this thread, need to stop whole script */
main_thread->errinfo = ruby_errinfo;
@@ -6904,14 +6975,14 @@ rb_thread_create_0(fn, arg, klass)
/* delegate exception to main_thread */
rb_thread_raise(1, &ruby_errinfo, main_thread->thread);
}
- else if (thread_abort || curr_thread->abort || RTEST(ruby_debug)) {
+ else if (thread_abort || th->abort || RTEST(ruby_debug)) {
VALUE err = rb_exc_new(rb_eSystemExit, 0, 0);
error_print();
/* exit on main_thread */
rb_thread_raise(1, &err, main_thread->thread);
}
else {
- curr_thread->errinfo = ruby_errinfo;
+ th->errinfo = ruby_errinfo;
}
}
rb_thread_schedule();
@@ -6938,7 +7009,7 @@ rb_thread_yield(arg, th)
thread_t th;
{
scope_dup(ruby_block->scope);
- return rb_yield_0(th->thread, 0, 0);
+ return rb_yield_0(th->thread, 0, 0, Qfalse);
}
static VALUE
@@ -6969,7 +7040,8 @@ rb_thread_status(thread)
thread_t th = rb_thread_check(thread);
if (rb_thread_dead(th)) {
- if (NIL_P(th->errinfo)) return Qfalse;
+ if (NIL_P(th->errinfo) && (th->flags & THREAD_RAISED))
+ return Qfalse;
return Qnil;
}
@@ -7320,7 +7392,7 @@ rb_f_catch(dmy, tag)
t = rb_to_id(tag);
PUSH_TAG(t);
if ((state = EXEC_TAG()) == 0) {
- val = rb_yield_0(tag, 0, 0);
+ val = rb_yield_0(tag, 0, 0, Qfalse);
}
else if (state == TAG_THROW && t == prot_tag->dst) {
val = prot_tag->retval;
diff --git a/ext/Setup.emx b/ext/Setup.emx
new file mode 100644
index 0000000000..dbb4b7a61c
--- /dev/null
+++ b/ext/Setup.emx
@@ -0,0 +1,16 @@
+option nodynamic
+
+#Win32API
+curses
+#dbm
+etc
+fcntl
+#gdbm
+md5
+nkf
+#pty
+#readline
+#sdbm
+socket
+#tcltklib
+#tk
diff --git a/ext/Setup.nt b/ext/Setup.nt
index b469709585..4d9244ef6f 100644
--- a/ext/Setup.nt
+++ b/ext/Setup.nt
@@ -1,12 +1,19 @@
option nodynamic
#GD
+Win32API
#curses
#dbm
#etc
fcntl
-kconv
-#marshal
+#gdbm
+#gtk
+marshal
md5
+nkf
+#pty
+#readline
+sdbm
socket
-#tkutil
+#tcltklib
+#tk
diff --git a/ext/cygwin32_ld.rb b/ext/cygwin32_ld.rb
deleted file mode 100644
index a9c8e21cb0..0000000000
--- a/ext/cygwin32_ld.rb
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/local/bin/ruby
-require '../../rbconfig'
-include Config
-
-args = ARGV.join(" ")
-
-objs = []
-flags = []
-libname = ''
-Init = "../init"
-
-path = ''
-
-def writeInit
- out = open("#{Init}.c", "w")
-
- out.print %q@
-#include <windows.h>
-#include <stdio.h>
-
-extern struct _reent *__imp_reent_data;
-WINAPI dll_entry(int a, int b, int c)
-{
- _impure_ptr =__imp_reent_data;
- return 1;
-}
-main(){}
-//void impure_setup(struct _reent *_impure_ptrMain)
-//{
-// _impure_ptr =__imp_reent_data;
-//}
-@
- out.close
-end
-
-def xsystem cmd
- print cmd, "\n"
- system cmd
-end
-
-if args =~ /-o (\w+)\.dll/i
- libname = $1
- # Check for path:
- if libname =~ /(\w+\/)(\w+)$/
- path = $1
- libname = $2
- end
- for arg in ARGV
- case arg
- when /\.[oa]$/i
- objs.push(arg)
- when /-o/, /\w+\.dll/i
- ;
- else
- flags << arg
- end
- end
-
- writeInit unless FileTest.exist?("#{Init}.c")
- unless FileTest.exist?("#{Init}.o") and
- File.mtime("#{Init}.c") < File.mtime("#{Init}.o")
- xsystem "gcc -c #{Init}.c -o #{Init}.o"
- end
-
- command = "echo EXPORTS > #{libname}.def"
- xsystem command
-# xsystem "echo impure_setup >> #{libname}.def"
- xsystem "nm --extern-only " + objs.join(" ") +
- " | sed -n '/^........ [CDT] _/s///p' >> #{libname}.def"
-
- command = "gcc -nostdlib -o junk.o -Wl,--base-file,#{libname}.base,--dll " +
- objs.join(" ") + " #{Init}.o "
- command.concat(flags.join(" ") +
- " -Wl,-e,_dll_entry@12 -lcygwin -lkernel32 #{CONFIG['srcdir']}/libruby.a")
- xsystem command
-
- command = "dlltool --as=as --dllname #{libname}.dll --def #{libname}.def --base-file #{libname}.base --output-exp #{libname}.exp"
- xsystem command
-
- command = "gcc -s -nostdlib -o #{libname}.dll -Wl,--dll #{libname}.exp " +
- objs.join(" ") + " #{Init}.o "
- command.concat(flags.join(" ") +
- " -Wl,-e,_dll_entry@12 -lcygwin -lkernel32 #{CONFIG['srcdir']}/libruby.a")
- xsystem command
- File.unlink "junk.o" if FileTest.exist? "junk.o"
-
-else
- # no special processing, just call ld
- xsystem "ld #{args}"
-end
diff --git a/ext/etc/etc.txt b/ext/etc/etc.txt
new file mode 100644
index 0000000000..9801dc0e02
--- /dev/null
+++ b/ext/etc/etc.txt
@@ -0,0 +1,72 @@
+.\" etc.doc - -*- Indented-Text -*- created at: Fri Jul 14 00:47:15 JST 1995
+
+** Etc(Module)
+
+The module to retrieve information under /etc directory. Available
+only on UNIX platforms. All operations defined in this module are
+module functions, so that you can include Etc module into your class.
+
+Module Function:
+
+ getlogin
+
+ returns login name of the user. It this fails, try getpwuid().
+
+ getpwnam(name)
+
+ searches in /etc/passwd file (or equivalent database), and
+ returns password entry for the user. The return value is an
+ passwd structure, which has members described below.
+
+ struct passwd
+ name # user name(string)
+ passwd # encrypted password(string)
+ uid # user ID(integer)
+ gid # group ID(integer)
+ gecos # gecos field(string)
+ dir # home directory(string)
+ shell # login shell(string)
+ # members below are optional
+ change # password change time(integer)
+ quota # quota value(integer)
+ age # password age(integer)
+ class # user access class(string)
+ comment # comment(string)
+ expire # account expiration time(integer)
+ end
+
+ See getpwnam(3) for detail.
+
+ getpwuid([uid])
+
+ returns passwd entry for the specified user id. If uid is
+ ommitted, use the value from getuid(). See getpwuid(3) for
+ detail.
+
+ getgrgid(gid)
+
+ searches in /etc/group file (or equivalent database), and
+ returns group entry for the group id. The return value is an
+ group structure, which has members described below.
+
+ struct group
+ name # group name(string)
+ passwd # group password(string)
+ gid # group ID(integer)
+ mem # array of the group member names
+ end
+
+ See getgrgid(3) for detail.
+
+ getgrnam(name)
+
+ returns the group entry for the specified name. The return
+ value is the group structure. See getgrnam(3) for detail.
+
+ group
+
+ iterates over all group entries.
+
+ passwd
+
+ iterates over all passwd entries.
diff --git a/ext/etc/etc.doc b/ext/etc/etc.txt.jp
index 2af895c9de..8191f4886b 100644
--- a/ext/etc/etc.doc
+++ b/ext/etc/etc.txt.jp
@@ -5,8 +5,7 @@
/etc¥Ç¥£¥ì¥¯¥È¥ê°Ê²¼¤Î¾ğÊó¤òÆÀ¤ë¤¿¤á¤Î¥â¥¸¥å¡¼¥ë¡¥¥¯¥é¥¹¤Ë¥¤¥ó¥¯¥ë¡¼¥É
¤·¤Æ»È¤¦¤³¤È¤â¤Ç¤­¤ë¡¥
-Methods:
-Single Methods:
+Module Function:
getlogin
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 3514ab2503..cb4b974351 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -29,7 +29,10 @@ end
# get absolute path
$topdir = File.expand_path("..")
-load "#{$top_srcdir}/lib/find.rb"
+$:.push $top_srcdir
+$:.push $top_srcdir+"/lib"
+
+require 'find'
if File.exist?("config.cache") then
f = open("config.cache", "r")
@@ -64,8 +67,8 @@ if RUBY_PLATFORM == "m68k-human"
else
CFLAGS = "@CFLAGS@"
end
-LINK = "@CC@ -o conftest -I#$topdir -I#$top_srcdir -I@includedir@ #{CFLAGS} @LDFLAGS@ %s %s conftest.c %s %s @LIBS@"
-CPP = "@CPP@ @CPPFLAGS@ -I#$topdir -I#$top_srcdir -I@includedir@ #{CFLAGS} %s %s conftest.c"
+LINK = "@CC@ -o conftest -I#$topdir -I#$top_srcdir #{CFLAGS} -I@includedir@ @LDFLAGS@ %s %s conftest.c %s %s @LIBS@"
+CPP = "@CPP@ @CPPFLAGS@ -I#$topdir -I#$top_srcdir #{CFLAGS} -I@includedir@ %s %s conftest.c"
if /cygwin|mswin32|djgpp|mingw32|m68k-human|i386-os2_emx/i =~ RUBY_PLATFORM
$null = open("nul", "w")
@@ -180,10 +183,28 @@ def have_library(lib, func="main")
if func && func != ""
libs = append_library($libs, lib)
- unless try_link(<<"SRC", libs)
+ if /mswin32/ =~ RUBY_PLATFORM
+ r = try_link(<<"SRC", libs)
+#include <windows.h>
+#include <winsock.h>
+int main() { return 0; }
+int t() { #{func}(); return 0; }
+SRC
+ unless r
+ r = try_link(<<"SRC", libs)
+#include <windows.h>
+#include <winsock.h>
+int main() { return 0; }
+int t() { void ((*p)()); p = (void ((*)()))#{func}; return 0; }
+SRC
+ end
+ else
+ r = try_link(<<"SRC", libs)
int main() { return 0; }
int t() { #{func}(); return 0; }
SRC
+ end
+ unless r
$lib_cache[lib] = 'no'
$cache_mod = true
return false
@@ -200,7 +221,7 @@ end
def find_library(lib, func, *paths)
ldflags = $LDFLAGS
- libs = "-l" + lib + " " + $libs
+ libs = append_library($libs, lib)
until try_link(<<"SRC", libs)
int main() { return 0; }
int t() { #{func}(); return 0; }
@@ -227,11 +248,28 @@ def have_func(func)
libs = $libs
- unless try_link(<<"SRC", libs)
-char #{func}();
+ if /mswin32/ =~ RUBY_PLATFORM
+ r = try_link(<<"SRC", libs)
+#include <windows.h>
+#include <winsock.h>
+int main() { return 0; }
+int t() { #{func}(); return 0; }
+SRC
+ unless r
+ r = try_link(<<"SRC", libs)
+#include <windows.h>
+#include <winsock.h>
+int main() { return 0; }
+int t() { void ((*p)()); p = (void ((*)()))#{func}; return 0; }
+SRC
+ end
+ else
+ r = try_link(<<"SRC", libs)
int main() { return 0; }
int t() { #{func}(); return 0; }
SRC
+ end
+ unless r
$func_cache[func] = 'no'
$cache_mod = true
return false
@@ -270,7 +308,10 @@ end
def arg_config(config, default=nil)
unless defined? $configure_args
$configure_args = {}
- for arg in "@configure_args@".split
+ if /mswin32/ =~ RUBY_PLATFORM and ENV["CONFIGURE_ARGS"]
+ args = args + " " + ENV["CONFIGURE_ARGS"]
+ end
+ for arg in args.split
next unless /^--/ =~ arg
if /=/ =~ arg
$configure_args[$`] = $'
@@ -330,11 +371,13 @@ def dir_config(target)
end
def create_makefile(target)
+ $target = target
+
system "rm -f conftest*"
if "@DLEXT@" == $OBJEXT
libs = $libs.split
for lib in libs
- lib.sub!(/-l(.*)/, '"lib\1.a"')
+ lib.sub!(/-l(.*)/, '"lib\1.#{$LIBEXT}"')
end
$defs.push(format("-DEXTLIB='%s'", libs.join(",")))
end
@@ -371,7 +414,7 @@ DESTDIR =
CC = @CC@
-CFLAGS = %s -I$(topdir) -I$(hdrdir) -I@includedir@ #{CFLAGS} #$CFLAGS %s
+CFLAGS = %s -I$(topdir) -I$(hdrdir) #{CFLAGS} #$CFLAGS -I@includedir@ %s
DLDFLAGS = #$DLDFLAGS #$LDFLAGS
LDSHARED = @LDSHARED@ #{defflag}
", if $static then "" else "@CCDLFLAGS@" end, $defs.join(" ")
@@ -405,17 +448,24 @@ archdir = $(pkglibdir)/@arch@
mfile.printf $objs.join(" ")
mfile.printf "\n"
+ ruby_interpreter = "$(topdir)/miniruby@EXEEXT@"
+ if /mswin32/ =~ RUBY_PLATFORM
+ ruby_interpreter = $topdir + "/miniruby@EXEEXT@"
+ ruby_interpreter.gsub!("/", "\\")
+ end
+
mfile.printf <<EOS
TARGET = #{target}
-DLLIB = $(TARGET).#{$static ? "a" : "@DLEXT@"}
+DLLIB = $(TARGET).#{$static ? $LIBEXT : "@DLEXT@"}
-RUBY = ../../miniruby@EXEEXT@
+RUBY = #{ruby_interpreter} -I$(topdir) -I$(hdrdir)/lib
EXEEXT = @EXEEXT@
all: $(DLLIB)
-clean:; @rm -f *.#{$OBJEXT} *.so *.sl *.a $(DLLIB)
+clean:; @rm -f *.#{$OBJEXT} *.so *.sl *.#{$LIBEXT} $(DLLIB)
+ @rm -f *.ilk *.exp *.pdb *.bak
@rm -f Makefile extconf.h conftest.*
@rm -f core ruby$(EXEEXT) *~
@@ -436,11 +486,18 @@ EOS
mfile.printf "\n"
if $static
- mfile.printf "\
+ if "@AR@" =~ /^lib\b/i
+ mfile.printf "\
+$(DLLIB): $(OBJS)
+ @AR@ /OUT:$(DLLIB) $(OBJS)
+"
+ else
+ mfile.printf "\
$(DLLIB): $(OBJS)
@AR@ cru $(DLLIB) $(OBJS)
@-@RANLIB@ $(DLLIB) 2> /dev/null || true
"
+ end
elsif "@DLEXT@" != $OBJEXT
mfile.printf "\
$(DLLIB): $(OBJS)
@@ -494,14 +551,16 @@ def extmake(target)
end
$OBJEXT = "@OBJEXT@"
+ $LIBEXT = "a"
$objs = nil
$local_flags = ""
case RUBY_PLATFORM
when /cygwin|beos|openstep|nextstep|rhapsody/
$libs = ""
when /mswin32/
+ $LIBEXT = "lib"
$libs = ""
- $local_flags = "rubymw.lib -link /LIBPATH:$(topdir) /EXPORT:Init_$(TARGET)"
+ $local_flags = "$(topdir)/rubymw.lib -link /EXPORT:Init_$(TARGET)"
else
$libs = "-lc"
end
@@ -526,16 +585,20 @@ def extmake(target)
begin
system "mkdir", target unless File.directory?(target)
Dir.chdir target
+ $target = target
$mdir = target
unless $install or $clean
if $static_ext.size > 0 ||
!File.exist?("./Makefile") ||
older("./Makefile", "#{$top_srcdir}/ext/@setup@") ||
older("./Makefile", "../extmk.rb") ||
+ older("./Makefile", "#{$top_srcdir}/ext/#{target}/makefile.rb") ||
older("./Makefile", "#{$top_srcdir}/ext/#{target}/extconf.rb")
then
$defs = []
- if File.exist?("#{$top_srcdir}/ext/#{target}/extconf.rb")
+ if File.exist?("#{$top_srcdir}/ext/#{target}/makefile.rb")
+ load "#{$top_srcdir}/ext/#{target}/makefile.rb"
+ elsif File.exist?("#{$top_srcdir}/ext/#{target}/extconf.rb")
load "#{$top_srcdir}/ext/#{target}/extconf.rb"
else
create_makefile(target)
@@ -544,7 +607,7 @@ def extmake(target)
end
if File.exist?("./Makefile")
if $static
- $extlist.push [$static,target]
+ $extlist.push [$static,$target]
end
if $install
system "#{$make} install DESTDIR=#{$destdir}"
@@ -582,7 +645,9 @@ for setup in ["@setup@", "#{$top_srcdir}/ext/@setup@"]
$nodynamic = true
next
end
- $static_ext[$_.split[0]] = true
+ target = $_.split[0]
+ target = target.downcase if /mswin32/ =~ RUBY_PLATFORM
+ $static_ext[target] = true
end
f.close
break
@@ -630,7 +695,7 @@ miniruby = "miniruby@EXEEXT@"
$extobjs = "" unless $extobjs
if $extlist.size > 0
for s,t in $extlist
- f = format("%s/%s.a", s, t)
+ f = format("%s/%s.%s", s, t, $LIBEXT)
if File.exist?(f)
$extinit += format("\
\tInit_%s();\n\
diff --git a/ext/md5/md5.txt b/ext/md5/md5.txt
new file mode 100644
index 0000000000..0eca7c9025
--- /dev/null
+++ b/ext/md5/md5.txt
@@ -0,0 +1,38 @@
+.\" md5.doc - -*- Indented-Text -*- created at: Fri Aug 2 12:01:27 JST 1996
+
+** MD5(Class)
+
+A class to implement MD5 Message-Digest Algorithm by RSA Data
+Security, Inc., described in RFC1321.
+
+SuperClass: Object
+
+Class Methods:
+
+ new([str])
+ md5([str])
+
+ creates a new MD5 object. If a string argument is given, it
+ is added to the object. (see update.)
+
+Methods:
+
+ clone
+
+ copies the MD5 object.
+
+ digest
+
+ returns have value of the added strings as a 16 bytes string.
+
+ update(str)
+
+ Update the MD5 object with the string. Repeated calls are
+ equivalent to a single call with the concatenation of all the
+ arguments, i.e. m.update(a); m.update(b) is equivalent to
+ m.update(a+b).
+
+-------------------------------------------------------
+Local variables:
+fill-column: 70
+end:
diff --git a/ext/md5/md5.doc b/ext/md5/md5.txt.jp
index 2203404602..a1451f1175 100644
--- a/ext/md5/md5.doc
+++ b/ext/md5/md5.txt.jp
@@ -28,7 +28,8 @@ Methods:
update(str)
- key¤ò¥­¡¼¤È¤¹¤ëÃͤòÊÖ¤¹¡¥
+ MD5¥ª¥Ö¥¸¥§¥¯¥È¤Ëʸ»úÎó¤òÄɲ乤롣ʣ¿ô²óupdate¤ò¸Æ¤Ö¤³¤È¤Ïʸ
+ »úÎó¤òÏ¢·ë¤·¤Æupdate¤ò¸Æ¤Ö¤³¤È¤ÈÅù¤·¤¤¡¥
-------------------------------------------------------
Local variables:
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 90964663d1..93a8aacce3 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -394,19 +394,13 @@ s_recv(sock, argc, argv, from)
case RECV_RECV:
return (VALUE)str;
case RECV_TCP:
+ case RECV_UDP:
#if 0
if (alen != sizeof(struct sockaddr_in)) {
rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
}
#endif
return rb_assoc_new(str, ipaddr((struct sockaddr *)buf));
- case RECV_UDP:
- {
- VALUE addr = ipaddr((struct sockaddr *)buf);
-
- return rb_assoc_new(str, rb_assoc_new(RARRAY(addr)->ptr[2],
- RARRAY(addr)->ptr[1]));
- }
#ifdef HAVE_SYS_UN_H
case RECV_UNIX:
return rb_assoc_new(str, unixaddr((struct sockaddr_un *)buf));
diff --git a/ext/tcltklib/extconf.rb b/ext/tcltklib/extconf.rb
index ec06f8b245..e1086855ba 100644
--- a/ext/tcltklib/extconf.rb
+++ b/ext/tcltklib/extconf.rb
@@ -39,8 +39,8 @@ def find_tk(tklib)
end
if have_header("tcl.h") && have_header("tk.h") &&
- find_library("X11", "XOpenDisplay",
- "/usr/X11/lib", "/usr/X11R6/lib", "/usr/openwin/lib") &&
+ (/mswin32/ =~ RUBY_PLATFORM || find_library("X11", "XOpenDisplay",
+ "/usr/X11/lib", "/usr/X11R6/lib", "/usr/openwin/lib")) &&
find_tcl(tcllib) &&
find_tk(tklib)
create_makefile("tcltklib")
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c
index 314246869e..b1dae089db 100644
--- a/ext/tcltklib/tcltklib.c
+++ b/ext/tcltklib/tcltklib.c
@@ -4,6 +4,10 @@
* Oct. 24, 1997 Y. Matsumoto
*/
+#if defined(NT)
+# include <windows.h>
+#endif
+
#include <stdio.h>
#include <string.h>
#include <tcl.h>
diff --git a/file.c b/file.c
index d9107a1757..d2b61b4a88 100644
--- a/file.c
+++ b/file.c
@@ -160,6 +160,9 @@ rb_stat(file, st)
return fstat(fileno(fptr->f), st);
}
Check_SafeStr(file);
+#if defined DJGPP
+ if (RSTRING(file)->len == 0) return -1;
+#endif
return stat(RSTRING(file)->ptr, st);
}
@@ -1045,14 +1048,10 @@ rb_file_s_umask(argc, argv)
#endif /* USE_CWGUSI */
}
-#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__)
-#define DOSISH 1
-#endif
-
#if defined DOSISH
-#define ispathsep(x) ((x) == '/' || (x) == '\\')
+#define isdirsep(x) ((x) == '/' || (x) == '\\')
#else
-#define ispathsep(x) ((x) == '/')
+#define isdirsep(x) ((x) == '/')
#endif
VALUE
@@ -1069,7 +1068,7 @@ rb_file_s_expand_path(argc, argv)
s = STR2CSTR(fname);
p = buf;
if (s[0] == '~') {
- if (ispathsep(s[1]) || s[1] == '\0') {
+ if (isdirsep(s[1]) || s[1] == '\0') {
char *dir = getenv("HOME");
if (!dir) {
@@ -1084,7 +1083,7 @@ rb_file_s_expand_path(argc, argv)
struct passwd *pwPtr;
s++;
#endif
- while (*s && !ispathsep(*s)) {
+ while (*s && !isdirsep(*s)) {
*p++ = *s++;
}
*p = '\0';
@@ -1101,8 +1100,9 @@ rb_file_s_expand_path(argc, argv)
}
}
#if defined DOSISH
- else if (isalpha(s[0]) && s[1] == ':' && ispathsep(s[2])) {
- while (*s && !ispathsep(*s)) {
+ /* skip drive letter */
+ else if (isalpha(s[0]) && s[1] == ':' && isdirsep(s[2])) {
+ while (*s && !isdirsep(*s)) {
*p++ = *s++;
}
}
@@ -1130,10 +1130,10 @@ rb_file_s_expand_path(argc, argv)
if (*(s+1)) {
switch (*++s) {
case '.':
- if (*(s+1) == '\0' || ispathsep(*(s+1))) {
+ if (*(s+1) == '\0' || isdirsep(*(s+1))) {
/* We must go back to the parent */
- if (ispathsep(*p) && p > buf) p--;
- while (p > buf && !ispathsep(*p)) p--;
+ if (isdirsep(*p) && p > buf) p--;
+ while (p > buf && !isdirsep(*p)) p--;
}
else {
*++p = '.';
@@ -1144,7 +1144,7 @@ rb_file_s_expand_path(argc, argv)
#if defined DOSISH
case '\\':
#endif
- if (!ispathsep(*p)) *++p = '/';
+ if (!isdirsep(*p)) *++p = '/';
break;
default:
*++p = '.'; *++p = *s; break;
@@ -1155,14 +1155,14 @@ rb_file_s_expand_path(argc, argv)
#if defined DOSISH
case '\\':
#endif
- if (!ispathsep(*p)) *++p = '/'; break;
+ if (!isdirsep(*p)) *++p = '/'; break;
default:
*++p = *s;
}
}
/* Place a \0 at end. If path ends with a "/", delete it */
- if (p == buf || !ispathsep(*p)) p++;
+ if (p == buf || !isdirsep(*p)) p++;
*p = '\0';
return rb_tainted_str_new2(buf);
@@ -1612,7 +1612,12 @@ Init_File()
rb_define_singleton_method(rb_cFile, "split", rb_file_s_split, 1);
rb_define_singleton_method(rb_cFile, "join", rb_file_s_join, -2);
- rb_define_const(rb_cFile, "PATH_SEPARATOR", rb_str_new2(RUBY_PATH_SEP));
+#ifdef DOSISH
+ rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_str_new2("\\");
+#else
+ rb_define_const(rb_cFile, "ALT_SEPARATOR", Qnil);
+#endif
+ rb_define_const(rb_cFile, "PATH_SEPARATOR", rb_str_new2(PATH_SEP));
rb_define_method(rb_cIO, "stat", rb_io_stat, 0); /* this is IO's method */
rb_define_method(rb_cFile, "lstat", rb_file_lstat, 0);
diff --git a/gc.c b/gc.c
index f5c03081f0..ce668cf4df 100644
--- a/gc.c
+++ b/gc.c
@@ -906,7 +906,10 @@ rb_gc()
/* mark frame stack */
for (frame = ruby_frame; frame; frame = frame->prev) {
- rb_gc_mark_frame(frame);
+ rb_gc_mark_frame(frame);
+ }
+ for (frame = ruby_frame; frame; frame = frame->prev) {
+ if (frame->tmp) rb_gc_mark_frame(frame->tmp);
}
rb_gc_mark(ruby_class);
rb_gc_mark(ruby_scope);
diff --git a/hash.c b/hash.c
index 68e90fe8dc..608f85d72f 100644
--- a/hash.c
+++ b/hash.c
@@ -68,6 +68,13 @@ rb_hash(obj)
return rb_funcall(obj, hash, 0);
}
+static VALUE
+eql(args)
+ VALUE *args;
+{
+ return (VALUE)rb_eql(args[0], args[1]);
+}
+
static int
rb_any_cmp(a, b)
VALUE a, b;
@@ -78,11 +85,13 @@ rb_any_cmp(a, b)
else if (TYPE(a) == T_STRING) {
if (TYPE(b) == T_STRING) return rb_str_cmp(a, b);
}
+ else {
+ VALUE args[2];
- DEFER_INTS;
- a = !rb_eql(a, b);
- ENABLE_INTS;
- return a;
+ args[0] = a;
+ args[1] = b;
+ return !rb_with_disable_interrupt(eql, (VALUE)args);
+ }
}
static int
@@ -944,7 +953,7 @@ rb_path_check(path)
char *path;
{
char *p, *pend;
- const char sep = RUBY_PATH_SEP[0];
+ const char sep = PATH_SEP_CHAR;
if (!path) return 1;
diff --git a/io.c b/io.c
index 5be3e40abd..1344f9e5dc 100644
--- a/io.c
+++ b/io.c
@@ -907,10 +907,6 @@ rb_io_fptr_close(fptr)
}
else {
fptr_finalize(fptr);
- if (fptr->pid) {
- rb_syswait(fptr->pid);
- fptr->pid = 0;
- }
}
fptr->f = fptr->f2 = NULL;
rb_thread_fd_close(fd);
@@ -935,6 +931,10 @@ rb_io_close(io)
GetOpenFile(io, fptr);
rb_io_fptr_close(fptr);
+ if (fptr->pid) {
+ rb_syswait(fptr->pid);
+ fptr->pid = 0;
+ }
return Qnil;
}
diff --git a/lib/debug.rb b/lib/debug.rb
index 78a0ce245e..91bad1f1c9 100644
--- a/lib/debug.rb
+++ b/lib/debug.rb
@@ -68,7 +68,7 @@ class DEBUGGER__
end
case input
- when /^b(?:reak)?\s+((?:[^:\n]+:)?.+)/
+ when /^b(?:reak)?\s+((?:[^:\n]+:)?.+)$/
pos = $1
if pos.index(":")
file, pos = pos.split(":")
@@ -84,7 +84,7 @@ class DEBUGGER__
STDOUT.printf "Set breakpoint %d at %s:%s\n", @break_points.size, file,
pname
- when /^wat(?:ch)?\s+((?:[^:\n]+:)?.+)$/
+ when /^wat(?:ch)?\s+(.+)$/
exp = $1
@break_points.push [true, 1, exp]
STDOUT.printf "Set watchpoint %d\n", @break_points.size, exp
@@ -154,10 +154,10 @@ class DEBUGGER__
end
end
- when /^co(?:nt)?$/
+ when /^c(?:ont)?$/
return
- when /^s(?:tep)?\s*(\d+)?$/
+ when /^s(?:tep)?\s+(\d+)?$/
if $1
lev = $1.to_i
else
@@ -166,7 +166,7 @@ class DEBUGGER__
@stop_next = lev
return
- when /^n(?:ext)?\s*(\d+)?$/
+ when /^n(?:ext)?\s+(\d+)?$/
if $1
lev = $1.to_i
else
@@ -221,7 +221,7 @@ class DEBUGGER__
STDOUT.printf "no sourcefile available for %s\n", binding_file
end
- when /^up\s*(\d+)?$/
+ when /^up\s+(\d+)?$/
previus_line = nil
if $1
lev = $1.to_i
@@ -237,7 +237,7 @@ class DEBUGGER__
info, binding_file, binding_line = frame_info(frame_pos)
STDOUT.printf "#%d %s\n", frame_pos, info
- when /^down\s*(\d+)?$/
+ when /^down\s+(\d+)?$/
previus_line = nil
if $1
lev = $1.to_i
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index a3f2a8e6fe..50920a0cda 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -58,8 +58,8 @@ if /win32|djgpp|mingw32|m68k-human|i386-os2_emx/i =~ RUBY_PLATFORM
else
$null = open("/dev/null", "w")
end
-LINK = "#{CONFIG['CC']} -o conftest -I#{$hdrdir} -I#{CONFIG['includedir']} #{CFLAGS} %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}"
-CPP = "#{CONFIG['CPP']} -E -I#{$hdrdir} -I#{CONFIG['includedir']} #{CFLAGS} %s %s conftest.c"
+LINK = "#{CONFIG['CC']} -o conftest -I#{$hdrdir} #{CFLAGS} -I#{CONFIG['includedir']} %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}"
+CPP = "#{CONFIG['CPP']} -E -I#{$hdrdir} #{CFLAGS} -I#{CONFIG['includedir']} %s %s conftest.c"
$orgerr = $stderr.dup
$orgout = $stdout.dup
@@ -216,7 +216,7 @@ def find_library(lib, func, *paths)
STDOUT.flush
ldflags = $LDFLAGS
- libs = "-l" + lib + " " + $libs
+ libs = append_library($libs, lib)
until try_link(<<"SRC", libs)
int main() { return 0; }
int t() { #{func}(); return 0; }
@@ -427,7 +427,7 @@ hdrdir = #{$hdrdir}
CC = #{CONFIG["CC"]}
-CFLAGS = #{CONFIG["CCDLFLAGS"]} -I$(hdrdir) -I#{CONFIG["includedir"]} #{CFLAGS} #{$CFLAGS} #{$defs.join(" ")}
+CFLAGS = #{CONFIG["CCDLFLAGS"]} -I$(hdrdir) #{CFLAGS} #{$CFLAGS} -I#{CONFIG["includedir"]} #{$defs.join(" ")}
CXXFLAGS = $(CFLAGS)
DLDFLAGS = #{$DLDFLAGS} #{$LDFLAGS}
LDSHARED = #{CONFIG["LDSHARED"]} #{defflag}
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index 9116e73e7d..61c6d9378b 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -639,7 +639,7 @@ An end of a defun is found by moving forward from the beginning of one."
(defvar ruby-font-lock-keywords
(list
(cons (concat
- "\\(^\\|[^_:.]\\|\\.\\.\\)\\b\\("
+ "\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\("
(mapconcat
'identity
'("alias"
@@ -679,7 +679,7 @@ An end of a defun is found by moving forward from the beginning of one."
"while"
)
"\\|")
- "\\)\\b")
+ "\\)\\>[^_]")
2)
;; variables
'("\\b\\(nil\\|self\\|true\\|false\\)\\b"
diff --git a/object.c b/object.c
index 319abd3793..9c5163a248 100644
--- a/object.c
+++ b/object.c
@@ -465,8 +465,12 @@ rb_mod_clone(module)
clone->super = RCLASS(module)->super;
clone->iv_tbl = 0;
clone->m_tbl = 0; /* avoid GC crashing */
- clone->iv_tbl = st_copy(RCLASS(module)->iv_tbl);
- clone->m_tbl = st_copy(RCLASS(module)->m_tbl);
+ if (RCLASS(module)->iv_tbl) {
+ clone->iv_tbl = st_copy(RCLASS(module)->iv_tbl);
+ }
+ if (RCLASS(module)->m_tbl) {
+ clone->m_tbl = st_copy(RCLASS(module)->m_tbl);
+ }
return (VALUE)clone;
}
diff --git a/range.c b/range.c
index 6d6b59c760..7ea8e180cf 100644
--- a/range.c
+++ b/range.c
@@ -134,9 +134,6 @@ range_each(range)
rb_yield(INT2NUM(i));
}
}
- else if (TYPE(b) == T_STRING) {
- rb_str_upto(b, e, EXCL(range));
- }
else { /* generic each */
VALUE v = b;
ID le = EXCL(range)?'<':rb_intern("<=");
diff --git a/ruby.c b/ruby.c
index 5f53da2a18..0ceb227363 100644
--- a/ruby.c
+++ b/ruby.c
@@ -18,7 +18,6 @@
#include "node.h"
#include <stdio.h>
#include <sys/types.h>
-#include <fcntl.h>
#include <ctype.h>
#ifdef __hpux
@@ -185,7 +184,7 @@ static void
addpath(path)
const char *path;
{
- const char sep = RUBY_PATH_SEP[0];
+ const char sep = PATH_SEP_CHAR;
if (path == 0) return;
#if defined(__CYGWIN32__)
diff --git a/ruby.h b/ruby.h
index 25c8fc6e7a..2dcf8cba80 100644
--- a/ruby.h
+++ b/ruby.h
@@ -432,6 +432,8 @@ VALUE rb_ensure _((VALUE(*)(),VALUE,VALUE(*)(),VALUE));
VALUE rb_catch _((const char*,VALUE(*)(),VALUE));
void rb_throw _((const char*,VALUE)) NORETURN;
+VALUE rb_require _((const char*));
+
void ruby_init _((void));
void ruby_options _((int, char**));
void ruby_run _((void));
diff --git a/rubysig.h b/rubysig.h
index a43c166bf2..97de44216b 100644
--- a/rubysig.h
+++ b/rubysig.h
@@ -14,25 +14,27 @@ EXTERN int rb_trap_immediate;
#define TRAP_BEG (rb_trap_immediate=1)
#define TRAP_END (rb_trap_immediate=0)
-extern int rb_prohibit_interrupt;
+EXTERN int rb_prohibit_interrupt;
#define DEFER_INTS {rb_prohibit_interrupt++;}
#define ALLOW_INTS {rb_prohibit_interrupt--; CHECK_INTS;}
#define ENABLE_INTS {rb_prohibit_interrupt--;}
-extern int rb_trap_pending;
+VALUE rb_with_disable_interrupt _((VALUE(*)(),VALUE));
+
+EXTERN int rb_trap_pending;
void rb_trap_restore_mask _((void));
-extern int rb_thread_critical;
+EXTERN int rb_thread_critical;
void rb_thread_schedule _((void));
#if defined(HAVE_SETITIMER) && !defined(__BOW__)
-extern int rb_thread_pending;
+EXTERN int rb_thread_pending;
# define CHECK_INTS if (!rb_prohibit_interrupt) {\
if (rb_trap_pending) rb_trap_exec();\
if (rb_thread_pending && !rb_thread_critical) rb_thread_schedule();\
}
#else
/* pseudo preemptive thread switching */
-extern int rb_thread_tick;
+EXTERN int rb_thread_tick;
#define THREAD_TICK 500
#define CHECK_INTS if (!rb_prohibit_interrupt) {\
if (rb_trap_pending) rb_trap_exec();\
diff --git a/top.sed b/top.sed
index 7c7943e37d..feef9006ba 100644
--- a/top.sed
+++ b/top.sed
@@ -33,11 +33,11 @@ s%@AR@%ar%g
s%@INSTALL_PROGRAM@%${INSTALL}%g
s%@INSTALL_DATA@%${INSTALL} -m 644%g
s%@SET_MAKE@%%g
-s%@LIBOBJS@% crypt.o flock.o vsnprintf.o%g
+s%@LIBOBJS@% crypt.o flock.o fnmatch.o vsnprintf.o%g
s%@ALLOCA@%%g
s%@DEFAULT_KCODE@%%g
s%@EXEEXT@%.exe%g
-s%@OBJEXT@%obj%g
+s%@OBJEXT@%o%g
s%@XLDFLAGS@%%g
s%@DLDFLAGS@%%g
s%@STATIC@%%g
@@ -52,6 +52,7 @@ s%@RUBY_INSTALL_NAME@%ruby%g
s%@LIBRUBY@%libruby.a%g
s%@LIBRUBY_A@%libruby.a%g
s%@LIBRUBYARG@%libruby.a%g
+s%@LIBRUBY_SO@%%g
s%@SOLIBS@%%g
s%@arch@%i386-djgpp%g
s%/bin/rm%rm%
diff --git a/util.c b/util.c
index f328b2f6aa..04b3dd6dbe 100644
--- a/util.c
+++ b/util.c
@@ -113,7 +113,7 @@ int *retlen;
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#if defined(HAVE_FCNTL)
+#if defined(HAVE_FCNTL_H)
#include <fcntl.h>
#endif
diff --git a/version.h b/version.h
index fc8a918d51..2354f06b1a 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
-#define RUBY_VERSION "1.3.6"
-#define RUBY_RELEASE_DATE "1999-07-28"
-#define RUBY_VERSION_CODE 136
-#define RUBY_RELEASE_CODE 19990728
+#define RUBY_VERSION "1.3.7"
+#define RUBY_RELEASE_DATE "1999-08-06"
+#define RUBY_VERSION_CODE 137
+#define RUBY_RELEASE_CODE 19990806
diff --git a/win32/Makefile b/win32/Makefile
index 4bf3d9be5a..6477476d46 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -14,10 +14,10 @@ AUTOCONF = autoconf
prefix =
CFLAGS = -nologo -DNT=1 -Ox -I. -I./missing
LDFLAGS = $(CFLAGS) -Fm
-#CFLAGS = -nologo -DNT=1 -Zi -MD
-#LDFLAGS = $(CFLAGS) -Fm -MD
+#CFLAGS = -nologo -DNT=1 -Zi -I. -I./missing
+#LDFLAGS = $(CFLAGS) -Fm
XLDFLAGS =
-EXTLIBS =
+#EXTLIBS =
LIBS = advapi32.lib wsock32.lib $(EXTLIBS)
MISSING = crypt.obj alloca.obj win32.obj fnmatch.obj isinf.obj isnan.obj
LDSHARED =
@@ -33,8 +33,10 @@ ORGLIBPATH = $(LIB)
#### End of system configuration section. ####
-
-LIBRUBY = libruby.lib
+LIBRUBY_A = libruby.lib
+LIBRUBY_SO = rubymw.dll
+LIBRUBY = $(LIBRUBY_SO)
+LIBRUBYARG = rubymw.lib
EXTOBJS = dmyext.obj
@@ -54,8 +56,8 @@ OBJS = array.obj \
hash.obj \
inits.obj \
io.obj \
- math.obj \
marshal.obj \
+ math.obj \
numeric.obj \
object.obj \
pack.obj \
@@ -78,41 +80,48 @@ OBJS = array.obj \
version.obj \
$(MISSING)
-all: miniruby$(EXEEXT) rbconfig.rb ext/Setup $(MISCLIBS)
+all: miniruby$(EXEEXT) rbconfig.rb ext/extmk.rb ext/Setup.nt rubymw.lib $(MISCLIBS)
set LIB=..\..\win32;$(ORGLIBPATH)
@.\miniruby$(EXEEXT) -Xext extmk.rb static
+ext/extmk.rb: ext/extmk.rb.in rbconfig.rb
+ @echo Creating ext/extmk.rb
+ @.\miniruby$(EXEEXT) -Xext mswin32_extmk.rb
+
miniruby$(EXEEXT): $(OBJS) $(MAINOBJ) $(EXTOBJS)
@echo $(EXTOBJS)
@echo $(LIBS)
- @rm -f miniruby$(EXEEXT)
+ @rm -f $@
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(OBJS) $(LIBS) -o $@
-$(PROGRAM): $(LIBRUBY) $(MAINOBJ) rubymw.dll
- @rm -f $(PROGRAM)
- $(CC) $(LDFLAGS) $(MAINOBJ) -o $(PROGRAM) rubymw.lib -link /STACK:$(STACK)
+$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(LIBRUBY_SO)
+ @rm -f $@
+ $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) -o $@ $(LIBRUBYARG) -link /STACK:$(STACK)
+
+$(LIBRUBY_A): $(OBJS)
+ lib -nologo /OUT:$@ $(OBJS)
-rubymw.dll: $(LIBRUBY) $(EXTOBJS)
+rubymw.lib: ruby.def
+ lib -nologo /OUT:$@ /DEF:ruby.def
+
+$(LIBRUBY_SO): $(LIBRUBY_A) $(EXTOBJS)
set LIB=.\win32;$(ORGLIBPATH)
- @rm -f rubymw.dll
- $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY) $(LIBS) -o rubymw.dll -link /DLL /DEF:ruby.def
+ @rm -f $@
+ $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY_A) $(LIBS) -o $@ -link /DLL /DEF:ruby.def
@mv rubymw.map rubydll.map
-$(LIBRUBY): $(OBJS)
- lib /OUT:$(LIBRUBY) $(OBJS)
-
install: rbconfig.rb
.\miniruby.exe $(srcdir)/instruby.rb $(DESTDIR)
-clean:; @rm -f $(OBJS) $(LIBRUBY) rbconfig.rb
+clean:; @rm -f $(OBJS) $(LIBRUBY_A) $(MAINOBJ) rbconfig.rb
@rm -f ext/extinit.c ext/extinit.obj ext/vc*.pdb *.obj
- @.\miniruby$(EXEEXT) -Xext extmk.rb clean
+ @-.\miniruby$(EXEEXT) -Xext extmk.rb clean
distclean: clean
@rm -f Makefile ext/extmk.rb config.h
@rm -f ext/config.cache config.cache config.log config.status
@rm -f *~ core *.core gmon.out y.tab.c y.output ruby.imp
- @rm -f *.map rubymw.* ruby.def
+ @rm -f *.map *.pdb *.ilk rubymw.* ruby.def
@rm -f $(PROGRAM) miniruby$(EXEEXT)
realclean: distclean
@@ -131,6 +140,11 @@ config.status: $(srcdir)/configure
.c.obj:
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
+parse.c: parse.y
+ $(YACC) $(YFLAGS) parse.y
+ sed -e "s!^extern char \*getenv();!/* & */!" y.tab.c > parse.c
+ @rm y.tab.c
+
alloca.obj: missing/alloca.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/alloca.c
@@ -140,41 +154,74 @@ crypt.obj: missing/crypt.c
dup2.obj: missing/dup2.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/dup2.c
+finite.obj: missing/finite.c
+ $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/finite.c
+
flock.obj: missing/flock.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/flock.c
+isinf.obj: missing/isinf.c
+ $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/isinf.c
+
+isnan.obj: missing/isnan.c
+ $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/isnan.c
+
+fnmatch.obj: missing/fnmatch.c
+ $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/fnmatch.c
+
+memcmp.obj: missing/memcmp.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/memcmp.c
+
memmove.obj: missing/memmove.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/memmove.c
mkdir.obj: missing/mkdir.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/mkdir.c
-strerror.obj: missing/strerror.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strerror.c
+vsnprintf.obj: missing/vsnprintf.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/vsnprintf.c
+
+strcasecmp.obj: missing/strcasecmp.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strcasecmp.c
+
+strncasecmp.obj: missing/strncasecmp.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strncasecmp.c
+
+strchr.obj: missing/strchr.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strchr.c
strdup.obj: missing/strdup.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strdup.c
+strerror.obj: missing/strerror.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strerror.c
+
strftime.obj: missing/strftime.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/strftime.c
strstr.obj: missing/strstr.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strstr.c
+strtod.obj: missing/strtod.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strtod.c
+
strtol.obj: missing/strtol.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strtol.c
strtoul.obj: missing/strtoul.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strtoul.c
-fnmatch.obj: missing/fnmatch.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/fnmatch.c
+nt.obj: missing/nt.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/nt.c
-isinf.obj: missing/isinf.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/isinf.c
+x68.obj: missing/x68.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/x68.c
-isnan.obj: missing/isnan.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/isnan.c
+os2.obj: missing/os2.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/os2.c
+
+dl_os2.obj: missing/dl_os2.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/dl_os2.c
# when I use -I., there is confliction at "OpenFile"
# so, set . into environment varible "include"
@@ -182,50 +229,45 @@ win32.obj: win32/win32.c
@set include=$(INCLUDE);.
$(CC) $(CFLAGS) $(CPPFLAGS) -c win32/win32.c
-parse.c: parse.y
- $(YACC) $(YFLAGS) parse.y
- sed -e "s!^extern char \*getenv();!/* & */!" y.tab.c > parse.c
- @rm y.tab.c
-
# Prevent GNU make v3 from overflowing arg limit on SysV.
.NOEXPORT:
###
-parse.obj : parse.y ruby.h defines.h config.h env.h node.h st.h regex.h
+parse.obj: parse.y ruby.h config.h defines.h intern.h env.h node.h st.h regex.h util.h lex.c
###
-array.obj: array.c ruby.h config.h defines.h
-bignum.obj: bignum.c ruby.h config.h defines.h
-class.obj: class.c ruby.h config.h defines.h node.h st.h
-compar.obj: compar.c ruby.h config.h defines.h
-dir.obj: dir.c ruby.h config.h defines.h
-dln.obj: dln.c config.h defines.h dln.h st.h
+array.obj: array.c ruby.h config.h defines.h intern.h
+bignum.obj: bignum.c ruby.h config.h defines.h intern.h
+class.obj: class.c ruby.h config.h defines.h intern.h node.h st.h
+compar.obj: compar.c ruby.h config.h defines.h intern.h
+dir.obj: dir.c ruby.h config.h defines.h intern.h
+dln.obj: dln.c config.h defines.h dln.h
dmyext.obj: dmyext.c
-enum.obj: enum.c ruby.h config.h defines.h
-error.obj: error.c ruby.h config.h defines.h env.h
-eval.obj: eval.c ruby.h config.h defines.h env.h node.h rubysig.h st.h dln.h
-file.obj: file.c ruby.h config.h defines.h rubyio.h rubysig.h
-gc.obj: gc.c ruby.h config.h defines.h env.h rubysig.h st.h node.h re.h regex.h
-hash.obj: hash.c ruby.h config.h defines.h st.h
-inits.obj: inits.c ruby.h config.h defines.h
-io.obj: io.c ruby.h config.h defines.h rubyio.h rubysig.h
-main.obj: main.c
-math.obj: math.c ruby.h config.h defines.h
-numeric.obj: numeric.c ruby.h config.h defines.h
-object.obj: object.c ruby.h config.h defines.h st.h
-pack.obj: pack.c ruby.h config.h defines.h
-process.obj: process.c ruby.h config.h defines.h rubysig.h st.h
-random.obj: random.c ruby.h config.h defines.h
-range.obj: range.c ruby.h config.h defines.h
-re.obj: re.c ruby.h config.h defines.h re.h regex.h
-regex.obj: regex.c config.h defines.h regex.h util.h
-ruby.obj: ruby.c ruby.h config.h defines.h re.h regex.h dln.h
-signal.obj: signal.c ruby.h config.h defines.h rubysig.h
-sprintf.obj: sprintf.c ruby.h config.h defines.h
+enum.obj: enum.c ruby.h config.h defines.h intern.h
+error.obj: error.c ruby.h config.h defines.h intern.h env.h
+eval.obj: eval.c ruby.h config.h defines.h intern.h node.h env.h rubysig.h st.h dln.h
+file.obj: file.c ruby.h config.h defines.h intern.h rubyio.h rubysig.h
+gc.obj: gc.c ruby.h config.h defines.h intern.h rubysig.h st.h node.h env.h re.h regex.h
+hash.obj: hash.c ruby.h config.h defines.h intern.h st.h rubysig.h util.h
+inits.obj: inits.c ruby.h config.h defines.h intern.h
+io.obj: io.c ruby.h config.h defines.h intern.h rubyio.h rubysig.h
+main.obj: main.c ruby.h config.h defines.h intern.h
+marshal.obj: marshal.c ruby.h config.h defines.h intern.h rubyio.h st.h
+prec.obj: prec.c ruby.h config.h defines.h intern.h
+math.obj: math.c ruby.h config.h defines.h intern.h
+numeric.obj: numeric.c ruby.h config.h defines.h intern.h
+object.obj: object.c ruby.h config.h defines.h intern.h st.h
+pack.obj: pack.c ruby.h config.h defines.h intern.h
+process.obj: process.c ruby.h config.h defines.h intern.h rubysig.h st.h
+random.obj: random.c ruby.h config.h defines.h intern.h
+range.obj: range.c ruby.h config.h defines.h intern.h
+re.obj: re.c ruby.h config.h defines.h intern.h re.h regex.h
+regex.obj: regex.c config.h regex.h util.h
+ruby.obj: ruby.c ruby.h config.h defines.h intern.h dln.h util.h
+signal.obj: signal.c ruby.h config.h defines.h intern.h rubysig.h
+sprintf.obj: sprintf.c ruby.h config.h defines.h intern.h
st.obj: st.c config.h st.h
-string.obj: string.c ruby.h config.h defines.h re.h regex.h
-struct.obj: struct.c ruby.h config.h defines.h
-time.obj: time.c ruby.h config.h defines.h
-util.obj: util.c defines.h config.h util.h
-variable.obj: variable.c ruby.h config.h defines.h env.h st.h
-version.obj: version.c ruby.h config.h defines.h version.h
-director.obj : director.c dir.h
-prec.obj: prec.c ruby.h config.h defines.h
+string.obj: string.c ruby.h config.h defines.h intern.h re.h regex.h
+struct.obj: struct.c ruby.h config.h defines.h intern.h
+time.obj: time.c ruby.h config.h defines.h intern.h
+util.obj: util.c ruby.h config.h defines.h intern.h util.h
+variable.obj: variable.c ruby.h config.h defines.h intern.h env.h node.h st.h
+version.obj: version.c ruby.h config.h defines.h intern.h version.h
diff --git a/win32/config.h b/win32/config.h
index e723753d74..510d032b37 100644
--- a/win32/config.h
+++ b/win32/config.h
@@ -6,6 +6,7 @@
#define HAVE_STDLIB_H 1
#define HAVE_LIMITS_H 1
#define HAVE_SYS_FILE_H 1
+#define HAVE_FCNTL_H 1
/* #define HAVE_PWD_H 1 */
/* #define HAVE_SYS_TIME_H 1 */
/* #define HAVE_SYS_TIMES_H 1 */
@@ -38,8 +39,8 @@
#define RSHIFT(x,y) ((x)>>y)
#define FILE_COUNT _cnt
#define DLEXT ".dll"
-#define RUBY_LIB ";/usr/local/lib/ruby;."
-#define RUBY_ARCHLIB "/usr/local/lib/ruby/i386-mswin32"
+#define RUBY_LIB "/usr/local/lib/ruby/1.3"
+#define RUBY_ARCHLIB "/usr/local/lib/ruby/1.3/i386-mswin32"
#define RUBY_PLATFORM "i386-mswin32"
#define SIZEOF_INT 4
diff --git a/win32/config.status b/win32/config.status
index a27e054b2a..3bad3185d1 100644
--- a/win32/config.status
+++ b/win32/config.status
@@ -1,12 +1,11 @@
ac_given_srcdir=.
-ac_given_INSTALL="ginstall -c"
s%@SHELL@%%g
s%@CFLAGS@%-nologo -DNT=1 -Ox%g
s%@CPPFLAGS@%%g
s%@CXXFLAGS@%%g
s%@FFLAGS@%%g
s%@DEFS@%
- -DUSE_THREAD -DSIZEOF_INT=4 -DSIZEOF_SHORT=2 -DSIZEOF_LONG=4 -DSIZEOF_VOIDP=4 -DSIZEOF_FLOAT=4 -DSIZEOF_DOUBLE=8 -DHAVE_PROTOTYPES=1 -DHAVE_STDARG_PROTOTYPES=1 -DHAVE_STDLIB_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ST_RDEV=1 -DGETGROUPS_T=int -DRETSIGTYPE=void -DHAVE_ALLOCA=1 -DHAVE_FMOD=1 -DHAVE_WAITPID=1 -DHAVE_GETCWD=1 -DHAVE_CHSIZE=1 -DHAVE_GETGROUPS=1 -DHAVE_GETLOGIN=1 -DRSHIFT=\(x,y\)\ \(\(x\)\>\>y\) -DFILE_COUNT=_cnt -DDLEXT=\".dll\" -DRUBY_LIB=\";/usr/local/lib/ruby;.\" -DRUBY_ARCHLIB=\"/usr/local/lib/ruby/i386-mswin32\" -DRUBY_PLATFORM=\"i386-mswin32\" %g
+ -DUSE_THREAD -DSIZEOF_INT=4 -DSIZEOF_SHORT=2 -DSIZEOF_LONG=4 -DSIZEOF_VOIDP=4 -DSIZEOF_FLOAT=4 -DSIZEOF_DOUBLE=8 -DHAVE_PROTOTYPES=1 -DHAVE_STDARG_PROTOTYPES=1 -DHAVE_STDLIB_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ST_RDEV=1 -DGETGROUPS_T=int -DRETSIGTYPE=void -DHAVE_ALLOCA=1 -DHAVE_FMOD=1 -DHAVE_WAITPID=1 -DHAVE_GETCWD=1 -DHAVE_CHSIZE=1 -DHAVE_GETGROUPS=1 -DHAVE_GETLOGIN=1 -DRSHIFT=\(x,y\)\ \(\(x\)\>\>y\) -DFILE_COUNT=_cnt -DDLEXT=\".dll\" -DRUBY_LIB=\"/usr/local/lib/ruby/1.3\" -DRUBY_ARCHLIB=\"/usr/local/lib/ruby/1.3/i386-mswin32\" -DRUBY_PLATFORM=\"i386-mswin32\" %g
s%@LDFLAGS@%%g
s%@LIBS@%advapi32.lib wsock32.lib%g
s%@exec_prefix@%${prefix}%g
@@ -32,12 +31,8 @@ s%@host_os@%mswin32%g
s%@CC@%cl%g
s%@CPP@%cl -E%g
s%@YACC@%byacc%g
-s%@RANLIB@%%g
-s%@AR@%lib%g
-s%@INSTALL_PROGRAM@%${INSTALL}%g
-s%@INSTALL_SCRIPT@%${INSTALL_PROGRAM}%g
-s%@INSTALL_DATA@%${INSTALL} -m 644%g
-s%@INSTALL_DLLIB@%${INSTALL} -m 555%g
+s%@RANLIB@%rem%g
+s%@AR@%lib -nologo%g
s%@LN_S@%%g
s%@SET_MAKE@%%g
s%@LIBOBJS@% crypt.obj alloca.obj win32.obj fnmatch.obj isinf.obj isnan.obj%g
@@ -53,8 +48,7 @@ s%@LDSHARED@%cl -LD%g
s%@DLEXT@%dll%g
s%@STRIP@%%g
s%@EXTSTATIC@%%g
-s%@binsuffix@%.exe%g
-s%@setup@%Setup%g
+s%@setup@%Setup.nt%g
s%@LIBRUBY_LDSHARED@%%g
s%@LIBRUBY_DLDFLAGS@%%g
s%@RUBY_INSTALL_NAME@%ruby%g
@@ -65,8 +59,7 @@ s%@LIBRUBY@%libruby.lib%g
s%@LIBRUBYARG@%libruby.lib%g
s%@SOLIBS@%%g
s%@arch@%i386-mswin32%g
-s%@configure_args@%%g
+s%@configure_args@%--with-make-prog=nmake%g
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
diff --git a/win32/ntsetup.bat b/win32/ntsetup.bat
index 5d0ca70643..dc67b70673 100755
--- a/win32/ntsetup.bat
+++ b/win32/ntsetup.bat
@@ -3,9 +3,6 @@ copy config.h ..
copy Makefile ..
copy ruby.def ..
copy config.status ..
-cd ..\ext
-copy Setup.nt Setup
-copy extmk.rb.nt extmk.rb
cd ..
echo type `nmake' to make ruby for mswin32.
diff --git a/win32/ruby.def b/win32/ruby.def
index 018c9bff34..4bfbec8746 100644
--- a/win32/ruby.def
+++ b/win32/ruby.def
@@ -2,78 +2,117 @@ LIBRARY rubymw.dll
DESCRIPTION 'win32 rubymw.dll'
EXPORTS
;;global objects
-;array.c:
+;array.c
rb_cArray
-;bignum.c:
+;bignum.c
rb_cBignum
+;compar.c
+ rb_mComparable
+;dir.c
+ rb_cDir
;enum.c
rb_mEnumerable
;error.c
- rb_eException;
+ rb_eException
rb_eSystemExit
rb_eInterrupt
- rb_eFatal;
- rb_eStandardError;
- rb_eRuntimeError;
- rb_eSyntaxError;
- rb_eTypeError;
- rb_eArgError;
- rb_eNameError;
- rb_eIndexError;
- rb_eLoadError;
- rb_eSecurityError;
- rb_eNotImpError;
- rb_eSystemCallError;
- rb_mErrno;
-;eval.c:
+ rb_eSignal
+ rb_eFatal
+ rb_eStandardError
+ rb_eRuntimeError
+ rb_eSyntaxError
+ rb_eTypeError
+ rb_eArgError
+ rb_eNameError
+ rb_eIndexError
+ rb_eLoadError
+ rb_eSecurityError
+ rb_eNotImpError
+ rb_eSystemCallError
+ rb_eZeroDivError
+ rb_mErrno
+;eval.c
rb_cProc
- rb_thread_tick
- rb_thread_critical
-;file.c:
+ rb_cThread
+ rb_thread_tick
+ rb_thread_critical
+;file.c
rb_cFile
-;hash.c:
+ rb_mFileTest
+;gc.c
+ rb_mGC
+;hash.c
rb_cHash
- ruby_setenv
- ruby_unsetenv
-;io.c:
+;io.c
rb_cIO
- rb_io_check_closed
-;numeric.c:
+ rb_eEOFError
+ rb_eIOError
+;math.c
+ rb_mMath
+;numeric.c
rb_cNumeric
rb_cFloat
rb_cInteger
rb_cFixnum
+ rb_eFloatDomainError
;object.c
rb_mKernel
rb_cObject
rb_cModule
rb_cClass
rb_cData
-
rb_cNilClass
rb_cTrueClass
rb_cFalseClass
-;re.c:
+;prec.c
+ rb_mPrecision
+;process.c
+ rb_mProcess
+;range.c
+ rb_cRange
+;re.c
rb_cRegexp
-;signal.c:
- rb_trap_immediate
- rb_trap_pending
- rb_prohibit_interrupt
-;string.c:
+;ruby.c
+ ruby_debug
+ ruby_verbose
+ rb_progname
+ rb_argv
+ rb_argv0
+;signal.c
+ rb_trap_pending
+ rb_trap_immediate
+ rb_prohibit_interrupt
+;string.c
rb_cString
rb_cStruct
+;time.c
+ rb_cTime
-; procedures/methods
-;missing/nt.c
+;;procedures/methods
+;missing/alloca.c
+ alloca
+;missing/crypt.c
+ definekey
+ encrypt
+ crypt
+;missing/fnmatch.c
+ fnmatch
+;missing/isinf.c
+ isinf
+;missing/isnan.c
+ isnan
+;missing/isnan.c
+ isnan
+;win32/win32.c
NtInitialize
myfdopen
myfdclose
myaccept
mybind
myconnect
- myfdset
- myfdisset
- myselect
+ myfdset
+ myfdisset
+ myselect
mygetpeername
mygetsockname
mygetsockopt
@@ -93,8 +132,9 @@ EXPORTS
mygetprotobynumber
mygetservbyname
mygetservbyport
- myget_osfhandle
+ myget_osfhandle
;array.c
+ rb_mem_clear
rb_ary_freeze
rb_ary_new
rb_ary_new2
@@ -111,6 +151,8 @@ EXPORTS
rb_ary_each
rb_ary_join
rb_ary_to_s
+ rb_protect_inspect
+ rb_inspecting_p
rb_ary_reverse
rb_ary_sort_bang
rb_ary_sort
@@ -130,7 +172,6 @@ EXPORTS
rb_uint2inum
rb_int2inum
rb_str2inum
- rb_str2cstr
rb_big2str
rb_big2ulong
rb_big2long
@@ -149,6 +190,7 @@ EXPORTS
rb_class_new
rb_singleton_class_new
rb_singleton_class_clone
+ rb_singleton_class_attached
rb_define_class_id
rb_define_class
rb_define_class_under
@@ -157,11 +199,17 @@ EXPORTS
rb_define_module
rb_define_module_under
rb_include_module
+ rb_mod_included_modules
+ rb_mod_ancestors
+ rb_class_instance_methods
+ rb_class_protected_instance_methods
+ rb_class_private_instance_methods
+ rb_obj_singleton_methods
rb_define_method_id
rb_define_method
- rb_undef_method
- rb_define_private_method
rb_define_protected_method
+ rb_define_private_method
+ rb_undef_method
rb_singleton_class
rb_define_singleton_method
rb_define_module_function
@@ -169,16 +217,14 @@ EXPORTS
rb_define_alias
rb_define_attr
rb_scan_args
-; dln.c
- dln_find_exe
- dln_find_file
+;dln.c
dln_load
dln_find_exe
dln_find_file
-; enum.c
+;enum.c
rb_each
rb_enum_length
-; error.c
+;error.c
rb_compile_error
rb_compile_error_append
rb_warn
@@ -195,12 +241,17 @@ EXPORTS
rb_sys_fail
;eval.c
rb_clear_cache
- rb_alias
rb_add_method
+ rb_alias
rb_remove_method
rb_disable_super
rb_enable_super
rb_method_boundp
+ rb_attr
+ rb_dvar_defined
+ rb_dvar_ref
+ rb_dvar_push
+ rb_dvar_asgn
rb_safe_level
rb_set_safe_level
rb_check_safe_str
@@ -209,59 +260,66 @@ EXPORTS
ruby_options
ruby_run
rb_eval_string
+ rb_eval_string_protect
+ rb_eval_string_wrap
rb_eval_cmd
- rb_test_false_or_nil
rb_respond_to
rb_exit
- rb_raise
- rb_fatal
+ rb_iter_break
+ rb_exc_raise
+ rb_exc_fatal
rb_interrupt
+ rb_jump_tag
rb_iterator_p
+ rb_yield
rb_iterate
rb_rescue
+ rb_protect
rb_ensure
rb_apply
rb_funcall
rb_funcall2
rb_backtrace
rb_frame_last_func
+ rb_obj_instance_eval
rb_load
+ rb_load_protect
rb_provide
rb_f_require
- rb_obj_instance_eval
rb_obj_call_init
rb_class_new_instance
rb_extend_object
- rb_f_global_variables
rb_set_end_proc
- rb_f_autoload
+ rb_exec_end_proc
rb_f_lambda
rb_gc_mark_threads
+ rb_thread_fd_close
rb_thread_schedule
rb_thread_wait_fd
rb_thread_fd_writable
rb_thread_wait_for
rb_thread_alone
rb_thread_select
+ rb_thread_current
+ rb_thread_main
+ rb_thread_wakeup
+ rb_thread_run
+ rb_thread_stop
rb_thread_sleep
rb_thread_sleep_forever
rb_thread_create
rb_thread_scope_shared_p
rb_thread_interrupt
+ rb_thread_signal_raise
rb_thread_trap_eval
- rb_thread_fd_close
- rb_thread_stop
- rb_thread_wakeup
- rb_thread_run
- rb_thread_create
+ rb_thread_local_aref
+ rb_thread_local_aset
rb_catch
rb_throw
- rb_yield
-; file.c
- rb_file_open
+;file.c
eaccess
rb_file_s_expand_path
-; gc.c
+;gc.c
xmalloc
xcalloc
xrealloc
@@ -269,61 +327,91 @@ EXPORTS
rb_newobj
rb_data_object_alloc
rb_gc_mark_locations
+ rb_mark_tbl
+ rb_mark_hash
rb_gc_mark_maybe
rb_gc_mark
rb_gc_force_recycle
rb_gc_mark_frame
rb_gc
-; hash.c
+ rb_gc_call_finalizer_at_exit
+;hash.c
rb_hash_freeze
rb_hash
rb_hash_new
rb_hash_aref
rb_hash_aset
-; inits.c
+ rb_path_check
+ rb_env_path_tainted
+ ruby_setenv
+ ruby_unsetenv
+;inits.c
rb_call_inits
-; io.c
+;io.c
rb_eof_error
+ rb_io_check_closed
+ rb_io_check_readable
+ rb_io_check_writable
+ rb_read_check
rb_io_write
+ rb_io_eof
rb_io_gets
rb_io_getc
+ rb_getc
rb_io_ungetc
rb_io_fptr_finalize
rb_io_close
+ rb_io_close_read
rb_io_binmode
+ rb_io_mode_flags
rb_fopen
rb_fdopen
+ rb_file_open
+ rb_file_sysopen
rb_io_unbuffered
+ rb_p
+ rb_gets
rb_str_setter
-; numeric.c
+;numeric.c
rb_num_zerodiv
rb_num_coerce_bin
rb_float_new
rb_num2long
rb_num2ulong
+ rb_num2int
+ rb_fix2int
rb_num2fix
rb_fix2str
-; object.c
+ rb_fix_upto
+;object.c
rb_equal
rb_eql
+ rb_obj_id
+ rb_obj_clone
rb_any_to_s
rb_inspect
rb_obj_is_instance_of
rb_obj_is_kind_of
+ rb_obj_tainted
+ rb_obj_taint
+ rb_obj_untaint
rb_obj_alloc
- rb_obj_taint
rb_to_id
- rb_class_of
- rb_type
- rb_special_const_p
+ rb_convert_type
rb_Integer
rb_Float
+ rb_num2dbl
+ rb_str2cstr
rb_String
rb_Array
- rb_num2dbl
-; parse.c
+;parse.c
+ rb_compile_string
+ rb_compile_cstr
+ rb_compile_file
rb_node_newnode
rb_id_attrset
+ rb_parser_append_print
+ rb_parser_while_loop
rb_intern
rb_id2name
rb_is_const_id
@@ -332,13 +420,15 @@ EXPORTS
rb_backref_set
rb_lastline_get
rb_lastline_set
-; process.c
+;process.c
rb_proc_exec
rb_syswait
-; range.c
+;range.c
rb_range_new
-; re.c
+ rb_range_beg_len
+;re.c
rb_str_cicmp
+ rb_match_busy
rb_reg_search
rb_reg_nth_defined
rb_reg_nth_match
@@ -350,29 +440,33 @@ EXPORTS
rb_reg_regcomp
rb_reg_match
rb_reg_match2
+ rb_kcode
+ rb_reg_options
rb_reg_regsub
rb_get_kcode
rb_set_kcode
-; ruby.c
- rb_argv
- rb_argv0
- rb_progname
+;ruby.c
+ ruby_require_libraries
rb_load_file
ruby_script
ruby_prog_init
ruby_set_argv
ruby_process_options
-; signal.c
+;signal.c
+ rb_f_kill
rb_gc_mark_trap_list
rb_trap_exit
rb_trap_exec
-; sprintf.c
+ rb_trap_restore_mask
+;sprintf.c
rb_f_sprintf
-; st.c
+;st.c
st_init_table_with_size
st_init_table
st_init_numtable
+ st_init_numtable_with_size
st_init_strtable
+ st_init_strtable_with_size
st_free_table
st_lookup
st_insert
@@ -380,8 +474,9 @@ EXPORTS
st_copy
st_delete
st_delete_safe
+ st_cleanup_safe
st_foreach
-; string.c
+;string.c
rb_str_new
rb_str_new2
rb_tainted_str_new
@@ -399,29 +494,34 @@ EXPORTS
rb_str_dup_frozen
rb_str_resize
rb_str_cat
+ rb_str_concat
rb_str_hash
rb_str_cmp
rb_str_upto
rb_str_inspect
rb_str_split
-; struct.c
+;struct.c
rb_struct_getmember
rb_struct_define
rb_struct_alloc
rb_struct_new
rb_struct_aref
rb_struct_aset
-; time.c
+;time.c
rb_time_new
+ rb_time_interval
rb_time_timeval
-; util.c
+;util.c
rb_class_of
rb_type
rb_special_const_p
rb_test_false_or_nil
ruby_scan_oct
ruby_scan_hex
+ ruby_mktemp
+ ruby_qsort
;variable.c
+ rb_mod_name
rb_class_path
rb_set_class_path
rb_path2class
@@ -435,16 +535,25 @@ EXPORTS
rb_define_variable
rb_define_readonly_variable
rb_define_virtual_variable
+ rb_f_trace_var
+ rb_f_untrace_var
rb_gvar_get
rb_gvar_set
rb_gvar_set2
rb_gvar_defined
+ rb_f_global_variables
rb_alias_variable
+ rb_mark_generic_ivar
+ rb_mark_generic_ivar_tbl
+ rb_free_generic_ivar
rb_ivar_get
rb_ivar_set
rb_ivar_defined
+ rb_obj_instance_variables
+ rb_obj_remove_instance_variable
rb_const_get_at
rb_const_get
+ rb_mod_remove_const
rb_mod_const_at
rb_mod_constants
rb_mod_const_of
@@ -456,7 +565,6 @@ EXPORTS
rb_define_global_const
rb_iv_get
rb_iv_set
-; version.c
+;version.c
ruby_show_version
ruby_show_copyright
-