From: Minero Aoki Date: 2002-03-04T14:04:44+09:00 Subject: ruby-dev summary 16040-16125 Hi all, We (Masayoshi Takahashi, Takaaki Tateishi and me) have started ruby-dev ML summarization project. This mail is the first one. Mails will be posted on every Monday. ---- ruby-dev #16040-16125 (2002-02-23 .. 2002-02-26) ---- [ruby-dev:16041] Method#inspect In 1.6, the return value of Method#inspect is not apropriate for singleton methods. e.g. p File.method(:atime) #=> # This is a known feature of ruby 1.6. In 1.7, the behavior is changed: p File.method(:atime) #=> # [ruby-dev:16059] New Struct Consider why Struct class is poorly used. We need two steps to create a new Struct object, because Struct.new creates a new class. How about this shortcut method: st = Struct.new(:name => 'ruby', :age => 9) p st.type #=> Struct p st.name #=> "ruby" p st.age #=> 9 Responses: * OpenStruct (lib/ostruct.rb) does same thing. * I think C's struct is the background of this idea. But the Struct class is pretty different from C's struct. * This shortcut is useful when returning multiple objects with names. (keyword return value?) def some_method .... return Struct.new(:name => 'ruby, :age => 9) end [ruby-dev:16068] UNIXSocket#{send_io,recv_io} TANAKA Akira has implemented UNIXSocket#send_io/recv_io, which can send IO to other processes. They are acceptable in 1.7. [ruby-dev:16070] Re: Ruby M17N request K.Kosako has announced his new regexp engine "ONI-GRUMA". This engine has almost all features of current ruby's and it is licensed under the non-GPL free license. You can get experimental version of this library from: ftp://ftp.ruby-lang.org/pub/ruby/contrib/onigd20020225.tar.gz It is a candidate of the regexp engine of Ruby 2.0 (Rite). [ruby-dev:16049] defined? autoload constant Kazuhiro Nishiyama has requested to load "autoload"ed files on defined?(const). Matz has rejected this request because such code is in bad manner. [ruby-dev:16050] ParseDate.to_time Kazuhiro Nishiyama has requested ParseDate.to_time which creates a Time object, not an array, from string. --> lib/time.rb does same thing. [ruby-dev:16074] How to do large file support? Oliver M. Bolzer wants to handle large files (over 2GB files). Matz is positive for this request. [ruby-dev:16082] Array#select without block Matz is requesting another name of Array#select. (see also [ruby-talk:10830]) [ruby-dev:16094] tsort.rb TANAKA Akira wants public comments on his topological-sort library (This library is going to be bandled with ruby). You can get it from cvs.ruby-lang.org ("rough" module) or this URL: http://www.ruby-lang.org/~knu/cgi-bin/cvsweb.cgi/rough/lib/tsort.rb [ruby-dev:16109] No trace_func event at if-elsif-else line Hiroshi Nakamura (NaHi) has requested to call trace function additionally on if/elsif line, for his path coverage viewer. This request has been included in 1.7. # his path coverage viewer http://www.jin.gr.jp/~nahi/RWiki/index.cgi?cmd=view;name=coverage.rb -- Minero Aoki