diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | enum.c | 2 | ||||
-rw-r--r-- | error.c | 2 | ||||
-rw-r--r-- | eval.c | 4 | ||||
-rw-r--r-- | file.c | 2 | ||||
-rw-r--r-- | gc.c | 24 | ||||
-rw-r--r-- | io.c | 2 | ||||
-rw-r--r-- | object.c | 2 | ||||
-rw-r--r-- | pack.c | 2 | ||||
-rw-r--r-- | parse.y | 19 | ||||
-rw-r--r-- | process.c | 8 | ||||
-rw-r--r-- | re.c | 2 | ||||
-rw-r--r-- | ruby.c | 2 | ||||
-rw-r--r-- | ruby.h | 2 | ||||
-rw-r--r-- | sprintf.c | 2 | ||||
-rw-r--r-- | string.c | 6 | ||||
-rw-r--r-- | version.h | 4 |
17 files changed, 50 insertions, 40 deletions
@@ -1,3 +1,8 @@ +Mon Jan 29 01:40:27 2001 Yukihiro Matsumoto <matz@ruby-lang.org> + + * string.c (str_independent): should not clear str->orig here. + it's too early. + Fri Jan 26 01:42:40 2001 Yukihiro Matsumoto <matz@ruby-lang.org> * parse.y: clarify do ambiguity, bit more complex but natural @@ -6,7 +6,7 @@ $Date$ created at: Fri Oct 1 15:15:19 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto **********************************************************************/ @@ -6,7 +6,7 @@ $Date$ created at: Mon Aug 9 16:11:34 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto **********************************************************************/ @@ -6,7 +6,7 @@ $Date$ created at: Thu Jun 10 14:22:17 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto Copyright (C) 2000 Network Applied Communication Laboratory, Inc. Copyright (C) 2000 Information-technology Promotion Agency, Japan @@ -5205,7 +5205,7 @@ rb_feature_p(feature, wait) while (st_lookup(loading_tbl, f, &th)) { if (th == curr_thread) { - rb_raise(rb_eLoadError, "infinite load loop -- %s", f); + return Qtrue; } CHECK_INTS; rb_thread_schedule(); @@ -6,7 +6,7 @@ $Date$ created at: Mon Nov 15 12:24:34 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto Copyright (C) 2000 Network Applied Communication Laboratory, Inc. Copyright (C) 2000 Information-technology Promotion Agency, Japan @@ -6,7 +6,7 @@ $Date$ created at: Tue Oct 5 09:44:46 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto Copyright (C) 2000 Network Applied Communication Laboratory, Inc. Copyright (C) 2000 Information-technology Promotion Agency, Japan @@ -149,8 +149,8 @@ static int during_gc; static int need_call_final = 0; static st_table *finalizer_table = 0; -static VALUE -gc_enable() +VALUE +rb_gc_enable() { int old = dont_gc; @@ -158,8 +158,8 @@ gc_enable() return old; } -static VALUE -gc_disable() +VALUE +rb_gc_disable() { int old = dont_gc; @@ -996,8 +996,8 @@ rb_gc() gc_sweep(); } -static VALUE -gc_start() +VALUE +rb_gc_start() { rb_gc(); return Qnil; @@ -1299,14 +1299,14 @@ Init_GC() VALUE rb_mObSpace; rb_mGC = rb_define_module("GC"); - rb_define_singleton_method(rb_mGC, "start", gc_start, 0); - rb_define_singleton_method(rb_mGC, "enable", gc_enable, 0); - rb_define_singleton_method(rb_mGC, "disable", gc_disable, 0); - rb_define_method(rb_mGC, "garbage_collect", gc_start, 0); + rb_define_singleton_method(rb_mGC, "start", rb_gc_start, 0); + rb_define_singleton_method(rb_mGC, "enable", rb_gc_enable, 0); + rb_define_singleton_method(rb_mGC, "disable", rb_gc_disable, 0); + rb_define_method(rb_mGC, "garbage_collect", rb_gc_start, 0); rb_mObSpace = rb_define_module("ObjectSpace"); rb_define_module_function(rb_mObSpace, "each_object", os_each_obj, -1); - rb_define_module_function(rb_mObSpace, "garbage_collect", gc_start, 0); + rb_define_module_function(rb_mObSpace, "garbage_collect", rb_gc_start, 0); rb_define_module_function(rb_mObSpace, "add_finalizer", add_final, 1); rb_define_module_function(rb_mObSpace, "remove_finalizer", rm_final, 1); rb_define_module_function(rb_mObSpace, "finalizers", finals, 0); @@ -6,7 +6,7 @@ $Date$ created at: Fri Oct 15 18:08:59 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto Copyright (C) 2000 Network Applied Communication Laboratory, Inc. Copyright (C) 2000 Information-technology Promotion Agency, Japan @@ -6,7 +6,7 @@ $Date$ created at: Thu Jul 15 12:01:24 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto Copyright (C) 2000 Network Applied Communication Laboratory, Inc. Copyright (C) 2000 Information-technology Promotion Agency, Japan @@ -6,7 +6,7 @@ $Date$ created at: Thu Feb 10 15:17:05 JST 1994 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto **********************************************************************/ @@ -6,7 +6,7 @@ $Date$ created at: Fri May 28 18:02:42 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto **********************************************************************/ @@ -56,8 +56,16 @@ static enum lex_state { EXPR_CLASS, /* immediate after `class', no here document. */ } lex_state; +#if SIZEOF_LONG_LONG > 0 +typedef unsigned long long stack_type; +#elif SIZEOF___INT64 > 0 +typedef unsigned __int64 stack_type; +#else +typedef unsigned long stack_type; +#endif + static int cond_nest = 0; -static unsigned long cond_stack = 0; +static stack_type cond_stack = 0; #define COND_PUSH do {\ cond_nest++;\ cond_stack = (cond_stack<<1)|1;\ @@ -68,17 +76,14 @@ static unsigned long cond_stack = 0; } while (0) #define COND_P() (cond_nest > 0 && (cond_stack&1)) -static int cmdarg_nest = 0; -static unsigned long cmdarg_stack = 0; +static stack_type cmdarg_stack = 0; #define CMDARG_PUSH do {\ - cmdarg_nest++;\ cmdarg_stack = (cmdarg_stack<<1)|1;\ } while(0) #define CMDARG_POP do {\ - cmdarg_nest--;\ cmdarg_stack >>= 1;\ } while (0) -#define CMDARG_P() (cmdarg_nest > 0 && (cmdarg_stack&1)) +#define CMDARG_P() (cmdarg_stack && (cmdarg_stack&1)) static int class_nest = 0; static int in_single = 0; @@ -952,7 +952,7 @@ proc_setuid(obj, id) int uid; uid = NUM2INT(id); -#if defined HAVE_SETRESUID +#if defined(HAVE_SETRESUID) && !defined(__CHECKER__) setresuid(uid, -1, -1); #elif defined HAVE_SETREUID setreuid(uid, -1); @@ -984,7 +984,7 @@ proc_setgid(obj, id) int gid; gid = NUM2INT(id); -#if defined HAVE_SETRESGID +#if defined(HAVE_SETRESGID) && !defined(__CHECKER__) setresgid(gid, -1, -1); #elif defined HAVE_SETREGID setregid(gid, -1); @@ -1013,7 +1013,7 @@ static VALUE proc_seteuid(obj, euid) VALUE obj, euid; { -#if defined HAVE_SETRESUID +#if defined(HAVE_SETRESUID) && !defined(__CHECKER__) if (setresuid(-1, NUM2INT(euid), -1) < 0) rb_sys_fail(0); #elif defined HAVE_SETREUID if (setreuid(-1, NUM2INT(euid)) < 0) rb_sys_fail(0); @@ -1042,7 +1042,7 @@ proc_setegid(obj, egid) VALUE obj, egid; { rb_secure(2); -#if defined HAVE_SETRESGID +#if defined(HAVE_SETRESGID) && !defined(__CHECKER__) if (setresgid(-1, NUM2INT(egid), -1) < 0) rb_sys_fail(0); #elif defined HAVE_SETREGID if (setregid(-1, NUM2INT(egid)) < 0) rb_sys_fail(0); @@ -5,7 +5,7 @@ $Author$ created at: Mon Aug 9 18:24:49 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto **********************************************************************/ @@ -6,7 +6,7 @@ $Date$ created at: Tue Aug 10 12:47:31 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto Copyright (C) 2000 Network Applied Communication Laboratory, Inc. Copyright (C) 2000 Information-technology Promotion Agency, Japan @@ -5,7 +5,7 @@ $Author$ created at: Thu Jun 10 14:26:32 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto Copyright (C) 2000 Network Applied Communication Laboratory, Inc. Copyright (C) 2000 Information-technology Promotion Agency, Japan @@ -6,7 +6,7 @@ $Date$ created at: Fri Oct 15 10:39:26 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto Copyright (C) 2000 Network Applied Communication Laboratory, Inc. Copyright (C) 2000 Information-technology Promotion Agency, Japan @@ -6,7 +6,7 @@ $Date$ created at: Mon Aug 9 17:12:58 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto Copyright (C) 2000 Network Applied Communication Laboratory, Inc. Copyright (C) 2000 Information-technology Promotion Agency, Japan @@ -377,7 +377,6 @@ str_independent(str) rb_raise(rb_eSecurityError, "Insecure: can't modify string"); if (!RSTRING(str)->orig || FL_TEST(str, STR_NO_ORIG)) return 1; if (TYPE(RSTRING(str)->orig) != T_STRING) rb_bug("non string str->orig"); - RSTRING(str)->orig = 0; return 0; } @@ -394,6 +393,7 @@ rb_str_modify(str) } ptr[RSTRING(str)->len] = 0; RSTRING(str)->ptr = ptr; + RSTRING(str)->orig = 0; } VALUE @@ -1294,11 +1294,11 @@ str_gsub(argc, argv, str, bang) OBJSETUP(dup, rb_cString, T_STRING); OBJ_INFECT(dup, str); str = (VALUE)dup; - dup->orig = 0; } RSTRING(str)->ptr = buf; RSTRING(str)->len = len = bp - buf; RSTRING(str)->ptr[len] = '\0'; + RSTRING(str)->orig = 0; if (tainted) OBJ_TAINT(str); return str; @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.7.0" -#define RUBY_RELEASE_DATE "2001-01-23" +#define RUBY_RELEASE_DATE "2001-01-29" #define RUBY_VERSION_CODE 170 -#define RUBY_RELEASE_CODE 20010123 +#define RUBY_RELEASE_CODE 20010129 |