[#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:18297] Re: Am I right that this is wrong?

From: "David A. Black" <dblack@...>
Date: 2008-08-14 12:46:13 UTC
List: ruby-core #18297
Hi --

On Thu, 14 Aug 2008, Yukihiro Matsumoto wrote:

> Hi,
>
> In message "Re: [ruby-core:18275] Re: Am I right that this is wrong?"
>    on Thu, 14 Aug 2008 04:04:12 +0900, "David A. Black" <dblack@rubypal.com> writes:
>
> |There was a discussion about this at the Ruby Hoedown. As Jim Weirich
> |pointed out, the nice thing about doing it the other way around is
> |that you could do:
> |
> |   MyClass.instance_methods(:ancestors => true)
> |
> |or
> |
> |   MyClass.instance_methods(:with_ancestors)
> |
> |or whatever, whereas to make the argument false, you have to use false
> |or nil which is very cryptic.
>
> Interesting.  But in a dynamic language like Ruby, inheritance is just
> a mean to share methods and other attributes among classes, so that
> it's not as important as in static typed languages e.g. Java.  When we
> want to know the instance methods of a class, we have more focus on
> the list of methods effective in the instances of the class, not the
> list of methods defined (but not inherited) in particular class.
> Considering the less importance of inheritance in Ruby, I think the
> default should be as it is implemented now.

I understand, but I'll add that in practice, I find myself using
(false) more often than not. When I'm asking classes about their
instance methods, it's usually to find out something like which
methods they've overridden:

   Array.instance_methods(false) & Enumerable.instance_methods(false)

and things like that. Most of the time, the question "What can an
instance do?" seems to be handled at the instance level, with #methods
or #respond_to?

> If you want to have separate method to get the no-ancestors list of
> methods, it's OK as long as we get the "right" name for it.

How about "instance_methods!" :-)


David

-- 
Rails training from David A. Black and Ruby Power and Light:
  *  Advancing With Rails    August 18-21    Edison, NJ
  * Co-taught by D.A. Black and Erik Kastner
See http://www.rubypal.com for details and updates!

In This Thread

Prev Next