[#18121] [Ruby 1.8.7 - Bug #405] (Open) ssl.rb:31: [BUG] Bus Error — Anonymous <redmine@...>

Issue #405 has been reported by Anonymous.

14 messages 2008/08/04

[#18130] Re: New array methods cycle, choice, shuffle (plus bug in cycle) — Brian Candler <B.Candler@...>

> Seriously though... Array.first is a noun.

10 messages 2008/08/05

[#18319] NEW Command: absolute_path() -- — "C.E. Thornton" <admin@...>

Core,

14 messages 2008/08/16
[#18321] Re: NEW Command: absolute_path() -- — Yukihiro Matsumoto <matz@...> 2008/08/18

Hi,

[#18381] [Bug #496] DRb.start_service(nil) is very slow — Hongli Lai <redmine@...>

Bug #496: DRb.start_service(nil) is very slow

11 messages 2008/08/25

[ruby-core:18383] RCR: instance_methods(ancestor)

From: Trans <transfire@...>
Date: 2008-08-25 17:31:16 UTC
List: ruby-core #18383
I'm wondering if anyone here saw this post on ruby-talk. It's seem
like such a good idea to me that I was surprised with the minimal
response... but then again, it seems like very few core Rubyists spend
much time on ruby-talk these days. In any case, I figure I'd post it
here just to be sure.

= Problem

Currently Module#instance_methods (and company) take a single
argument, true or false, as to whether to include all ancestor
methods. I've written enough metacode to come across the need to limit
the search at a particular ancestor. This currently requires code
like:

      meths = []
      ancestors[0..ancestors.index(FooAncestor)].each do |anc|
        meths = meths | anc.instance_methods(false)
      end

It would be nice if we could simply say:

  instance_methods(FooAncestor)

= Solution

I leave the full solution to more capable C peoples. I imagine it
would not be too difficult however.

= Analysis

This change is, practically-speaking, backward compatible. It also
eliminates the dreaded true|false argument, and can be applied to the
entire family of "methods" methods.

Thanks,
T.

In This Thread

Prev Next