[#78633] ruby/spec needs help from CRuby committers — Benoit Daloze <eregontp@...>
Currently, ruby/spec is maintained mostly by individuals and enjoys the
13 messages
2016/12/13
[#78963] Re: ruby/spec needs help from CRuby committers
— Urabe Shyouhei <shyouhei@...>
2017/01/04
I did ask attendees of last developer meeting to join this
[#78642] Re: ruby/spec needs help from CRuby committers
— Eric Wong <normalperson@...>
2016/12/14
Benoit Daloze <eregontp@gmail.com> wrote:
[ruby-core:78734] [Ruby trunk Feature#13026] Public singleton methods
From:
shyouhei@...
Date:
2016-12-20 03:26:21 UTC
List:
ruby-core #78734
Issue #13026 has been updated by Shyouhei Urabe. Tracker changed from Bug to Feature ---------------------------------------- Feature #13026: Public singleton methods https://bugs.ruby-lang.org/issues/13026#change-62104 * Author: Daniel Ferreira * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- Abstract --------- I would like to propose the implementation of: ``` Object#public_singleton_methods ``` `Object#public_singleton_methods` should return a list of public singleton methods. Background ------------ Currently `Object#singleton_methods` returns a list of public and protected singleton methods. Currently the best way I know of retrieving a list of public singleton methods is: ``` foo = Foo.new foo.singleton_methods(false) & foo.public_methods(false) ``` I consider the definition of the public interface of any object very important. For that reason I tend to keep it as simple as possible. Also, the way I like to enforce the design is by using unit tests, testing the interface itself. That way a change of the interface is very visible for the developer and code reviewer. I also tend to use `protected` a lot to give private methods a higher level of relevance. Implementation --------------- This is a feature that I would be very interested in developing. It would be my first contribution to ruby core. If you understand that it is worth the effort I would be more than happy to do it. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>