diff options
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | class.c | 11 | ||||
-rw-r--r-- | eval.c | 1 | ||||
-rw-r--r-- | io.c | 2 | ||||
-rw-r--r-- | object.c | 3 |
5 files changed, 29 insertions, 3 deletions
@@ -1,3 +1,18 @@ +Wed Mar 28 17:39:04 2001 Yukihiro Matsumoto <[email protected]> + + * object.c (rb_str2cstr): warn if string contains \0 and length + value is ignored. + +Wed Mar 28 15:00:31 2001 K.Kosako <[email protected]> + + * class.c (rb_singleton_class_clone): should copy class constant + table as well. + +Wed Mar 28 15:03:23 2001 Yukihiro Matsumoto <[email protected]> + + * class.c (rb_include_module): sometimes cache was mistakenly left + uncleared - based on the patch by K.Kosako. + Wed Mar 28 09:52:33 2001 WATANABE Hirofumi <[email protected]> * win32/Makefile.sub: disable global optimization. @@ -67,6 +67,9 @@ rb_singleton_class_clone(klass) clone->super = RCLASS(klass)->super; clone->iv_tbl = 0; clone->m_tbl = 0; + if (RCLASS(klass)->iv_tbl) { + clone->iv_tbl = st_copy(RCLASS(klass)->iv_tbl); + } clone->m_tbl = st_init_numtable(); st_foreach(RCLASS(klass)->m_tbl, clone_method, clone->m_tbl); FL_SET(clone, FL_SINGLETON); @@ -217,6 +220,7 @@ rb_include_module(klass, module) VALUE klass, module; { VALUE p; + int changed = 0; if (NIL_P(module)) return; if (klass == module) return; @@ -238,16 +242,17 @@ rb_include_module(klass, module) if (RCLASS(module)->super) { rb_include_module(p, RCLASS(module)->super); } + if (changed) rb_clear_cache(); return; } } rb_frozen_class_p(klass); - RCLASS(klass)->super = - include_class_new(module, RCLASS(klass)->super); + RCLASS(klass)->super = include_class_new(module, RCLASS(klass)->super); klass = RCLASS(klass)->super; module = RCLASS(module)->super; + changed = 1; } - rb_clear_cache(); + if (changed) rb_clear_cache(); } VALUE @@ -4099,6 +4099,7 @@ static int STACK_LEVEL_MAX = 65535; #ifdef __human68k__ extern int _stacksize; # define STACK_LEVEL_MAX (_stacksize - 4096) +#undef HAVE_GETRLIMIT #else #ifdef HAVE_GETRLIMIT static int STACK_LEVEL_MAX = 655300; @@ -2771,6 +2771,7 @@ rb_f_select(argc, argv, obj) return res; /* returns an empty array on interrupt */ } +#if !defined(MSDOS) && !defined(__human68k__) static int io_cntl(fd,cmd,narg,io_p) int fd, cmd, io_p; @@ -2796,6 +2797,7 @@ io_cntl(fd,cmd,narg,io_p) #endif return retval; } +#endif static VALUE rb_io_ctl(io, req, arg, io_p) @@ -1044,6 +1044,9 @@ rb_str2cstr(str, len) str = rb_str_to_str(str); } if (len) *len = RSTRING(str)->len; + else if (ruby_verbose && RSTRING(str)->len != strlen(RSTRING(str)->ptr)) { + rb_warn("string contains \\0 character"); + } return RSTRING(str)->ptr; } |