Dave: > > # this is what I expect to work > > # file.print "\00" * (1023 - (file.size-1) % 1024) > > Did you try file#tell? No, didn't feel intuitive (so I didn't find it), but it seems to work (without need to flush) so that solves the problem. It seems File.size is meant to be used with physical files which are located in the disk already. Thanks! For OS dependency: > > NEEDS_BINMODE = true if /WIN/ni === RUBY_PLATFORM > > PATH_SEPARATOR = {'UNIX'=>'/', 'WINDOWS'=>'\\', 'MACINTOSH'=>':'} > There _is_ absolutely no need for code like this in libraries, which > is why you'll discover that the libraries use neither value. A Ruby You're totally right. Should have checked the real usage first. Well, it's time for small polishing :). Even when my original point missed target regrettably I'd like to discuss about this a little bit more. I like the idea to be able to 'select' without any preparations, but even then I can't help to think this is just a feature provided by OS. Ruby's providing the functionality as it's granted, pretending that real functionality for select exists for sure. Everything is ok while there really is such thing. But what happens to the guy wanting to use Ruby in a environment where TCP/IP is not supported or to the guy wanting to use totally other network protocol. Of course both of these cases can be worked out (one can overwrite current functionality with own versions, or simply create own libraries), but I think Ruby is not promoting easiness of such thing by well thought, organized and implemented interfaces for system, OS or platform dependent feature importation. Current code for IO is quite handy working by default even with IPv6 (doesn't it?). Even so, it might be better to have real IPv4 and IPv6 libraries around and having common IO to use those libraries (or maybe hardcoding something for performance). Maybe I should just shut up on these issues, since I don't know them, can't propose anything really useful, nor implement it right-away. I'm just promoting my feel (or fear) for something I don't know, nor understand, and if you don't feel it's useful I'd stop here. And what it comes to beautifulness of Java style constructor: > > # This is how I made Ruby to eat more beautiful "obj = new Class". > If you find this more beautiful, then I suspect you haven't yet had > that moment of revelation when you realize how Ruby's classes, > metaclasses, and objects all interact in harmony. This last one was a little bit kind of provocation. I'm not happy you didn't chew and swallow it until it explodes B-). Thanks, for the correction, anyway. - Aleksi