diff --git a/ChangeLog b/ChangeLog index 0b9fb920b4..fe255531f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Fri Nov 26 13:49:06 2004 Yukihiro Matsumoto + + * io.c (rb_io_initialize): should retrieve flags from copying file + descriptor. [ruby-dev:24961] + + * eval.c (method_missing): raise TypeError for classes do not + have allocators. [ruby-core:03752] + + * lib/erb.rb: [ruby-core:03786] + Fri Nov 26 13:29:02 2004 Dave Thomas * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::look_for_directives_in): Break diff --git a/eval.c b/eval.c index e2651b5ca4..a2e50cce51 100644 --- a/eval.c +++ b/eval.c @@ -5356,7 +5356,7 @@ method_missing(obj, id, argc, argv, call_status) POP_FRAME(); } else if (id == ID_ALLOCATOR) { - rb_raise(rb_eNoMethodError, "allocator undefined for %s", rb_class2name(obj)); + rb_raise(rb_eTypeError, "allocator undefined for %s", rb_class2name(obj)); } nargv = ALLOCA_N(VALUE, argc+1); diff --git a/io.c b/io.c index 99cbd1fb53..ef840e9225 100644 --- a/io.c +++ b/io.c @@ -3971,11 +3971,13 @@ rb_io_initialize(argc, argv, io) flags = rb_io_mode_modenum(RSTRING(mode)->ptr); } } - else if (!NIL_P(orig)) { - GetOpenFile(orig, ofp); - if (ofp->refcnt == LONG_MAX) { - VALUE s = rb_inspect(orig); - rb_raise(rb_eIOError, "too many shared IO for %s", StringValuePtr(s)); + else { + if (!NIL_P(orig)) { + GetOpenFile(orig, ofp); + if (ofp->refcnt == LONG_MAX) { + VALUE s = rb_inspect(orig); + rb_raise(rb_eIOError, "too many shared IO for %s", StringValuePtr(s)); + } } #if defined(HAVE_FCNTL) && defined(F_GETFL) flags = fcntl(fd, F_GETFL);