ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? U:RDoc::AnyMethod[iI"new:ETI"Array::new;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Returns a new array.;To:RDoc::Markup::BlankLineo; ; [I"DWith no block and no argument given, returns a new empty array:;T@o:RDoc::Markup::Verbatim; [I"Array.new # => [] ;T: @format0o; ; [I"XWith no block and array argument given, returns a new array with the same elements:;T@o; ; [I"7Array.new([:foo, 'bar', 2]) # => [:foo, "bar", 2] ;T; 0o; ; [I"NWith no block and integer argument given, returns a new array containing ;TI"6that many instances of the given +default_value+:;T@o; ; [I"Array.new(0) # => [] ;TI"*Array.new(3) # => [nil, nil, nil] ;TI"!Array.new(2, 3) # => [3, 3] ;T; 0o; ; [I"?With a block given, returns an array of the given +size+; ;TI"Icalls the block with each +index+ in the range (0...size); ;TI"Rthe element at that +index+ in the returned array is the blocks return value:;T@o; ; [I"^Array.new(3) {|index| "Element #{index}" } # => ["Element 0", "Element 1", "Element 2"] ;T; 0o; ; [I"UA common pitfall for new Rubyists is providing an expression as +default_value+:;T@o; ; [ I"array = Array.new(2, {}) ;TI"array # => [{}, {}] ;TI"array[0][:a] = 1 ;TI"Karray # => [{a: 1}, {a: 1}], as array[0] and array[1] are same object ;T; 0o; ; [I"SIf you want the elements of the array to be distinct, you should pass a block:;T@o; ; [ I"!array = Array.new(2) { {} } ;TI"array # => [{}, {}] ;TI"array[0][:a] = 1 ;TI"Marray # => [{a: 1}, {}], as array[0] and array[1] are different objects ;T; 0o; ; [I"CRaises TypeError if the first argument is not either an array ;TI"ior an {integer-convertible object}[rdoc-ref:implicit_conversion.rdoc@Integer-Convertible+Objects]). ;TI"FRaises ArgumentError if the first argument is a negative integer.;T@o; ; [I"`Related: see {Methods for Creating an Array}[rdoc-ref:Array@Methods+for+Creating+an+Array].;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"Array.new -> new_empty_array Array.new(array) -> new_array Array.new(size, default_value = nil) -> new_array Array.new(size = 0) {|index| ... } -> new_array ;T0[I"(p1 = v1, p2 = v2);T@FFI" Array;TcRDoc::NormalClass00