diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-04 14:20:35 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-04 14:20:35 +0000 |
commit | 1d6e0f8281a3b00829f8360c9fcf58b69788d401 (patch) | |
tree | 4026a4e1e49de6e28ee6c420b22d89328f7efb09 | |
parent | 566aa6625327e534c4941f2c2b6ca6c4f06162f3 (diff) | |
download | ruby-1d6e0f8281a3b00829f8360c9fcf58b69788d401.tar.gz |
forgot to commit everything bug ChangeLog
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | bignum.c | 2 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | defines.h | 14 | ||||
-rw-r--r-- | doc/NEWS | 2 | ||||
-rw-r--r-- | io.c | 5 | ||||
-rw-r--r-- | lib/pstore.rb | 4 | ||||
-rw-r--r-- | lib/weakref.rb | 6 | ||||
-rw-r--r-- | misc/ruby-mode.el | 4 | ||||
-rw-r--r-- | parse.y | 2 | ||||
-rw-r--r-- | process.c | 5 | ||||
-rw-r--r-- | regex.c | 28 | ||||
-rw-r--r-- | regex.h | 1 |
12 files changed, 23 insertions, 51 deletions
@@ -252,8 +252,8 @@ rb_cstr2inum(str, base) if (*end == '_') goto bigparse; if (badcheck) { - if (end == str) goto bad; /* no number */ while (*end && ISSPACE(*end)) end++; + if (end == str) goto bad; /* no number */ if (*end) { /* trailing garbage */ bad: rb_raise(rb_eArgError, "invalid value for Integer: \"%s\"", s); diff --git a/configure.in b/configure.in index e007e4caf9..bce15f0001 100644 --- a/configure.in +++ b/configure.in @@ -273,7 +273,6 @@ dnl Checks for library functions. AC_TYPE_GETGROUPS AC_TYPE_SIGNAL AC_FUNC_ALLOCA -AC_FUNC_VFORK AC_FUNC_MEMCMP AC_REPLACE_FUNCS(dup2 memmove mkdir strcasecmp strncasecmp strerror strftime\ strchr strstr strtoul crypt flock vsnprintf\ @@ -49,11 +49,15 @@ #define EXTERN extern #endif -#ifdef sparc -#define FLUSH_REGISTER_WINDOWS asm("ta 3") -#else -#define FLUSH_REGISTER_WINDOWS /* empty */ -#endif +#if defined(sparc) || defined(__sparc__) +# if defined(linux) || defined(__linux__) +#define FLUSH_REGISTER_WINDOWS asm("ta 0x83") +# else /* Solaris, not sparc linux */ +#define FLUSH_REGISTER_WINDOWS asm("ta 0x03") +# endif /* trap always to flush register windows if we are on a Sparc system */ +#else /* Not a sparc, so */ +#define FLUSH_REGISTER_WINDOWS /* empty -- nothing to do here */ +#endif #if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__) #define DOSISH 1 @@ -1,4 +1,4 @@ -Summary of the changes since 1.6.4: +Summary of the changes since 1.6.5: : Syslog module @@ -51,9 +51,6 @@ struct timeval { }; #endif #endif -#ifdef HAVE_VFORK_H -#include <vfork.h> -#endif #include <sys/stat.h> @@ -1600,7 +1597,7 @@ pipe_open(pname, mode) } retry: - switch (pid = (doexec?vfork():fork())) { + switch ((pid = fork())) { case 0: /* child */ if (modef & FMODE_READABLE) { close(pr[0]); diff --git a/lib/pstore.rb b/lib/pstore.rb index 138e9aa520..fa82a48052 100644 --- a/lib/pstore.rb +++ b/lib/pstore.rb @@ -85,11 +85,11 @@ class PStore value = nil backup = @filename+"~" if File::exist?(@filename) - file = File::open(@filename, "r+") + file = File::open(@filename, "rb+") orig = true else @table = {} - file = File::open(@filename, "w+") + file = File::open(@filename, "wb+") Marshal::dump(@table, file) end file.flock(File::LOCK_EX) diff --git a/lib/weakref.rb b/lib/weakref.rb index 459f69f924..6861fde5f5 100644 --- a/lib/weakref.rb +++ b/lib/weakref.rb @@ -60,7 +60,11 @@ class WeakRef<Delegator unless ID_MAP[@__id] raise RefError, "Illegal Reference - probably recycled", caller(2) end - ObjectSpace._id2ref(@__id) + begin + ObjectSpace._id2ref(@__id) + rescue RangeError + raise RefError, "Illegal Reference - probably recycled", caller(2) + end end def weakref_alive? diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 437999dfdc..b03a1c92c3 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -673,8 +673,8 @@ An end of a defun is found by moving forward from the beginning of one." (add-hook 'ruby-mode-hook '(lambda () - (make-local-variable 'font-lock-syntactic-keywords) - (setq font-lock-syntactic-keywords + (make-local-variable 'ruby-font-lock-syntactic-keywords) + (setq ruby-font-lock-syntactic-keywords '( ;; #{ }, #$hoge, #@foo are not comments ("\\(#\\)[{$@]" 1 (1 . nil)) @@ -1974,7 +1974,7 @@ yycompile(f, line) ruby__end__seen = 0; ruby_eval_tree = 0; heredoc_end = 0; - ruby_sourcefile = f; + ruby_sourcefile = strdup(f); ruby_in_compile = 1; n = yyparse(); ruby_debug_lines = 0; @@ -40,9 +40,6 @@ struct timeval rb_time_interval _((VALUE)); #ifdef HAVE_GETPRIORITY # include <sys/resource.h> #endif -#ifdef HAVE_VFORK_H -#include <vfork.h> -#endif #include "st.h" #ifdef __EMX__ @@ -727,7 +724,7 @@ rb_f_system(argc, argv) Check_SafeStr(argv[i]); } retry: - switch (pid = vfork()) { + switch (pid = fork()) { case 0: if (argc == 1 && prog == 0) { rb_proc_exec(RSTRING(argv[0])->ptr); @@ -1264,7 +1264,6 @@ re_compile_pattern(pattern, size, bufp) bufp->fastmap_accurate = 0; bufp->must = 0; bufp->must_skip = 0; - bufp->stclass = 0; /* Initialize the syntax table. */ init_syntax_once(); @@ -2393,9 +2392,6 @@ re_compile_pattern(pattern, size, bufp) p0 += mcnt+1; mcnt = EXTRACT_UNSIGNED_AND_INCR(p0); p0 += 8*mcnt; - if (*p0 == maybe_finalize_jump) { - bufp->stclass = laststart; - } } } } @@ -3288,30 +3284,6 @@ re_search(bufp, string, size, startpos, range, regs) startpos++; } } - else if (fastmap && (bufp->stclass)) { - register unsigned char *p; - unsigned long c; - int irange = range; - - p = (unsigned char*)string+startpos; - while (range > 0) { - c = *p++; - if (ismbchar(c) && fastmap[c] != 2) { - MBC2WC(c, p); - } - else if (MAY_TRANSLATE()) - c = translate[c]; - if (*bufp->stclass == charset) { - if (!is_in_list(c, bufp->stclass+1)) break; - } - else { - if (is_in_list(c, bufp->stclass+1)) break; - } - range--; - if (c > 256) range--; - } - startpos += irange - range; - } } advance: @@ -132,7 +132,6 @@ struct re_pattern_buffer char *must; /* Pointer to exact pattern which strings should have to be matched. */ int *must_skip; /* Pointer to exact pattern skip table for bm_search */ - char *stclass; /* Pointer to character class list at top */ long options; /* Flags for options such as extended_pattern. */ long re_nsub; /* Number of subexpressions found by the compiler. */ char fastmap_accurate; |