[#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:18288] [Feature #440] Better introspection for methods (declaring class, arity)

From: Lasse Koskela <redmine@...>
Date: 2008-08-14 06:26:29 UTC
List: ruby-core #18288
Feature #440: Better introspection for methods (declaring class, arity)
http://redmine.ruby-lang.org/issues/show/440

Author: Lasse Koskela
Status: Open, Priority: Normal


Tools relying on introspection would benefit from having access to information such as:
1) where was a given method declared, and
2) how many arguments does a method accept.

Currently, for 1) one needs to parse the output of Object.new.method(:name).to_s to resolve where a method was inherited from.
For 2), one can only get the number of required arguments with Object.new.method(:name).arity, which isn't sufficient if you want to use the optional arguments, too. With the current implementation of arity, one needs to just "assume" that one can throw an arbitrary number of arguments at the method and see if it fails.

The use case for these enhancements is coming from the open source Robot Framework (http://www.robotframework.org). It's a testing harness where you plug in implementations of test cases in the form of "keyword libraries" implemented in Python, Java, or (hopefully soon) Ruby. In order to report available "keywords" (actions available for the test author, implemented as public methods) to the user, the framework needs to scan available keyword libraries for suitable methods and determine how many arguments each keyword accepts (ideally, with the names of those arguments). Improving Ruby's introspection capabilities would be a boost for Ruby's viability as a Robot Framework keyword library implementation language.

1) would seem like a simple thing to do, given that the information is already available for Method#to_s. I'm not proficient with C, but I might be able to implement that myself as a patch if someone could point me to the right direction regarding the location in the source files.


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next