summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--config.guess6
-rw-r--r--eval.c2
-rw-r--r--lib/debug.rb29
-rw-r--r--lib/open3.rb24
-rw-r--r--pack.c2
-rw-r--r--parse.y13
-rw-r--r--process.c2
-rw-r--r--version.h4
9 files changed, 57 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog
index 51e03f3a1f..f0365dc222 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,15 @@
+Fri Oct 20 07:56:23 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * eval.c (rb_eval): ARGSPUSH should not modify args array.
+
Wed Oct 18 03:10:20 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* stable version 1.6.2 released.
+Thu Oct 19 16:51:46 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * pack.c (NUM2U32): should use NUM2ULONG().
+
Tue Oct 17 17:30:34 2000 WATANABE Hirofumi <eban@ruby-lang.org>
* eval.c (error_print): ruby_sourcefile may be NULL.
diff --git a/config.guess b/config.guess
index e1fe8d1562..c55635bd7b 100644
--- a/config.guess
+++ b/config.guess
@@ -682,11 +682,11 @@ EOF
if test "$?" = 0 ; then
./$dummy | grep 1\.99 > /dev/null
if test "$?" = 0 ; then
- LIBC="libc1"
+ LIBC="-libc1"
fi
fi
rm -f $dummy.c $dummy
- echo powerpc-unknown-linux-${LIBC} ; exit 0 ;;
+ echo powerpc-unknown-linux${LIBC} ; exit 0 ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
@@ -736,7 +736,7 @@ EOF
fi
fi
rm -f $dummy.s $dummy
- echo ${UNAME_MACHINE}-unknown-linux{LIBC} ; exit 0
+ echo ${UNAME_MACHINE}-unknown-linux${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
cat >$dummy.c <<EOF
#ifdef __cplusplus
diff --git a/eval.c b/eval.c
index 02da6af508..969def2a20 100644
--- a/eval.c
+++ b/eval.c
@@ -2386,7 +2386,7 @@ rb_eval(self, n)
break;
case NODE_ARGSPUSH:
- result = rb_ary_push(rb_eval(self, node->nd_head),
+ result = rb_ary_push(rb_obj_dup(rb_eval(self, node->nd_head)),
rb_eval(self, node->nd_body));
break;
diff --git a/lib/debug.rb b/lib/debug.rb
index 04e6c730c7..b6968cc338 100644
--- a/lib/debug.rb
+++ b/lib/debug.rb
@@ -456,14 +456,14 @@ class DEBUGGER__
end
when /^\s*p\s+/
- stdout.printf "%s\n", debug_eval($', binding)
+ stdout.printf "%s\n", debug_eval($', binding).inspect
when /^\s*h(?:elp)?$/
debug_print_help()
else
v = debug_eval(input, binding)
- stdout.printf "%s\n", v unless (v == nil)
+ stdout.printf "%s\n", v.inspect unless (v == nil)
end
end
end
@@ -474,7 +474,7 @@ class DEBUGGER__
Debugger help v.-0.002b
Commands
b[reak] [file|method:]<line|method>
- set breakpoint to some position
+ set breakpoint to some position
wat[ch] <expression> set watchpoint to some expression
cat[ch] <an Exception> set catchpoint to an exception
b[reak] list breakpoints
@@ -587,8 +587,7 @@ EOHELP
end
def check_break_points(file, pos, binding, id)
- return false if break_points.empty?
- MUTEX.lock
+ MUTEX.lock # Stop all threads before 'line' and 'call'.
file = File.basename(file)
n = 1
for b in break_points
@@ -610,24 +609,22 @@ EOHELP
end
def excn_handle(file, line, id, binding)
- stdout.printf "Exception `%s': %s\n", $!.type, $!
+ stdout.printf "%s:%d: `%s' (%s)\n", file, line, $!, $!.type
if $!.type <= SystemExit
set_trace_func nil
exit
end
- MUTEX.lock
- fs = @frames.size
- tb = caller(0)[-fs..-1]
- if tb
- for i in tb
- stdout.printf "\tfrom %s\n", i
- end
- end
if @catch and ($!.type.ancestors.find { |e| e.to_s == @catch })
+ MUTEX.lock
+ fs = @frames.size
+ tb = caller(0)[-fs..-1]
+ if tb
+ for i in tb
+ stdout.printf "\tfrom %s\n", i
+ end
+ end
debug_command(file, line, id, binding)
- else
- MUTEX.unlock
end
end
diff --git a/lib/open3.rb b/lib/open3.rb
index 27283f5019..11b9813bee 100644
--- a/lib/open3.rb
+++ b/lib/open3.rb
@@ -14,8 +14,8 @@ module Open3
pr = IO::pipe
pe = IO::pipe
- pid = fork
- if pid == nil then # child
+ pid = fork{
+ # child
pw[1].close
STDIN.reopen(pw[0])
pw[0].close
@@ -29,13 +29,21 @@ module Open3
pe[1].close
exec(cmd)
- exit
- else
- pw[0].close
- pr[1].close
- pe[1].close
- pi = [ pw[1], pr[0], pe[0] ]
+ _exit 127
+ }
+
+ pw[0].close
+ pr[1].close
+ pe[1].close
+ Thread.start do
+ sleep 1
+ Process.waitpid(pid)
+ end
+ pi = [ pw[1], pr[0], pe[0] ]
+ if defined? yield
+ return yield *pi
end
+ pi
end
module_function :popen3
end
diff --git a/pack.c b/pack.c
index 173c7d80ad..d06cec1c6f 100644
--- a/pack.c
+++ b/pack.c
@@ -308,7 +308,7 @@ endian()
typedef long I32;
typedef unsigned long U32;
#define NUM2I32(x) NUM2LONG(x)
-#define NUM2U32(x) NUM2LONG(x)
+#define NUM2U32(x) NUM2ULONG(x)
#elif SIZEOF_INT == SIZE32
typedef int I32;
typedef unsigned int U32;
diff --git a/parse.y b/parse.y
index 8fe1ec99b9..ae55beee32 100644
--- a/parse.y
+++ b/parse.y
@@ -1820,7 +1820,18 @@ none : /* none */
#include "regex.h"
#include "util.h"
-#define is_identchar(c) (((int)(c))!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))
+/* We remove any previous definition of `SIGN_EXTEND_CHAR',
+ since ours (we hope) works properly with all combinations of
+ machines, compilers, `char' and `unsigned char' argument types.
+ (Per Bothner suggested the basic approach.) */
+#undef SIGN_EXTEND_CHAR
+#if __STDC__
+# define SIGN_EXTEND_CHAR(c) ((signed char)(c))
+#else /* not __STDC__ */
+/* As in Harbison and Steele. */
+# define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
+#endif
+#define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))
static char *tokenbuf = NULL;
static int tokidx, toksiz = 0;
diff --git a/process.c b/process.c
index 0675f8e2db..88fac00ac3 100644
--- a/process.c
+++ b/process.c
@@ -177,7 +177,7 @@ proc_wait()
while (1) {
TRAP_BEG;
pid = wait(&state);
- TRA_END;
+ TRAP_END;
if (pid >= 0) break;
if (errno == EINTR) {
rb_thread_schedule();
diff --git a/version.h b/version.h
index 6fffa240ba..3f22a09ec7 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.6.2"
-#define RUBY_RELEASE_DATE "2000-10-18"
+#define RUBY_RELEASE_DATE "2000-10-21"
#define RUBY_VERSION_CODE 162
-#define RUBY_RELEASE_CODE 20001018
+#define RUBY_RELEASE_CODE 20001021