diff --git a/ChangeLog b/ChangeLog index 8f5c025b7a..b6176c84c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jan 14 21:49:28 2001 Koji Arai + + * sprintf.c (rb_f_sprintf): simple typo. binary base should be 2, + not '2'. + Sun Jan 14 02:49:57 2001 Minero Aoki * lib/net/protocol.rb (adding): too few "yield" in case of arg is @@ -10,6 +15,12 @@ Sat Jan 13 19:18:18 2001 WATANABE Hirofumi * re.c (rb_reg_options): add RE_OPTION_{POSIXLINE,RE_OPTION_MULTILINE, RE_OPTION_EXTENDED} +Thu Jan 11 06:45:55 2001 Yukihiro Matsumoto + + * object.c (rb_mod_dup): should propagate FL_SINGLETON. + + * object.c (inspect_obj): handles the case of no instance variable. + Wed Jan 10 01:50:45 2001 Yukihiro Matsumoto * string.c (rb_str_reverse_bang): forgot to call rb_str_modify(). diff --git a/io.c b/io.c index 08d14695c6..a317016305 100644 --- a/io.c +++ b/io.c @@ -2283,7 +2283,7 @@ prep_stdio(f, mode, klass) return (VALUE)io; } -static VALUE +static void prep_path(io, path) VALUE io; char *path; diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 9ca5e69ef1..8f614cf6c3 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -370,10 +370,9 @@ def create_makefile(target, srcdir = File.dirname($0)) end $DLDFLAGS = CONFIG["DLDFLAGS"] - if $configure_args['--enable-shared'] or CONFIG['LIBRUBY'] != CONFIG['LIBRUBY_A'] - $libs = CONFIG["LIBRUBYARG"] + " " + $libs - $LIBPATH |= ["$(topdir)", CONFIG["libdir"]] - end + $libs = CONFIG["LIBRUBYARG"] + " " + $libs + $configure_args['--enable-shared'] or $LIBPATH |= ["$(topdir)"] + $LIBPATH |= [CONFIG["libdir"]] defflag = '' if RUBY_PLATFORM =~ /cygwin|mingw/ diff --git a/missing/strftime.c b/missing/strftime.c index 6bce490249..3042649aeb 100644 --- a/missing/strftime.c +++ b/missing/strftime.c @@ -113,12 +113,6 @@ extern char *getenv(); extern char *strchr(); #endif -#ifdef __GNUC__ -#define inline __inline__ -#else -#define inline /**/ -#endif - #define range(low, item, hi) max(low, min(item, hi)) #if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME) diff --git a/missing/vsnprintf.c b/missing/vsnprintf.c index d297209d06..489bf58361 100644 --- a/missing/vsnprintf.c +++ b/missing/vsnprintf.c @@ -108,9 +108,7 @@ #define __const #endif /* People who don't like const sys_error */ -#if defined NT && !defined __MINGW32__ -typedef long size_t; -#endif +#include #ifndef NULL #define NULL 0 @@ -1095,8 +1093,6 @@ vsnprintf(str, n, fmt, ap) static char sccsid[] = "@(#)snprintf.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ -#include - #if defined(__STDC__) # include #else diff --git a/object.c b/object.c index 03c40638ff..1b5a19f837 100644 --- a/object.c +++ b/object.c @@ -162,6 +162,7 @@ inspect_i(id, value, str) if (!rb_is_instance_id(id)) return ST_CONTINUE; if (RSTRING(str)->ptr[0] == '-') { /* first element */ RSTRING(str)->ptr[0] = '#'; + rb_str_cat2(str, " "); } else { rb_str_cat2(str, ", "); @@ -182,6 +183,7 @@ inspect_obj(obj, str) { st_foreach(ROBJECT(obj)->iv_tbl, inspect_i, str); rb_str_cat2(str, ">"); + RSTRING(str)->ptr[0] = '#'; OBJ_INFECT(str, obj); return str; @@ -540,6 +542,9 @@ rb_mod_dup(module) { VALUE dup = rb_mod_clone(module); OBJSETUP(dup, RBASIC(module)->klass, BUILTIN_TYPE(module)); + if (FL_TEST(mod, FL_SINGLETON)) { + FL_SET(dup, FL_SINGLETON); + } return dup; } diff --git a/prec.c b/prec.c index 8dcd121bc0..fab5ea3899 100644 --- a/prec.c +++ b/prec.c @@ -43,7 +43,7 @@ prec_prec_f(x) static VALUE prec_induced_from(module, x) - + VALUE module, x; { rb_raise(rb_eTypeError, "undefined conversion from %s into %s", rb_class2name(CLASS_OF(x)), rb_class2name(module)); diff --git a/re.c b/re.c index 06e58f535a..eb5d5a7540 100644 --- a/re.c +++ b/re.c @@ -1015,6 +1015,7 @@ rb_reg_initialize_m(argc, argv, self) p = rb_str2cstr(src, &len); rb_reg_initialize(self, p, len, flag); } + return self; } static VALUE diff --git a/sprintf.c b/sprintf.c index 756de87ed9..178f81f192 100644 --- a/sprintf.c +++ b/sprintf.c @@ -573,7 +573,7 @@ rb_f_sprintf(argc, argv) break; case 8: c = '7'; break; - case '2': + case 2: c = '1'; break; } s = &buf[pos];