⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Set
/
Edit File: cdesc-Set.ri
U:RDoc::NormalClass[iI"Set:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[ : @fileI"!ext/json/lib/json/add/set.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"ISet implements a collection of unordered values with no duplicates. ;TI"JThis is a hybrid of Array's intuitive inter-operation facilities and ;TI"Hash's fast lookup.;To:RDoc::Markup::BlankLine o;;[ I"GSet is easy to use with Enumerable objects (implementing +each+). ;TI"IMost of the initializer methods and binary operators accept generic ;TI"GEnumerable objects besides sets and arrays. An Enumerable object ;TI"7can be converted to Set using the +to_set+ method.;T@o;;[I"ESet uses Hash as storage, so you must note the following points:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o;;[I"EEquality of elements is determined according to Object#eql? and ;TI"EObject#hash. Use Set#compare_by_identity to make a set compare ;TI"$its elements by their identity.;To;;0;[o;;[I"CSet assumes that the identity of each element does not change ;TI"Hwhile it is stored. Modifying an element of a set will render the ;TI" set to an unreliable state.;To;;0;[o;;[I"CWhen a string is to be stored, a frozen copy of the string is ;TI"Astored instead unless the original string is already frozen.;T@S:RDoc::Markup::Heading: leveli: textI"Comparison;T@o;;[ I"BThe comparison operators <, >, <=, and >= are implemented as ;TI"Hshorthand for the {proper_,}{subset?,superset?} methods. However, ;TI"Jthe <=> operator is intentionally left out because not every pair of ;TI"8sets is comparable ({x, y} vs. {x, z} for example).;T@S;;i;I"Example;T@o:RDoc::Markup::Verbatim;[ I"require 'set' ;TI">s1 = Set[1, 2] #=> #<Set: {1, 2}> ;TI">s2 = [1, 2].to_set #=> #<Set: {1, 2}> ;TI"4s1 == s2 #=> true ;TI"Es1.add("foo") #=> #<Set: {1, 2, "foo"}> ;TI"Hs1.merge([2, 6]) #=> #<Set: {1, 2, "foo", 6}> ;TI"5s1.subset?(s2) #=> false ;TI"4s2.subset?(s1) #=> true ;T:@format0S;;i;I"Contact;T@o;;[I"<- Akinori MUSHA <knu@iDaemons.org> (current maintainer);T;0; I"lib/set.rb;T; 0; 0; 0[ [ [[I"Enumerable;To;;[ ; @N; 0I"lib/set.rb;T[[I" class;T[[:public[[I"[];T@V[I"json_create;TI"!ext/json/lib/json/add/set.rb;T[I"new;T@V[:protected[ [:private[ [I" instance;T[[;[>[I"&;T@V[I"+;T@V[I"-;T@V[I"<;T@V[I"<<;T@V[I"<=;T@V[I"==;T@V[I"===;T@V[I">;T@V[I">=;T@V[I"^;T@V[I"add;T@V[I" add?;T@V[I"as_json;T@a[I" classify;T@V[I" clear;T@V[I" collect!;T@V[I"compare_by_identity;T@V[I"compare_by_identity?;T@V[I"delete;T@V[I"delete?;T@V[I"delete_if;T@V[I"difference;T@V[I"disjoint?;T@V[I"divide;T@V[I" each;T@V[I"empty?;T@V[I"filter!;T@V[I"flatten;T@V[I" flatten!;T@V[I" include?;T@V[I"initialize_clone;T@V[I"initialize_dup;T@V[I"inspect;T@V[I"intersect?;T@V[I"intersection;T@V[I"keep_if;T@V[I"length;T@V[I" map!;T@V[I"member?;T@V[I" merge;T@V[I"proper_subset?;T@V[I"proper_superset?;T@V[I"reject!;T@V[I"replace;T@V[I" reset;T@V[I"select!;T@V[I" size;T@V[I"subset?;T@V[I" subtract;T@V[I"superset?;T@V[I" to_a;T@V[I"to_json;T@a[I" to_s;T@V[I"to_set;T@V[I" union;T@V[I"|;T@V[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0; 0[@ @N@NcRDoc::TopLevel
Simpan