summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-11-09 03:57:28 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-11-09 03:57:28 +0000
commit24d1b9a8c999655b719a46f5a372f56824681a2f (patch)
tree32de73744d31d8648229d980d2eec2bb67030268
parentc75b5b2fac4fa4144c3b1efe37449e6e3339322d (diff)
19991109
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--Makefile.in2
-rw-r--r--configure52
-rw-r--r--configure.in18
-rw-r--r--eval.c30
-rw-r--r--lib/debug.rb1
-rw-r--r--win32/win32.c27
6 files changed, 68 insertions, 62 deletions
diff --git a/Makefile.in b/Makefile.in
index e846d8d72f..5b66caa96b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -141,6 +141,8 @@ parse.c: parse.y
$(YACC) $<
mv -f y.tab.c parse.c
+parse.@OBJEXT@: parse.c
+
alloca.@OBJEXT@: @srcdir@/missing/alloca.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/alloca.c
diff --git a/configure b/configure
index 9fcad96c20..6b8982056b 100644
--- a/configure
+++ b/configure
@@ -1352,7 +1352,7 @@ if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <<EOF
#line 1359 "configure"
@@ -1391,7 +1391,7 @@ if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <<EOF
#line 1398 "configure"
@@ -1430,7 +1430,7 @@ if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
#line 1437 "configure"
@@ -1469,7 +1469,7 @@ if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ ac_cv_sizeof_voidp=4
else
cat > conftest.$ac_ext <<EOF
#line 1476 "configure"
@@ -1508,7 +1508,7 @@ if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ ac_cv_sizeof_float=4
else
cat > conftest.$ac_ext <<EOF
#line 1515 "configure"
@@ -1547,7 +1547,7 @@ if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ ac_cv_sizeof_double=8
else
cat > conftest.$ac_ext <<EOF
#line 1554 "configure"
@@ -4085,6 +4085,10 @@ echo "configure:4028: checking whether OS depend dynamic link works" >&5
fi
rb_cv_dlopen=yes ;;
netbsd*) LDSHARED="ld -shared"
+ case "$host_cpu" in
+ alpha)
+ LDFLAGS="-export-dynamic" ;;
+ esac
rb_cv_dlopen=yes ;;
openbsd*) LDSHARED="ld -Bforcearchive -Bshareable"
rb_cv_dlopen=yes ;;
@@ -4141,12 +4145,12 @@ if test "$ac_cv_header_a_out_h" = yes; then
if test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown; then
cat confdefs.h > config.h
echo $ac_n "checking whether matz's dln works""... $ac_c" 1>&6
-echo "configure:4145: checking whether matz's dln works" >&5
+echo "configure:4149: checking whether matz's dln works" >&5
if eval "test \"`echo '$''{'rb_cv_dln_a_out'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4150 "configure"
+#line 4154 "configure"
#include "confdefs.h"
#define USE_DLN_A_OUT
@@ -4156,7 +4160,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_dln_a_out=yes
else
@@ -4263,7 +4267,7 @@ fi
case "$host_os" in
human*)
echo $ac_n "checking for _harderr in -lsignal""... $ac_c" 1>&6
-echo "configure:4267: checking for _harderr in -lsignal" >&5
+echo "configure:4271: checking for _harderr in -lsignal" >&5
ac_lib_var=`echo signal'_'_harderr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4271,7 +4275,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsignal $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4275 "configure"
+#line 4279 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4282,7 +4286,7 @@ int main() {
_harderr()
; return 0; }
EOF
-if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4310,7 +4314,7 @@ else
fi
echo $ac_n "checking for hmemset in -lhmem""... $ac_c" 1>&6
-echo "configure:4314: checking for hmemset in -lhmem" >&5
+echo "configure:4318: checking for hmemset in -lhmem" >&5
ac_lib_var=`echo hmem'_'hmemset | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4318,7 +4322,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lhmem $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4322 "configure"
+#line 4326 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4329,7 +4333,7 @@ int main() {
hmemset()
; return 0; }
EOF
-if { (eval echo configure:4333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4359,12 +4363,12 @@ fi
for ac_func in select
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4363: checking for $ac_func" >&5
+echo "configure:4367: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4368 "configure"
+#line 4372 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4387,7 +4391,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4412,7 +4416,7 @@ fi
done
echo $ac_n "checking whether PD libc _dtos18 fail to convert big number""... $ac_c" 1>&6
-echo "configure:4416: checking whether PD libc _dtos18 fail to convert big number" >&5
+echo "configure:4420: checking whether PD libc _dtos18 fail to convert big number" >&5
if eval "test \"`echo '$''{'rb_cv_missing__dtos18'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4420,7 +4424,7 @@ else
rb_cv_missing__dtos18=no
else
cat > conftest.$ac_ext <<EOF
-#line 4424 "configure"
+#line 4428 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4432,7 +4436,7 @@ main ()
}
EOF
-if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_missing__dtos18=yes
else
@@ -4454,7 +4458,7 @@ EOF
fi
echo $ac_n "checking whether PD libc fconvert fail to round""... $ac_c" 1>&6
-echo "configure:4458: checking whether PD libc fconvert fail to round" >&5
+echo "configure:4462: checking whether PD libc fconvert fail to round" >&5
if eval "test \"`echo '$''{'rb_cv_missing_fconvert'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4462,7 +4466,7 @@ else
rb_cv_missing_fconvert=no
else
cat > conftest.$ac_ext <<EOF
-#line 4466 "configure"
+#line 4470 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4475,7 +4479,7 @@ main ()
}
EOF
-if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_missing_fconvert=yes
else
diff --git a/configure.in b/configure.in
index 96e3c66d3b..2bf05f7d24 100644
--- a/configure.in
+++ b/configure.in
@@ -83,12 +83,12 @@ AC_OBJEXT
# checks for UNIX variants that set C preprocessor variables
AC_MINIX
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(long)
-AC_CHECK_SIZEOF(void*)
-AC_CHECK_SIZEOF(float)
-AC_CHECK_SIZEOF(double)
+AC_CHECK_SIZEOF(int, 4)
+AC_CHECK_SIZEOF(short, 2)
+AC_CHECK_SIZEOF(long, 4)
+AC_CHECK_SIZEOF(void*, 4)
+AC_CHECK_SIZEOF(float, 4)
+AC_CHECK_SIZEOF(double, 8)
AC_CACHE_CHECK(for prototypes, rb_cv_have_prototypes,
[AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],
@@ -253,7 +253,7 @@ test $rb_cv_func_strtod = no && LIBOBJS="$LIBOBJS strtod.o"
AC_C_BIGENDIAN
AC_C_CONST
-AC_CHAR_UNSIGNED
+AC_C_CHAR_UNSIGNED
AC_CACHE_CHECK(whether right shift preserve sign bit, rb_cv_rshift_sign,
[AC_TRY_RUN([
@@ -429,6 +429,10 @@ if test "$with_dln_a_out" != yes; then
fi
rb_cv_dlopen=yes ;;
netbsd*) LDSHARED="ld -shared"
+ case "$host_cpu" in
+ alpha)
+ LDFLAGS="-export-dynamic" ;;
+ esac
rb_cv_dlopen=yes ;;
openbsd*) LDSHARED="ld -Bforcearchive -Bshareable"
rb_cv_dlopen=yes ;;
diff --git a/eval.c b/eval.c
index fe449d1307..c6c2b98cd3 100644
--- a/eval.c
+++ b/eval.c
@@ -292,10 +292,15 @@ rb_enable_super(klass, name)
ID mid = rb_intern(name);
body = search_method(klass, mid, &origin);
- if (!body || !body->nd_body || origin != klass) {
+ if (!body) {
print_undef(klass, mid);
}
- body->nd_noex &= ~NOEX_UNDEF;
+ if (!body->nd_body) {
+ remove_method(klass, mid);
+ }
+ else {
+ body->nd_noex &= ~NOEX_UNDEF;
+ }
}
static void
@@ -1511,6 +1516,7 @@ is_defined(self, node, buf)
case NODE_SUPER:
case NODE_ZSUPER:
if (ruby_frame->last_func == 0) return 0;
+ else if (ruby_frame->last_class == 0) return 0;
else if (rb_method_boundp(RCLASS(ruby_frame->last_class)->super,
ruby_frame->last_func, 0)) {
if (nd_type(node) == NODE_SUPER) {
@@ -1707,7 +1713,7 @@ call_trace_func(event, file, line, self, id, klass)
prev = ruby_frame;
PUSH_FRAME();
- *ruby_frame = *_frame.prev;
+ *ruby_frame = *prev;
ruby_frame->prev = prev;
if (file) {
@@ -4369,7 +4375,7 @@ rb_f_eval(argc, argv, self)
VALUE *argv;
VALUE self;
{
- VALUE src, scope, vfile, vline;
+ VALUE src, scope, vfile, vline, val;
char *file = "(eval)";
int line = 1;
@@ -4383,6 +4389,19 @@ rb_f_eval(argc, argv, self)
}
Check_SafeStr(src);
+ if (NIL_P(scope) && ruby_frame->prev) {
+ struct FRAME *prev;
+ VALUE val;
+
+ prev = ruby_frame;
+ PUSH_FRAME();
+ *ruby_frame = *prev->prev;
+ ruby_frame->prev = prev;
+ val = eval(self, src, scope, file, line);
+ POP_FRAME();
+
+ return val;
+ }
return eval(self, src, scope, file, line);
}
@@ -5310,6 +5329,7 @@ Init_eval()
rb_define_global_function("untrace_var", rb_f_untrace_var, -1);
rb_define_global_function("set_trace_func", set_trace_func, 1);
+ rb_global_variable(&trace_func);
rb_define_virtual_variable("$SAFE", safe_getter, safe_setter);
}
@@ -5475,6 +5495,7 @@ rb_f_binding(self)
frame_dup(&data->frame);
if (ruby_frame->prev) {
data->frame.last_func = ruby_frame->prev->last_func;
+ data->frame.last_class = ruby_frame->prev->last_class;
}
if (data->iter) {
@@ -6092,6 +6113,7 @@ thread_mark(th)
rb_gc_mark(th->errinfo);
rb_gc_mark(th->last_line);
rb_gc_mark(th->last_match);
+ rb_gc_mark(th->trace);
rb_mark_tbl(th->locals);
/* mark data in copied stack */
diff --git a/lib/debug.rb b/lib/debug.rb
index d2f1da83ff..a1fcde91a1 100644
--- a/lib/debug.rb
+++ b/lib/debug.rb
@@ -26,6 +26,7 @@ class DEBUGGER__
@last = [nil, nil]
@scripts = {}
end
+ @no_step = nil
DEBUG_LAST_CMD = []
diff --git a/win32/win32.c b/win32/win32.c
index a28006ce86..864fbfb5df 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1218,12 +1218,6 @@ NtMakeCmdVector (char *cmdline, char ***vec, int InputCmd)
// UNIX compatible directory access functions for NT
//
-//
-// File names are converted to lowercase if the
-// CONVERT_TO_LOWER_CASE variable is defined.
-//
-
-#define CONVERT_TO_LOWER_CASE
#define PATHLEN 1024
//
@@ -1246,8 +1240,6 @@ opendir(char *filename)
char root[PATHLEN];
char volname[PATHLEN];
DWORD serial, maxname, flags;
- BOOL downcase;
- char *dummy;
//
// check to see if we\'ve got a directory
@@ -1259,21 +1251,6 @@ opendir(char *filename)
}
//
- // check out the file system characteristics
- //
- if (GetFullPathName(filename, PATHLEN, root, &dummy)) {
- if (dummy = strchr(root, '\\'))
- *++dummy = '\0';
- if (GetVolumeInformation(root, volname, PATHLEN,
- &serial, &maxname, &flags, 0, 0)) {
- downcase = !(flags & FS_CASE_SENSITIVE);
- }
- }
- else {
- downcase = TRUE;
- }
-
- //
// Get us a DIR structure
//
@@ -1309,8 +1286,6 @@ opendir(char *filename)
idx = strlen(FindData.cFileName)+1;
p->start = ALLOC_N(char, idx);
strcpy (p->start, FindData.cFileName);
- if (downcase)
- strlwr(p->start);
p->nfiles++;
//
@@ -1334,8 +1309,6 @@ opendir(char *filename)
rb_fatal ("opendir: malloc failed!\n");
}
strcpy(&p->start[idx], FindData.cFileName);
- if (downcase)
- strlwr(&p->start[idx]);
p->nfiles++;
idx += len+1;
}