[ruby-cvs:73312] nobu:r66212 (trunk): implement Array-specific #all?, #none?, #one?

nobu at ruby-lang.org nobu at ruby-lang.org
Wed Dec 5 13:25:44 JST 2018


nobu	2018-12-05 13:25:44 +0900 (Wed, 05 Dec 2018)

  New Revision: 66212

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66212

  Log:
    implement Array-specific #all?, #none?, #one?
    
    Before this patch Array#all? was not implemented in Array class
    and alternatively Enumerable#all? was used, while #any? has its
    own method entry in Array class.  Similarly, Array#none? and #one?
    also lacks its own implementation.
    This patch provides Array-specific implementations for above three
    methods to enable faster method lookup.
    
    [Fix GH-2041]
    
    From: Koji Onishi <fursich0 at gmail.com>

  Modified files:
    trunk/array.c


More information about the ruby-cvs mailing list