Skip to content

Commit

Permalink
matz
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Oct 20, 2000
1 parent 1b2d3f8 commit 4098e58
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 33 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions config.guess
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
29 changes: 13 additions & 16 deletions lib/debug.rb
Original file line number Diff line number Diff line change
Expand Up @@ -456,14 +456,14 @@ def debug_command(file, line, id, binding)
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
Expand All @@ -474,7 +474,7 @@ def debug_print_help
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
Expand Down Expand Up @@ -587,8 +587,7 @@ def debug_funcname(id)
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
Expand All @@ -610,24 +609,22 @@ def check_break_points(file, pos, binding, id)
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

Expand Down
24 changes: 16 additions & 8 deletions lib/open3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def popen3(cmd)
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
Expand All @@ -29,13 +29,21 @@ def popen3(cmd)
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
Expand Down
2 changes: 1 addition & 1 deletion pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
13 changes: 12 additions & 1 deletion parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions version.h
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4098e58

Please sign in to comment.