From: kjana@... (YANAGAWA Kazuhisa) Date: 2001-03-11T12:59:44+09:00 Subject: [ruby-talk:12400] Re: RCR: Block form of Dir.chdir In message matju@sympatico.ca writes: > > Dir.chdir(new_dir) { > > # work in new_dir... > > } > > Sounds good to me. If File.open can, why not this one. ``Because chdir changes context of a program'' ....I heard such. That is, if one thread execute chdir, a working directory of other threads also changed. This behavior can break an assumption on programming. ``Actually this is a problem now too, but block form of chdir may obscure what is occurring because of its `enclosing' looking. So more deep thought is needed.'' Add a current working directory to context of a thread resolve this but it seems too heavy to realize, since it means at least one more system call on context switching. I personally think, we can alter the implementer's mind when more complaints are arised :-) -- kjana@os.xaxon.ne.jp March 11, 2001 It is never late to mend.