diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-26 04:50:36 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-26 04:50:36 +0000 |
commit | e9225b9bb7d1d5d2552ffed53c1287439760c2c2 (patch) | |
tree | 6bcbb61d43f1203cd0586e4e3f72d416b6423298 | |
parent | b208787a4f70b5c89756e8a230ca946e83d3657c (diff) | |
download | ruby-e9225b9bb7d1d5d2552ffed53c1287439760c2c2.tar.gz ruby-e9225b9bb7d1d5d2552ffed53c1287439760c2c2.tar.xz ruby-e9225b9bb7d1d5d2552ffed53c1287439760c2c2.zip |
* 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]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | io.c | 12 |
3 files changed, 18 insertions, 6 deletions
@@ -1,3 +1,13 @@ +Fri Nov 26 13:49:06 2004 Yukihiro Matsumoto <matz@ruby-lang.org> + + * 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 <dave@pragprog.com> * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::look_for_directives_in): Break @@ -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); @@ -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); |