Ruby-dev summary 19711 - 19772

Hello all,

This is a weekly summary of ruby-dev mailing list.

[ruby-dev:19717] File.open with block calls IO#close even if it is
overriden,
[ruby-dev:19771] IO#initialize is not called from IO.pipe and
IO.popen

In current implementation, File#open with a block argument always
calls IO#close directly when exiting the block even if there are
any other close() definition in File or its subclasses. Akira Tanaka
suggested to change this behavior to implement an original IO
buffering routine. Matz said that the current behavior would be better
in speed and able to implement simpler, although he is welcome to a
new idea to change it.

Akira also requested to make IO#pipe and IO#popen call IO#initialize
to add original initialization codes. Nobu Nakada replied that it is
not recommended because that change may break IO’s features as a
"wrapper" of FILE*.

[ruby-dev:19748] [Oniguruma] Version 1.8.2

A new version of Oniguruma has been released. Check it out from:

ftp://ftp.ruby-lang.org/pub/ruby/contrib/onigd20030305.tar.gz

ChangeLog:

  • fixed bugs in subexp

Kazuo Saito ksaito@uranus.dti.ne.jp

What are “original initialization codes”?

I do not understand why calling IO#initialize would break IO’s features
as a wrapper of FILE*. Can you elaborate on this?

Paul

···

On Wed, Mar 12, 2003 at 01:12:50AM +0900, Kazuo Saito wrote:

Akira also requested to make IO#pipe and IO#popen call IO#initialize
to add original initialization codes. Nobu Nakada replied that it is
not recommended because that change may break IO’s features as a
"wrapper" of FILE*.

Hi,

Akira also requested to make IO#pipe and IO#popen call IO#initialize
to add original initialization codes. Nobu Nakada replied that it is
not recommended because that change may break IO’s features as a
"wrapper" of FILE*.

What are “original initialization codes”?

According to [ruby-dev:19717], he seems to be trying original
buffering behavior.

I do not understand why calling IO#initialize would break IO’s features
as a wrapper of FILE*. Can you elaborate on this?

Overriding #initialize method means to expose the parameters to
Ruby level, howeber, raw FILE* pointers are used in IO#popen
under some platforms (other than UNIX and Windows) in the
current implementation. It can be very dangerous.

···

At Wed, 12 Mar 2003 03:17:02 +0900, Paul Brannan wrote:


Nobu Nakada