From: nobu.nokada@... Date: 2003-12-08T18:18:53+09:00 Subject: Re: subclassing Errno::XXX Hi, At Mon, 8 Dec 2003 17:47:57 +0900, Yukihiro Matsumoto wrote: > |> In 1.8, Errno::XXX classes are required to define Errno constant that > |> shows its errno. > | > |I'm getting to feel a subclass of SystemCallError may inherit > |it, although agree that still a direct child must define it. > > I'm not sure what you mean. Do you mean when MissingFileError > inherits from Errno::ENOENT, it should inherit Errno constat from > Errno::ENOENT as well? I meant SystemCallError#initialize should use Errno in the parent class. Index: error.c =================================================================== RCS file: /cvs/ruby/src/ruby/error.c,v retrieving revision 1.83 diff -u -2 -p -r1.83 error.c --- error.c 22 Nov 2003 03:59:17 -0000 1.83 +++ error.c 8 Dec 2003 09:18:36 -0000 @@ -594,5 +594,5 @@ syserr_initialize(argc, argv, self) else { rb_scan_args(argc, argv, "01", &mesg); - error = rb_const_get_at(klass, rb_intern("Errno")); + error = rb_const_get(klass, rb_intern("Errno")); } if (!NIL_P(error)) err = strerror(NUM2LONG(error)); -- Nobu Nakada