diff --git a/ChangeLog b/ChangeLog index d99df6db29..64201a2bc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,35 @@ +Thu Apr 6 20:10:47 2000 Katsuyuki Komatsu + + * ext/extmk.rb.in (create_makefile): BeOS --program-suffix support. + * lib/mkmf.rb (create_makefile): ditto. + +Thu Apr 6 09:55:26 2000 Katsuyuki Komatsu + + * error.c (rb_sys_fail): need rb_exc_new2() call on BeOS. + +Mon Apr 3 17:22:27 2000 Yukihiro Matsumoto + + * eval.c (catch_i): should supply argument. + +Sat Apr 1 21:30:53 2000 WATANABE Hirofumi + + * io.c(rb_io_printf, rb_f_printf): should use rb_io_write. + +Sat Apr 1 00:16:05 2000 Yukihiro Matsumoto + + * gc.c (rb_gc_call_finalizer_at_exit): should be clear flags + before calling finalizers. + +Thu Mar 30 12:19:44 2000 Katsuyuki Komatsu + + * enum.c (enum_find): rb_eval_cmd() should be called with array. + +Tue Mar 28 13:57:05 2000 Clemens Hintze + + * ext/dbm/dbm.c (fdbm_invert): should return new hash. + + * ext/gdbm/gdbm.c (fgdbm_invert): ditto. + Fri Mar 24 18:26:51 2000 Yukihiro Matsumoto * file.c (test_check): should have checked exact number of arguments. diff --git a/enum.c b/enum.c index 3ad7e107e2..70ed18c3ef 100644 --- a/enum.c +++ b/enum.c @@ -92,7 +92,7 @@ enum_find(argc, argv, obj) return arg.val; } if (!NIL_P(if_none)) { - rb_eval_cmd(if_none, Qnil); + rb_eval_cmd(if_none, rb_ary_new2(0)); } return Qnil; } diff --git a/error.c b/error.c index f528eccacd..81ce8b71a6 100644 --- a/error.c +++ b/error.c @@ -663,8 +663,8 @@ rb_sys_fail(mesg) else { ee = syserr_list[n]; } - ee = rb_exc_new2(ee, buf); #endif + ee = rb_exc_new2(ee, buf); rb_iv_set(ee, "errno", INT2FIX(n)); rb_exc_raise(ee); } diff --git a/eval.c b/eval.c index 827e1f9575..b4cf5c3540 100644 --- a/eval.c +++ b/eval.c @@ -393,11 +393,13 @@ rb_attr(klass, id, read, write, ex) attriv = rb_intern(buf); if (read) { rb_add_method(klass, id, NEW_IVAR(attriv), noex); + rb_funcall(klass, rb_intern("method_added"), 1, INT2FIX(id)); } sprintf(buf, "%s=", name); id = rb_intern(buf); if (write) { rb_add_method(klass, id, NEW_ATTRSET(attriv), noex); + rb_funcall(klass, rb_intern("method_added"), 1, INT2FIX(id)); } } @@ -5072,6 +5074,7 @@ rb_mod_modfunc(argc, argv, module) } rb_clear_cache_by_id(id); rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC); + rb_funcall(module, rb_intern("singleton_method_added"), 1, INT2FIX(id)); } return module; } @@ -6253,6 +6256,10 @@ thread_free(th) if (th->stk_ptr) free(th->stk_ptr); th->stk_ptr = 0; if (th->locals) st_free_table(th->locals); + if (th->status != THREAD_KILLED) { + th->prev->next = th->next; + th->next->prev = th->prev; + } if (th != main_thread) free(th); } @@ -7605,7 +7612,7 @@ static VALUE catch_i(tag) ID tag; { - return rb_funcall(Qnil, rb_intern("catch"), 0, INT2FIX(tag)); + return rb_funcall(Qnil, rb_intern("catch"), 1, INT2FIX(tag)); } VALUE diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c index 4d83cec1b1..5f76c54a2a 100644 --- a/ext/dbm/dbm.c +++ b/ext/dbm/dbm.c @@ -262,7 +262,7 @@ fdbm_invert(obj) valstr = rb_tainted_str_new(val.dptr, val.dsize); rb_hash_aset(hash, valstr, keystr); } - return obj; + return hash; } static VALUE diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 20da2a4e47..4444399f3c 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -329,8 +329,8 @@ def create_makefile(target) $DLDFLAGS = '@DLDFLAGS@' - if RUBY_PLATFORM =~ /beos/ - $libs = $libs + " -lruby" + if RUBY_PLATFORM =~ /beos/ and not $static + $libs = $libs + " @LIBRUBYARG@" $DLDFLAGS = $DLDFLAGS + " -L" + $topdir end diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c index b38bb8ef48..3c6452a466 100644 --- a/ext/gdbm/gdbm.c +++ b/ext/gdbm/gdbm.c @@ -264,7 +264,7 @@ fgdbm_invert(obj) valstr = rb_tainted_str_new(val.dptr, val.dsize); rb_hash_aset(hash, valstr, keystr); } - return obj; + return hash; } static VALUE diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb index 9e38db5032..2dea68980c 100644 --- a/ext/tk/lib/tktext.rb +++ b/ext/tk/lib/tktext.rb @@ -427,6 +427,98 @@ class TkTextas.free.flag = 0; run_final((VALUE)p); + } p++; } } diff --git a/io.c b/io.c index 1ea7df8c74..8d898ede2b 100644 --- a/io.c +++ b/io.c @@ -1857,7 +1857,7 @@ rb_io_printf(argc, argv, out) VALUE argv[]; VALUE out; { - io_write(out, rb_f_sprintf(argc, argv)); + rb_io_write(out, rb_f_sprintf(argc, argv)); return Qnil; } @@ -1877,7 +1877,7 @@ rb_f_printf(argc, argv) argv++; argc--; } - io_write(out, rb_f_sprintf(argc, argv)); + rb_io_write(out, rb_f_sprintf(argc, argv)); return Qnil; } diff --git a/lib/ftplib.rb b/lib/ftplib.rb index 0b90749274..4cb1b752d6 100644 --- a/lib/ftplib.rb +++ b/lib/ftplib.rb @@ -2,7 +2,7 @@ # ftplib.rb # -$stderr.puts 'Warning: ftplib.rb is obsolute: use net/ftp' +$stderr.puts 'Warning: ftplib.rb is obsolete: use net/ftp' require 'net/ftp' diff --git a/lib/mkmf.rb b/lib/mkmf.rb index f510e9c509..805be307d0 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -327,7 +327,7 @@ def create_makefile(target) $DLDFLAGS = CONFIG["DLDFLAGS"] if RUBY_PLATFORM =~ /beos/ - $libs = $libs + " -lruby" + $libs = $libs + " " + CONFIG["LIBRUBYARG"] $DLDFLAGS = $DLDFLAGS + " -L" + CONFIG["prefix"] + "/lib" end diff --git a/lib/shellwords.rb b/lib/shellwords.rb index 60996be17c..7b16c6cb52 100644 --- a/lib/shellwords.rb +++ b/lib/shellwords.rb @@ -2,43 +2,46 @@ # original is shellwords.pl # # Usage: -# require 'shellwords.rb' +# require 'shellwords' # words = Shellwords.shellwords(line) # # or # +# require 'shellwords' # include Shellwords # words = shellwords(line) module Shellwords def shellwords(line) - return '' unless line - line.sub! /^\s+/, '' + unless line.kind_of?(String) + raise ArgumentError, "Argument must be String class object." + end + line.sub!(/^\s+/, '') words = [] while line != '' field = '' while true - if line.sub! /^"(([^"\\]|\\.)*)"/, '' then #" + if line.sub!(/^"(([^"\\]|\\.)*)"/, '') then #" snippet = $1 - snippet.gsub! /\\(.)/, '\1' + snippet.gsub!(/\\(.)/, '\1') elsif line =~ /^"/ then #" - raise ArgError, "Unmatched double quote: #{line}" - elsif line.sub! /^'(([^'\\]|\\.)*)'/, '' then #' + raise ArgumentError, "Unmatched double quote: #{line}" + elsif line.sub!(/^'(([^'\\]|\\.)*)'/, '') then #' snippet = $1 - snippet.gsub! /\\(.)/, '\1' + snippet.gsub!(/\\(.)/, '\1') elsif line =~ /^'/ then #' - raise ArgError, "Unmatched single quote: #{line}" - elsif line.sub! /^\\(.)/, '' then + raise ArgumentError, "Unmatched single quote: #{line}" + elsif line.sub!(/^\\(.)/, '') then snippet = $1 - elsif line.sub! /^([^\s\\'"]+)/, '' then #' + elsif line.sub!(/^([^\s\\'"]+)/, '') then #' snippet = $1 else - line.sub! /^\s+/, '' + line.sub!(/^\s+/, '') break end - field += snippet + field.concat(snippet) end - words += field + words.push(field) end words end diff --git a/ruby.h b/ruby.h index 3a77091d1b..654faf39b5 100644 --- a/ruby.h +++ b/ruby.h @@ -192,6 +192,7 @@ int rb_fix2int _((VALUE)); #define FIX2INT(x) FIX2LONG(x) #define FIX2UINT(x) FIX2ULONG(x) #endif +#define ID2SYM(x) INT2FIX(x) #define SYM2ID(x) FIX2INT(x) double rb_num2dbl _((VALUE)); diff --git a/version.h b/version.h index 7c57e7ffef..c397a6539a 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.4.4" -#define RUBY_RELEASE_DATE "2000-03-24" +#define RUBY_RELEASE_DATE "2000-04-10" #define RUBY_VERSION_CODE 144 -#define RUBY_RELEASE_CODE 20000324 +#define RUBY_RELEASE_CODE 20000410