ÿØÿà JFIF ÿÛ „ ( %!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ ÿÄ J ! 1AQ"aq2‘#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ÿ ‘ñ(ßwpŽ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"aq2‘#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ÿ ‘ñ(ßwpŽ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"aq2‘#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ÿ ‘ñ(ßwpŽ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"aq2‘#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ÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
????????????????????????????????????
????????????????????????????????????
U:RDoc::AnyMethod[iI"sample:ETI"Array#sample;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"*Returns random elements from +self+, ;TI"Fas selected by the object given by the keyword argument +random+.;To:RDoc::Markup::BlankLine o;
; [I"LWith no argument +count+ given, returns one random element from +self+:;T@o:RDoc::Markup::Verbatim; [I"(a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
;TI"a.sample # => 3
;TI"a.sample # => 8
;T:@format0o;
; [I"&Returns +nil+ if +self+ is empty:;T@o;; [I"[].sample # => nil
;T;
0o;
; [I"9With a non-negative numeric argument +count+ given, ;TI"Hreturns a new array containing +count+ random elements from +self+:;T@o;; [I" a.sample(3) # => [8, 9, 2]
;TI")a.sample(6) # => [9, 6, 0, 3, 1, 4]
;T;
0o;
; [I"GThe order of the result array is unrelated to the order of +self+.;T@o;
; [I"4Returns a new empty +Array+ if +self+ is empty:;T@o;; [I"[].sample(4) # => []
;T;
0o;
; [I"%May return duplicates in +self+:;T@o;; [I"a = [1, 1, 1, 2, 2, 3]
;TI".a.sample(a.size) # => [1, 1, 3, 2, 1, 2]
;T;
0o;
; [I"3Returns no more than a.size elements ;TI"0(because no new duplicates are introduced):;T@o;; [I"6a.sample(50) # => [6, 4, 1, 8, 5, 9, 0, 2, 3, 7]
;T;
0o;
; [I"`The object given with the keyword argument +random+ is used as the random number generator:;T@o;; [I")a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
;TI"0a.sample(random: Random.new(1)) # => 6
;TI" [6, 10, 9, 2]
;T;
0o;
; [I"NRelated: see {Methods for Fetching}[rdoc-ref:Array@Methods+for+Fetching].;T:
@fileI"
array.rb;T:0@omit_headings_from_table_of_contents_below0I"Osample(random: Random) -> object
sample(count, random: Random) -> new_ary
;T0[ I"((n = (ary = false), random: Random);T@HFI"
Array;TcRDoc::NormalClass00