From: matz@... (Yukihiro Matsumoto) Date: 2003-07-20T02:03:49+09:00 Subject: Re: [Patch] FTP.new with block Hi, In message "Re: [Patch] FTP.new with block" on 03/07/20, Mathieu Bouchard writes: |So I think that in this particular case, it works like this: | |1. people think they know the Ruby API |2. people only ever use File.open |3. people know the block option thereof and use it |4. people know there is a File.new |5. people know Ruby has an "alias" feature and that matz uses it | (eg. Array#indices,#indexes; Enumerable#collect,#map) |6. people know that File.open and .new play the same role |7. people think there is no point in making File.open not like .new. |8. so people assume there is a common method, with an alias. | |that makes sense to anyone? Reasonable. But "open" returns the last value evaluated in the block, for convenience, whereas "new", as I believe, should always return a new instance. For me, this is more important than your reason. matz.