From: Gavin Sinclair Date: 2004-01-24T08:58:41+09:00 Subject: Re: [ANN] Ruby/Extensions v0.3 released On Saturday, January 24, 2004, 5:07:40 AM, T. wrote: > [...] > i am wondering, given the stated goals, in what direction you plan to proceed > as submissions are made to the project? will you further modularize the > extensions or will you instead limit what can be a part of these extensions? > for instance, in my programs i sometimes include my own modifications to ruby > core classes, one of the main changes consits of some method additions to > NilClass. > class NilClass > def to_f; 0.0; end > def to_h; {}; end > def empty?; true; end > alias size to_i > alias length to_i > end > how might this fit in with the project? Those methods make sense only in very specific cases. They assume you want +nil+ to be like a valid string, integer, array, etc. That's an assumption I (almost) never want to make in my code. One of the stated goals of the project is that methods be general purpose. That's a pretty vague aim, but it's pretty clear that the methods above are not general purpose. Cheers, Gavin