Sha256: 54078015212ffeaa30ccc29c3034d4919d901b4530468f414b3a44d6c20568c0

Contents?: true

Size: 1.21 KB

Versions: 12

Compression:

Stored size: 1.21 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:
clear:@docstringIC:YARD::Docstring"`Removes all elements from _self_.

   a = [ "a", "b", "c", "d", "e" ]
   a.clear    #=> [ ]
:@objectu:YARD::StubProxyArray#clear:
@summary0:	@all"Removes all elements from _self_.

   a = [ "a", "b", "c", "d", "e" ]
   a.clear    #=> [ ]


@overload clear
  @return [Array]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;Array#clear;;;IC;	"
;
u;Array#clear;0;
"@return [Array];[;[o:YARD::Tags::Tag
;
0;0:@types["
Array:
@text":@tag_name"return;0:@parameters[;0:@signature"
clear;"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["array.c0:@namespaceu;
Array:
@path"Array#clear;[:@visibility:public:@source"¾/* 
 *  call-seq:
 *     array.clear    ->  array
 *
 *  Removes all elements from _self_.
 *
 *     a = [ "a", "b", "c", "d", "e" ]
 *     a.clear    #=> [ ]
 */

VALUE
rb_ary_clear(ary)
    VALUE ary;
{
    rb_ary_modify(ary);
    RARRAY(ary)->len = 0;
    if (ARY_DEFAULT_SIZE * 2 < RARRAY(ary)->aux.capa) {
    REALLOC_N(RARRAY(ary)->ptr, VALUE, ARY_DEFAULT_SIZE * 2);
    RARRAY(ary)->aux.capa = ARY_DEFAULT_SIZE * 2;
    }
    return ary;
}:@source_type:c

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pry-doc-0.4.4 lib/pry-doc/core_docs_18/objects/Array/clear_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Array/clear_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Array/clear_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Array/clear_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Array/clear_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Array/clear_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Array/clear_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Array/clear_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Array/clear_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Array/clear_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Array/clear_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Array/clear_i.dat