facets 2.4.5 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +6 -2
- data/CHANGES +46 -52
- data/MANIFEST +680 -642
- data/README +3 -10
- data/RELEASE +82 -36
- data/VERSION +1 -1
- data/doc/archive/{changelog-0.rdoc → CHANGELOG-0.10.30} +0 -0
- data/doc/archive/{changelog-1.rdoc → CHANGELOG-1.8.54} +0 -0
- data/doc/archive/CHANGELOG-2.4.5 +1654 -0
- data/doc/{news → archive}/RELEASE-2.0.5 +0 -0
- data/doc/{news → archive}/RELEASE-2.1.0 +0 -0
- data/doc/{news → archive}/RELEASE-2.1.1 +0 -0
- data/doc/{news → archive}/RELEASE-2.1.2 +0 -0
- data/doc/{news → archive}/RELEASE-2.1.3 +0 -0
- data/doc/{news → archive}/RELEASE-2.2.0 +0 -0
- data/doc/{news → archive}/RELEASE-2.2.1 +0 -0
- data/doc/{news → archive}/RELEASE-2.3.0 +0 -0
- data/doc/{news → archive}/RELEASE-2.4.0 +0 -0
- data/doc/{news → archive}/RELEASE-2.4.1 +0 -0
- data/doc/{news → archive}/RELEASE-2.4.2 +0 -0
- data/doc/{news → archive}/RELEASE-2.4.3 +0 -0
- data/doc/{news → archive}/RELEASE-2.4.4 +0 -0
- data/doc/archive/RELEASE-2.4.5 +37 -0
- data/doc/{book/history.rdoc → guide/notes.rd} +62 -4
- data/doc/log/basic_stats/index.html +39 -0
- data/doc/log/bstats/stats.html +39 -0
- data/doc/log/changelog.html +141 -0
- data/doc/log/changelog.txt +1609 -0
- data/doc/log/stats.html +25 -0
- data/doc/log/testlog.txt +278 -0
- data/doc/rdoc/core/classes/Array.html +158 -147
- data/doc/rdoc/core/classes/Binding.html +54 -54
- data/doc/rdoc/core/classes/Class.html +59 -57
- data/doc/rdoc/core/classes/Comparable.html +67 -76
- data/doc/rdoc/core/classes/Dir.html +47 -47
- data/doc/rdoc/core/classes/Enumerable.html +232 -192
- data/doc/rdoc/core/classes/Exception.html +15 -16
- data/doc/rdoc/core/classes/File.html +128 -85
- data/doc/rdoc/core/classes/FileTest.html +7 -7
- data/doc/rdoc/core/classes/Float.html +16 -14
- data/doc/rdoc/core/classes/Functor.html +12 -12
- data/doc/rdoc/core/classes/Hash.html +490 -319
- data/doc/rdoc/core/classes/Indexable.html +110 -110
- data/doc/rdoc/core/classes/InstanceVariables.html +44 -44
- data/doc/rdoc/core/classes/Integer.html +122 -116
- data/doc/rdoc/core/classes/Kernel.html +415 -401
- data/doc/rdoc/core/classes/Lazy/Promise.html +1 -1
- data/doc/rdoc/core/classes/MatchData.html +24 -21
- data/doc/rdoc/core/classes/Module.html +230 -229
- data/doc/rdoc/core/classes/NilClass.html +28 -26
- data/doc/rdoc/core/classes/Numeric.html +30 -30
- data/doc/rdoc/core/classes/Object.html +8 -8
- data/doc/rdoc/core/classes/{Friend.html → ObjectSpace.html} +25 -48
- data/doc/rdoc/core/classes/Proc.html +29 -27
- data/doc/rdoc/core/classes/Range.html +17 -15
- data/doc/rdoc/core/classes/Regexp.html +17 -17
- data/doc/rdoc/core/classes/Stackable.html +31 -31
- data/doc/rdoc/core/classes/String.html +445 -401
- data/doc/rdoc/{more/classes/CLI/NoOptionError.html → core/classes/Struct.html} +24 -21
- data/doc/rdoc/core/classes/Symbol.html +73 -65
- data/doc/rdoc/core/classes/Time.html +87 -86
- data/doc/rdoc/core/classes/TrueClass.html +8 -8
- data/doc/rdoc/core/classes/UnboundMethod.html +17 -16
- data/doc/rdoc/core/created.rid +1 -1
- data/doc/rdoc/core/files/README.html +10 -16
- data/doc/rdoc/core/files/lib/core/facets/array/combination_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/conjoin_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/delete_rb.html +10 -1
- data/doc/rdoc/core/files/lib/core/facets/array/delete_unless_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/array/delete_values_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/array/index_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/indexable_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/merge_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/only_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/pad_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/permutation_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/product_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/rotate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/select_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/splice_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/stackable_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/binding/caller_rb.html +2 -2
- data/doc/rdoc/core/files/lib/core/facets/binding/callstack_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/binding/defined_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/bitmask_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/class/cattr_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/class/descendents_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/class/prepend_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/class/to_proc_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/comparable/at_least_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/comparable/at_most_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/comparable/bound_rb.html +5 -1
- data/doc/rdoc/core/files/lib/core/facets/comparable/cap_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/comparable/clip_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/comparable/cmp_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/comparable/comparable_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/dir/ascend_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/dir/multiglob_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/dir/recurse_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/accumulate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/cluster_by_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/collect_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/commonality_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/count_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/divide_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/duplicates_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/each_by_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/entropy_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/frequency_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/graph_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/enumerable/group_by_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/inject_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/map_send_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/mash_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/mode_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/modulate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/none_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/occur_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/one_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/probability_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/sum_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/take_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/enumerable/uniq_by_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/exception/detail_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/exception/suppress_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/append_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/create_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/null_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/read_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/rewrite_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/rootname_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/split_all_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/file/split_root_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/write_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/writelines_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/filetest/root_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/alias_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/autonew_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/collate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/delete_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/insert_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/inverse_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/join_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/keys_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/op_add_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/op_and_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/op_mul_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/op_or_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/op_push_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/op_sub_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/rekey_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/replace_each_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/hash/select_rb.html +1 -1
- data/doc/rdoc/{more/files/lib/more → core/files/lib/core}/facets/hash/stringify_keys_rb.html +1 -1
- data/doc/rdoc/{more/files/lib/more → core/files/lib/core}/facets/hash/symbolize_keys_rb.html +2 -2
- data/doc/rdoc/core/files/lib/core/facets/hash/to_options_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/hash/to_struct_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/traverse_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/update_each_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/hash/update_keys_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/hash/update_rb.html +8 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/update_values_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/hash/weave_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/zipnew_rb.html +1 -5
- data/doc/rdoc/core/files/lib/core/facets/integer/factorial_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/integer/multiple_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/integer/odd_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/__here___rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/kernel/as_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/ask_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/attr_singleton_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/callstack_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/kernel/complete_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/constant_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/d_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/demo_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/ergo_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/instance_class_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/instance_variables_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/not_nil_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/object_send_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/p_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/populate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/qua_class_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/resc_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/respond_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/returning_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/silence_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/try_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/matchdata/match_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/matchdata/matchset_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/metaid_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/abstract_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/alias_accessor_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/alias_method_chain_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/alias_module_function_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/ancestor_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/basename_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/conflict_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/include_function_module_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/instance_methods_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/is_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/methodize_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/modspace_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/module_load_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/nesting_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/op_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/prepend_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/redefine_method_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/rename_method_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/revise_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/spacename_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/wrap_method_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/nilclass/to_f_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/numeric/approx_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/numeric/distance_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/numeric/round_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/objectspace/classes_rb.html +92 -0
- data/doc/rdoc/{more/files/lib/more/facets/dictionarymatcher_rb.html → core/files/lib/core/facets/objectspace_rb.html} +4 -4
- data/doc/rdoc/core/files/lib/core/facets/proc/bind_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/proc/compose_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/proc/to_method_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/proc/update_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/range/combine_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/range/overlap_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/range/within_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/regexp/arity_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/align_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/bracket_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/camelcase_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/capitalized_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/chars_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/chomp_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/cleave_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/compress_lines_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/string/contains_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/string/divide_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/expand_tab_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/string/fold_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/indent_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/string/interpolate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/line_wrap_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/lines_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/margin_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/string/methodize_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/mscan_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/natcmp_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/nchar_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/op_sub_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/outdent_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/string/range_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/rewrite_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/shatter_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/snakecase_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/splice_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/start_with_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/tab_rb.html +8 -1
- data/doc/rdoc/core/files/lib/core/facets/string/tabto_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/string/titlecase_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/to_re_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/word_wrap_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/struct/attributes_rb.html +92 -0
- data/doc/rdoc/{more/files/lib/more/facets/bytes_rb.html → core/files/lib/core/facets/struct_rb.html} +4 -4
- data/doc/rdoc/core/files/lib/core/facets/symbol/chomp_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/symbol/generate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/symbol/not_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/symbol/succ_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/symbol/to_proc_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/time/advance_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/time/change_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/time/elapse_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/time/hence_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/time/stamp_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/to_hash_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/unboundmethod/arguments_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/unboundmethod/name_rb.html +1 -1
- data/doc/rdoc/core/fr_class_index.html +2 -1
- data/doc/rdoc/core/fr_file_index.html +30 -1
- data/doc/rdoc/core/fr_method_index.html +430 -423
- data/doc/rdoc/lore/classes/Date.html +6 -5
- data/doc/rdoc/{more/classes/CLI/Command/UniversalOptions.html → lore/classes/Enumerable.html} +7 -9
- data/doc/rdoc/lore/classes/Enumerable/Enumerator.html +147 -0
- data/doc/rdoc/lore/classes/OpenStruct.html +13 -15
- data/doc/rdoc/lore/created.rid +1 -1
- data/doc/rdoc/lore/files/README.html +10 -16
- data/doc/rdoc/lore/files/lib/lore/facets/date_rb.html +1 -1
- data/doc/rdoc/lore/files/lib/lore/facets/enumerator_rb.html +111 -0
- data/doc/rdoc/lore/files/lib/lore/facets/ostruct_rb.html +1 -1
- data/doc/rdoc/lore/fr_class_index.html +2 -0
- data/doc/rdoc/lore/fr_file_index.html +1 -0
- data/doc/rdoc/lore/fr_method_index.html +13 -12
- data/doc/rdoc/more/classes/ANSICode.html +66 -66
- data/doc/rdoc/more/classes/Advisable.html +37 -37
- data/doc/rdoc/more/classes/Advisable/Method.html +20 -20
- data/doc/rdoc/more/classes/Archive/Tar/Minitar.html +27 -27
- data/doc/rdoc/more/classes/Archive/Tar/Minitar/Input.html +28 -28
- data/doc/rdoc/more/classes/Archive/Tar/Minitar/Output.html +19 -19
- data/doc/rdoc/more/classes/Archive/Tar/Minitar/Reader.html +31 -31
- data/doc/rdoc/more/classes/Archive/Tar/Minitar/Writer.html +33 -33
- data/doc/rdoc/more/classes/Argvector.html +76 -76
- data/doc/rdoc/more/classes/Association.html +28 -28
- data/doc/rdoc/more/classes/Association/Kernel.html +8 -8
- data/doc/rdoc/more/classes/Autoarray.html +12 -12
- data/doc/rdoc/more/classes/BBCode.html +34 -34
- data/doc/rdoc/more/classes/BaseX.html +16 -16
- data/doc/rdoc/more/classes/BiCrypt.html +67 -67
- data/doc/rdoc/more/classes/BinReadable.html +85 -85
- data/doc/rdoc/more/classes/BinReadable/ByteOrder.html +25 -25
- data/doc/rdoc/more/classes/Binding.html +8 -8
- data/doc/rdoc/more/classes/BlankSlate.html +5 -5
- data/doc/rdoc/more/classes/Buildable.html +4 -4
- data/doc/rdoc/more/classes/BuildingBlock.html +32 -32
- data/doc/rdoc/more/classes/Capsule.html +41 -41
- data/doc/rdoc/more/classes/Cloneable.html +4 -4
- data/doc/rdoc/more/classes/ConsoleUtils.html +22 -22
- data/doc/rdoc/more/classes/Coroutine.html +28 -28
- data/doc/rdoc/more/classes/Crypt.html +16 -16
- data/doc/rdoc/more/classes/CssFilter.html +45 -45
- data/doc/rdoc/more/classes/CssTree.html +8 -8
- data/doc/rdoc/more/classes/Dictionary.html +228 -228
- data/doc/rdoc/more/classes/Downloader.html +56 -56
- data/doc/rdoc/more/classes/Duration.html +369 -445
- data/doc/rdoc/more/classes/Duration/Numeric.html +389 -0
- data/doc/rdoc/more/classes/{CLI/NoCommandError.html → Duration/Time.html} +30 -17
- data/doc/rdoc/more/classes/Enumerable.html +114 -51
- data/doc/rdoc/more/classes/Enumerable/Elementor.html +16 -16
- data/doc/rdoc/more/classes/Enumerable/Enumerator.html +4 -4
- data/doc/rdoc/more/classes/Enumerable/Filterable.html +246 -0
- data/doc/rdoc/more/classes/EnumerablePass.html +17 -17
- data/doc/rdoc/more/classes/{RecursiveDependency.html → Enumerator.html} +7 -4
- data/doc/rdoc/more/classes/{CLI.html → Enumerator/Filter.html} +22 -26
- data/doc/rdoc/more/classes/Equatable.html +16 -16
- data/doc/rdoc/more/classes/Expirable.html +17 -17
- data/doc/rdoc/more/classes/FileList.html +125 -125
- data/doc/rdoc/more/classes/Fileable.html +14 -14
- data/doc/rdoc/more/classes/Fileable/DSL.html +41 -41
- data/doc/rdoc/more/classes/Hash.html +16 -162
- data/doc/rdoc/more/classes/Hash2Xml.html +4 -4
- data/doc/rdoc/more/classes/HtmlFilter.html +9 -9
- data/doc/rdoc/more/classes/IORedirect.html +19 -19
- data/doc/rdoc/more/classes/InfinityClass.html +36 -36
- data/doc/rdoc/more/classes/InfinityClass/Numeric.html +23 -23
- data/doc/rdoc/more/classes/Ini.html +37 -37
- data/doc/rdoc/more/classes/Instantiable.html +9 -9
- data/doc/rdoc/more/classes/Instantize.html +8 -8
- data/doc/rdoc/more/classes/Interval.html +187 -187
- data/doc/rdoc/more/classes/It.html +12 -12
- data/doc/rdoc/more/classes/LRUCache.html +38 -38
- data/doc/rdoc/more/classes/LinkedList.html +68 -68
- data/doc/rdoc/more/classes/LinkedList/Node.html +4 -4
- data/doc/rdoc/more/classes/{DictionaryMatcher.html → Matcher.html} +66 -68
- data/doc/rdoc/more/classes/{DictionaryMatcher → Matcher}/MatchData.html +8 -8
- data/doc/rdoc/more/classes/{CacheDecorator.html → Memoizer.html} +64 -46
- data/doc/rdoc/more/classes/Module.html +182 -361
- data/doc/rdoc/more/classes/Multiton.html +12 -12
- data/doc/rdoc/more/classes/Multiton/MetaMethods.html +28 -28
- data/doc/rdoc/more/classes/Net/SMTP.html +8 -8
- data/doc/rdoc/more/classes/NullClass.html +24 -24
- data/doc/rdoc/more/classes/Numeric/Multipliers.html +456 -0
- data/doc/rdoc/more/classes/ObjectReflection.html +12 -12
- data/doc/rdoc/more/classes/OpEsc.html +8 -7
- data/doc/rdoc/more/classes/OpenCascade.html +4 -4
- data/doc/rdoc/more/classes/OpenCollection.html +8 -8
- data/doc/rdoc/more/classes/OpenHash.html +9 -9
- data/doc/rdoc/more/classes/{EventHook.html → OpenModule.html} +24 -63
- data/doc/rdoc/more/classes/OpenObject.html +95 -95
- data/doc/rdoc/more/classes/OpenStructable.html +326 -0
- data/doc/rdoc/more/classes/PQueue.html +84 -84
- data/doc/rdoc/more/classes/Paramix.html +11 -11
- data/doc/rdoc/more/classes/Paramix/Delegator.html +16 -16
- data/doc/rdoc/more/classes/PathList.html +8 -8
- data/doc/rdoc/more/classes/PathList/Finder.html +8 -8
- data/doc/rdoc/more/classes/Platform.html +46 -46
- data/doc/rdoc/more/classes/Pool.html +18 -18
- data/doc/rdoc/more/classes/Proc.html +9 -9
- data/doc/rdoc/more/classes/ProgressBar.html +52 -52
- data/doc/rdoc/more/classes/Prototype.html +28 -28
- data/doc/rdoc/more/classes/RWDelegator.html +16 -16
- data/doc/rdoc/more/classes/Random.html +5 -5
- data/doc/rdoc/more/classes/Random/Array.html +37 -37
- data/doc/rdoc/more/classes/Random/Hash.html +52 -52
- data/doc/rdoc/more/classes/Random/Object.html +4 -4
- data/doc/rdoc/more/classes/Random/String.html +34 -34
- data/doc/rdoc/more/classes/Random/String/Self.html +9 -9
- data/doc/rdoc/more/classes/Recorder.html +16 -16
- data/doc/rdoc/more/classes/Reference.html +19 -19
- data/doc/rdoc/more/classes/Registerable.html +13 -13
- data/doc/rdoc/more/classes/Semaphore.html +36 -36
- data/doc/rdoc/more/classes/Settings.html +28 -28
- data/doc/rdoc/more/classes/Settings/Setting.html +13 -13
- data/doc/rdoc/more/classes/Settings/SettingCollection.html +4 -4
- data/doc/rdoc/more/classes/SimpleStringIO.html +8 -8
- data/doc/rdoc/more/classes/Snapshot.html +16 -16
- data/doc/rdoc/more/classes/Snapshot/ValueHolder.html +12 -12
- data/doc/rdoc/more/classes/SparseArray.html +1397 -0
- data/doc/rdoc/more/classes/Stash.html +232 -0
- data/doc/rdoc/more/classes/String/Mask.html +72 -72
- data/doc/rdoc/more/classes/String/Words.html +49 -49
- data/doc/rdoc/more/classes/Struct.html +8 -8
- data/doc/rdoc/more/classes/SyncArray.html +4 -4
- data/doc/rdoc/more/classes/SyncHash.html +4 -4
- data/doc/rdoc/more/classes/SyncHash/Delegator.html +28 -28
- data/doc/rdoc/more/classes/SyncHash/Inheritor.html +28 -28
- data/doc/rdoc/more/classes/System.html +253 -253
- data/doc/rdoc/more/classes/Timer.html +48 -48
- data/doc/rdoc/more/classes/Timer/Dummy.html +9 -9
- data/doc/rdoc/more/classes/TracePoint.html +58 -58
- data/doc/rdoc/more/classes/Tuple.html +170 -170
- data/doc/rdoc/more/classes/TypeCast/Class.html +4 -4
- data/doc/rdoc/more/classes/TypeCast/Object.html +4 -4
- data/doc/rdoc/more/classes/Uninheritable.html +6 -6
- data/doc/rdoc/more/classes/VersionNumber.html +57 -57
- data/doc/rdoc/more/classes/XOXO.html +9 -9
- data/doc/rdoc/more/classes/ZipUtils.html +251 -118
- data/doc/rdoc/more/classes/ZipUtils/DryRun.html +203 -35
- data/doc/rdoc/more/classes/ZipUtils/NoWrite.html +203 -35
- data/doc/rdoc/more/classes/ZipUtils/Verbose.html +173 -35
- data/doc/rdoc/more/created.rid +1 -1
- data/doc/rdoc/more/files/README.html +10 -16
- data/doc/rdoc/more/files/lib/more/facets/attr_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/buildable_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/consoleutils_rb.html +1 -18
- data/doc/rdoc/more/files/lib/more/facets/dependency_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/duration_rb.html +1 -41
- data/doc/rdoc/more/files/lib/more/facets/elementor_rb.html +2 -1
- data/doc/rdoc/more/files/lib/more/facets/enumerablepass_rb.html +2 -1
- data/doc/rdoc/more/files/lib/more/facets/{fileshell_rb.html → filter_rb.html} +6 -5
- data/doc/rdoc/more/files/lib/more/facets/inheritor_rb.html +3 -28
- data/doc/rdoc/more/files/lib/more/facets/iteration_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/kernel/meta_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/matcher_rb.html +97 -0
- data/doc/rdoc/more/files/lib/more/facets/memoize_rb.html +7 -4
- data/doc/rdoc/more/files/lib/more/facets/{cachedecorator_rb.html → memoizer_rb.html} +23 -49
- data/doc/rdoc/more/files/lib/more/facets/multipliers_rb.html +2 -18
- data/doc/rdoc/more/files/lib/more/facets/nilstatus_rb.html +1 -1
- data/doc/rdoc/{core/files/lib/core/facets/callstack_rb.html → more/files/lib/more/facets/openmodule_rb.html} +4 -4
- data/doc/rdoc/more/files/lib/more/facets/opesc_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/ostructable_rb.html +92 -0
- data/doc/rdoc/more/files/lib/more/facets/pathlist_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/snapshot_rb.html +2 -2
- data/doc/rdoc/more/files/lib/more/facets/sparse_array_rb.html +92 -0
- data/doc/rdoc/more/files/lib/more/facets/stash_rb.html +166 -0
- data/doc/rdoc/more/files/lib/more/facets/string/words_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/succ_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/thread_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/ziputils_rb.html +6 -34
- data/doc/rdoc/more/fr_class_index.html +13 -17
- data/doc/rdoc/more/fr_file_index.html +7 -15
- data/doc/rdoc/more/fr_method_index.html +1079 -1003
- data/doc/rdoc/more/index.html +1 -1
- data/lib/core/facets/array/conjoin.rb +1 -1
- data/lib/core/facets/array/delete.rb +3 -60
- data/lib/core/facets/array/delete_unless.rb +15 -0
- data/lib/core/facets/array/delete_values.rb +50 -0
- data/lib/core/facets/array/index.rb +0 -26
- data/lib/core/facets/array/indexable.rb +2 -2
- data/lib/core/facets/array/merge.rb +1 -1
- data/lib/core/facets/array/only.rb +1 -2
- data/lib/core/facets/array/pad.rb +2 -2
- data/lib/core/facets/array/permutation.rb +1 -1
- data/lib/core/facets/array/product.rb +2 -2
- data/lib/core/facets/array/rotate.rb +2 -4
- data/lib/core/facets/array/select.rb +1 -1
- data/lib/core/facets/array/splice.rb +1 -1
- data/lib/core/facets/array/stackable.rb +2 -2
- data/lib/core/facets/binding/caller.rb +2 -7
- data/lib/core/facets/binding/callstack.rb +1 -0
- data/lib/core/facets/binding/defined.rb +0 -1
- data/lib/core/facets/bitmask.rb +6 -9
- data/lib/core/facets/class/cattr.rb +6 -9
- data/lib/core/facets/class/descendents.rb +0 -2
- data/lib/core/facets/class/prepend.rb +3 -4
- data/lib/core/facets/class/to_proc.rb +0 -20
- data/lib/core/facets/comparable/at_least.rb +1 -0
- data/lib/core/facets/comparable/at_most.rb +1 -0
- data/lib/core/facets/comparable/bound.rb +1 -65
- data/lib/core/facets/comparable/cap.rb +34 -0
- data/lib/core/facets/comparable/clip.rb +38 -0
- data/lib/core/facets/comparable/cmp.rb +3 -3
- data/lib/core/facets/comparable/comparable.rb +1 -1
- data/lib/core/facets/dir/ascend.rb +2 -5
- data/lib/core/facets/dir/multiglob.rb +0 -2
- data/lib/core/facets/dir/recurse.rb +1 -2
- data/lib/core/facets/enumerable/accumulate.rb +2 -0
- data/lib/core/facets/enumerable/cluster_by.rb +1 -1
- data/lib/core/facets/enumerable/collect.rb +2 -2
- data/lib/core/facets/enumerable/commonality.rb +1 -1
- data/lib/core/facets/enumerable/count.rb +1 -1
- data/lib/core/facets/enumerable/divide.rb +1 -1
- data/lib/core/facets/enumerable/duplicates.rb +2 -2
- data/lib/core/facets/enumerable/each_by.rb +1 -1
- data/lib/core/facets/enumerable/entropy.rb +2 -2
- data/lib/core/facets/enumerable/frequency.rb +1 -1
- data/lib/core/facets/enumerable/graph.rb +1 -0
- data/lib/core/facets/enumerable/group_by.rb +1 -1
- data/lib/core/facets/enumerable/inject.rb +2 -3
- data/lib/core/facets/enumerable/map_send.rb +15 -3
- data/lib/core/facets/enumerable/mash.rb +4 -5
- data/lib/core/facets/enumerable/mode.rb +1 -1
- data/lib/core/facets/enumerable/modulate.rb +2 -2
- data/lib/core/facets/enumerable/none.rb +1 -1
- data/lib/core/facets/enumerable/occur.rb +0 -2
- data/lib/core/facets/enumerable/one.rb +1 -1
- data/lib/core/facets/enumerable/probability.rb +1 -1
- data/lib/core/facets/enumerable/sum.rb +1 -1
- data/lib/core/facets/enumerable/take.rb +20 -0
- data/lib/core/facets/enumerable/uniq_by.rb +0 -2
- data/lib/core/facets/exception/detail.rb +1 -1
- data/lib/core/facets/exception/suppress.rb +1 -2
- data/lib/core/facets/file/append.rb +1 -1
- data/lib/core/facets/file/create.rb +1 -1
- data/lib/core/facets/file/null.rb +1 -1
- data/lib/core/facets/file/read.rb +3 -3
- data/lib/core/facets/file/rewrite.rb +1 -1
- data/lib/core/facets/file/rootname.rb +1 -1
- data/lib/core/facets/file/split_all.rb +19 -0
- data/lib/core/facets/file/split_root.rb +3 -0
- data/lib/core/facets/file/write.rb +1 -1
- data/lib/core/facets/file/writelines.rb +1 -2
- data/lib/core/facets/filetest/root.rb +1 -1
- data/lib/core/facets/hash/alias.rb +1 -1
- data/lib/core/facets/hash/autonew.rb +1 -17
- data/lib/core/facets/hash/collate.rb +1 -1
- data/lib/core/facets/hash/delete.rb +3 -3
- data/lib/core/facets/hash/insert.rb +1 -1
- data/lib/core/facets/hash/inverse.rb +1 -1
- data/lib/core/facets/hash/join.rb +1 -1
- data/lib/core/facets/hash/keys.rb +3 -3
- data/lib/core/facets/hash/op_add.rb +1 -1
- data/lib/core/facets/hash/op_and.rb +1 -1
- data/lib/core/facets/hash/op_mul.rb +1 -1
- data/lib/core/facets/hash/op_or.rb +1 -1
- data/lib/core/facets/hash/op_push.rb +1 -1
- data/lib/core/facets/hash/op_sub.rb +1 -1
- data/lib/core/facets/hash/rekey.rb +11 -7
- data/lib/core/facets/hash/replace_each.rb +16 -0
- data/lib/core/facets/hash/select.rb +1 -2
- data/lib/{more → core}/facets/hash/stringify_keys.rb +0 -0
- data/lib/core/facets/hash/symbolize_keys.rb +94 -0
- data/lib/core/facets/hash/to_options.rb +1 -0
- data/lib/core/facets/hash/to_struct.rb +1 -1
- data/lib/core/facets/hash/traverse.rb +2 -2
- data/lib/core/facets/hash/update.rb +5 -80
- data/lib/core/facets/hash/update_each.rb +18 -0
- data/lib/core/facets/hash/update_keys.rb +20 -0
- data/lib/core/facets/hash/update_values.rb +20 -0
- data/lib/core/facets/hash/weave.rb +1 -1
- data/lib/core/facets/hash/zipnew.rb +17 -1
- data/lib/core/facets/integer/factorial.rb +1 -1
- data/lib/core/facets/integer/multiple.rb +1 -1
- data/lib/core/facets/integer/odd.rb +2 -2
- data/lib/core/facets/kernel/__here__.rb +8 -0
- data/lib/core/facets/kernel/as.rb +2 -2
- data/lib/core/facets/kernel/attr_singleton.rb +5 -5
- data/lib/core/facets/{callstack.rb → kernel/callstack.rb} +1 -1
- data/lib/core/facets/kernel/complete.rb +1 -1
- data/lib/core/facets/kernel/constant.rb +1 -1
- data/lib/core/facets/kernel/d.rb +1 -5
- data/lib/core/facets/kernel/demo.rb +2 -2
- data/lib/core/facets/kernel/ergo.rb +2 -2
- data/lib/core/facets/kernel/instance_class.rb +1 -1
- data/lib/core/facets/kernel/instance_variables.rb +2 -4
- data/lib/core/facets/kernel/not_nil.rb +1 -1
- data/lib/core/facets/kernel/object_send.rb +1 -1
- data/lib/core/facets/kernel/p.rb +1 -1
- data/lib/core/facets/kernel/populate.rb +2 -2
- data/lib/core/facets/kernel/qua_class.rb +2 -2
- data/lib/core/facets/kernel/resc.rb +1 -1
- data/lib/core/facets/kernel/respond.rb +1 -1
- data/lib/core/facets/kernel/returning.rb +1 -1
- data/lib/core/facets/kernel/silence.rb +4 -4
- data/lib/core/facets/kernel/try.rb +5 -3
- data/lib/core/facets/matchdata/match.rb +1 -1
- data/lib/core/facets/matchdata/matchset.rb +2 -2
- data/lib/core/facets/metaid.rb +5 -5
- data/lib/core/facets/module/abstract.rb +1 -1
- data/lib/core/facets/module/alias_accessor.rb +3 -3
- data/lib/core/facets/module/alias_method_chain.rb +1 -2
- data/lib/core/facets/module/alias_module_function.rb +1 -1
- data/lib/core/facets/module/ancestor.rb +1 -1
- data/lib/core/facets/module/basename.rb +1 -1
- data/lib/core/facets/module/conflict.rb +1 -2
- data/lib/core/facets/module/include_function_module.rb +1 -1
- data/lib/core/facets/module/instance_methods.rb +4 -6
- data/lib/core/facets/module/is.rb +2 -2
- data/lib/core/facets/module/modspace.rb +1 -1
- data/lib/core/facets/module/module_load.rb +2 -2
- data/lib/core/facets/module/nesting.rb +1 -1
- data/lib/core/facets/module/op.rb +3 -6
- data/lib/core/facets/module/prepend.rb +1 -1
- data/lib/core/facets/module/redefine_method.rb +1 -1
- data/lib/core/facets/module/rename_method.rb +1 -1
- data/lib/core/facets/module/revise.rb +2 -2
- data/lib/core/facets/module/spacename.rb +1 -1
- data/lib/core/facets/module/wrap_method.rb +1 -1
- data/lib/core/facets/nilclass/to_f.rb +1 -1
- data/lib/core/facets/numeric/approx.rb +1 -1
- data/lib/core/facets/numeric/distance.rb +1 -1
- data/lib/core/facets/numeric/round.rb +3 -6
- data/lib/core/facets/objectspace.rb +6 -0
- data/lib/core/facets/objectspace/classes.rb +11 -0
- data/lib/core/facets/proc/bind.rb +1 -1
- data/lib/core/facets/proc/compose.rb +2 -2
- data/lib/core/facets/proc/to_method.rb +1 -1
- data/lib/core/facets/proc/update.rb +1 -1
- data/lib/core/facets/range/combine.rb +2 -2
- data/lib/core/facets/range/overlap.rb +1 -2
- data/lib/core/facets/range/within.rb +2 -4
- data/lib/core/facets/regexp/arity.rb +1 -1
- data/lib/core/facets/string/align.rb +3 -3
- data/lib/core/facets/string/bracket.rb +6 -6
- data/lib/core/facets/string/camelcase.rb +1 -1
- data/lib/core/facets/string/capitalized.rb +3 -3
- data/lib/core/facets/string/chars.rb +1 -1
- data/lib/core/facets/string/chomp.rb +2 -2
- data/lib/core/facets/string/cleave.rb +1 -1
- data/lib/core/facets/string/compress_lines.rb +17 -0
- data/lib/core/facets/string/contains.rb +7 -0
- data/lib/core/facets/string/divide.rb +1 -1
- data/lib/core/facets/string/expand_tab.rb +35 -0
- data/lib/core/facets/string/fold.rb +1 -1
- data/lib/core/facets/string/indent.rb +25 -0
- data/lib/core/facets/string/interpolate.rb +1 -1
- data/lib/core/facets/string/line_wrap.rb +1 -1
- data/lib/core/facets/string/lines.rb +1 -2
- data/lib/core/facets/string/margin.rb +30 -0
- data/lib/core/facets/string/methodize.rb +1 -1
- data/lib/core/facets/string/mscan.rb +1 -1
- data/lib/core/facets/string/natcmp.rb +1 -2
- data/lib/core/facets/string/nchar.rb +0 -2
- data/lib/core/facets/string/op_sub.rb +1 -1
- data/lib/core/facets/string/outdent.rb +1 -0
- data/lib/core/facets/string/range.rb +4 -5
- data/lib/core/facets/string/rewrite.rb +1 -1
- data/lib/core/facets/string/shatter.rb +1 -1
- data/lib/core/facets/string/snakecase.rb +1 -1
- data/lib/core/facets/string/splice.rb +2 -2
- data/lib/core/facets/string/start_with.rb +2 -4
- data/lib/core/facets/string/tab.rb +9 -92
- data/lib/core/facets/string/tabto.rb +19 -0
- data/lib/core/facets/string/titlecase.rb +1 -1
- data/lib/core/facets/string/to_re.rb +2 -2
- data/lib/core/facets/string/word_wrap.rb +2 -4
- data/lib/core/facets/struct.rb +6 -0
- data/lib/core/facets/struct/attributes.rb +11 -0
- data/lib/core/facets/symbol/chomp.rb +2 -2
- data/lib/core/facets/symbol/generate.rb +1 -1
- data/lib/core/facets/symbol/not.rb +2 -2
- data/lib/core/facets/symbol/succ.rb +1 -1
- data/lib/core/facets/symbol/to_proc.rb +2 -3
- data/lib/core/facets/time/advance.rb +2 -1
- data/lib/core/facets/time/elapse.rb +1 -1
- data/lib/core/facets/time/hence.rb +16 -13
- data/lib/core/facets/time/stamp.rb +2 -2
- data/lib/core/facets/to_hash.rb +1 -1
- data/lib/core/facets/unboundmethod/arguments.rb +1 -1
- data/lib/core/facets/unboundmethod/name.rb +1 -1
- data/lib/lore/facets/date.rb +2 -2
- data/lib/lore/facets/enumerator.rb +67 -0
- data/lib/lore/facets/ostruct.rb +3 -7
- data/lib/more/facets/attr.rb +10 -9
- data/lib/more/facets/consoleutils.rb +1 -15
- data/lib/more/facets/dependency.rb +1 -1
- data/lib/more/facets/duration.rb +271 -525
- data/lib/more/facets/filter.rb +121 -0
- data/lib/more/facets/inheritor.rb +37 -58
- data/lib/more/facets/iteration.rb +1 -1
- data/lib/more/facets/kernel/meta.rb +1 -1
- data/lib/more/facets/{dictionarymatcher.rb → matcher.rb} +15 -11
- data/lib/more/facets/memoize.rb +9 -12
- data/lib/more/facets/memoizer.rb +74 -0
- data/lib/more/facets/multipliers.rb +54 -66
- data/lib/more/facets/nilstatus.rb +3 -2
- data/lib/more/facets/openmodule.rb +15 -0
- data/lib/more/facets/opesc.rb +1 -1
- data/lib/more/facets/ostructable.rb +212 -0
- data/lib/more/facets/pathlist.rb +1 -0
- data/lib/more/facets/sparse_array.rb +809 -0
- data/lib/more/facets/stash.rb +66 -0
- data/lib/more/facets/string/words.rb +8 -11
- data/lib/more/facets/succ.rb +3 -3
- data/lib/more/facets/thread.rb +2 -2
- data/lib/more/facets/ziputils.rb +238 -97
- data/test/core/array/test_index.rb +17 -0
- data/test/core/class/test_cattr.rb +1 -1
- data/test/core/class/test_to_proc.rb +13 -0
- data/test/core/comparable/test_cap.rb +25 -0
- data/test/core/comparable/{test_bound.rb → test_clip.rb} +1 -20
- data/test/core/file/test_split_all.rb +32 -0
- data/test/core/hash/test_op_mul.rb +1 -1
- data/test/core/hash/test_op_push.rb +7 -0
- data/test/core/hash/test_replace_each.rb +14 -0
- data/test/core/hash/test_update_each.rb +13 -0
- data/test/core/hash/test_update_keys.rb +18 -0
- data/test/core/hash/test_update_values.rb +12 -0
- data/test/core/kernel/test_callstack.rb +1 -1
- data/test/core/string/test_indent.rb +13 -0
- data/test/core/string/test_margin.rb +100 -0
- data/test/core/string/test_outdent.rb +65 -0
- data/test/core/string/test_tab.rb +1 -162
- data/test/core/string/test_tabto.rb +13 -0
- data/test/{more → core}/test_metaid.rb +8 -8
- data/test/core/time/test_hence.rb +118 -4
- data/test/core/unboundmethod/test_name.rb +1 -1
- data/test/more/{test_arguments.rb → test_argvector.rb} +8 -12
- data/test/more/test_filter.rb +87 -0
- data/test/more/test_memoize.rb +11 -9
- data/test/more/test_sparsearray.rb +279 -0
- metadata +741 -725
- data/demo/bench/bench_load.rb +0 -56
- data/demo/bench/enumerable/bench_collect.rb +0 -84
- data/demo/bench/enumerable/bench_count.rb +0 -58
- data/demo/bench/general/bench_calls.rb +0 -74
- data/demo/bench/general/bench_includes.rb +0 -25
- data/demo/bench/general/bench_methods.rb +0 -17
- data/demo/bench/general/bench_pathname.rb +0 -24
- data/demo/bench/general/bench_range.rb +0 -64
- data/demo/bench/general/bench_return.rb +0 -56
- data/demo/bench/general/bench_yeild.rb +0 -75
- data/demo/bench/general/comment_loading/bench.rb +0 -46
- data/demo/bench/general/comment_loading/comments_begin.rb +0 -109
- data/demo/bench/general/comment_loading/comments_end.rb +0 -127
- data/demo/bench/general/comment_loading/comments_none.rb +0 -1
- data/demo/bench/general/comment_loading/comments_sharp.rb +0 -125
- data/demo/bench/integer/bench_factorial.rb +0 -31
- data/demo/sample/annotations/annotations1.rb +0 -22
- data/demo/sample/ansicolor/cdiff.rb +0 -20
- data/demo/sample/ansicolor/example.rb +0 -82
- data/doc/book/notes.rdoc +0 -9
- data/doc/rdoc/more/classes/BigDuration.html +0 -323
- data/doc/rdoc/more/classes/CLI/Arguments.html +0 -488
- data/doc/rdoc/more/classes/CLI/Command.html +0 -316
- data/doc/rdoc/more/classes/Chain.html +0 -206
- data/doc/rdoc/more/classes/FileShell.html +0 -743
- data/doc/rdoc/more/classes/TagIterator.html +0 -581
- data/doc/rdoc/more/classes/UploadUtils.html +0 -497
- data/doc/rdoc/more/classes/Weekdays.html +0 -218
- data/doc/rdoc/more/files/lib/more/facets/annotations_rb.html +0 -180
- data/doc/rdoc/more/files/lib/more/facets/arguments_rb.html +0 -142
- data/doc/rdoc/more/files/lib/more/facets/cattr_rb.html +0 -125
- data/doc/rdoc/more/files/lib/more/facets/chain_rb.html +0 -114
- data/doc/rdoc/more/files/lib/more/facets/command_rb.html +0 -170
- data/doc/rdoc/more/files/lib/more/facets/eventhook_rb.html +0 -141
- data/doc/rdoc/more/files/lib/more/facets/tagiterator_rb.html +0 -111
- data/doc/rdoc/more/files/lib/more/facets/times_rb.html +0 -163
- data/doc/rdoc/more/files/lib/more/facets/uploadutils_rb.html +0 -176
- data/lib/more/facets/annotations.rb +0 -302
- data/lib/more/facets/arguments.rb +0 -365
- data/lib/more/facets/bytes.rb +0 -175
- data/lib/more/facets/cachedecorator.rb +0 -117
- data/lib/more/facets/chain.rb +0 -58
- data/lib/more/facets/command.rb +0 -439
- data/lib/more/facets/eventhook.rb +0 -132
- data/lib/more/facets/fileshell.rb +0 -202
- data/lib/more/facets/hash/symbolize_keys.rb +0 -94
- data/lib/more/facets/tagiter.rb +0 -366
- data/lib/more/facets/times.rb +0 -431
- data/lib/more/facets/uploadutils.rb +0 -464
- data/test/core/hash/test_update.rb +0 -46
- data/test/more/test_annotations.rb +0 -120
- data/test/more/test_bytes.rb +0 -71
- data/test/more/test_command.rb +0 -69
- data/test/more/test_times.rb +0 -89
@@ -13,10 +13,10 @@ class TestMetaid < Test::Unit::TestCase
|
|
13
13
|
assert_equal( (class << o; self; end), o.meta_class )
|
14
14
|
end
|
15
15
|
|
16
|
-
def test_singleton
|
17
|
-
|
18
|
-
|
19
|
-
end
|
16
|
+
#def test_singleton
|
17
|
+
# o = Object.new
|
18
|
+
# assert_equal( (class << o; self; end), o.singleton )
|
19
|
+
#end
|
20
20
|
|
21
21
|
#def test_singleton_eval
|
22
22
|
# assert_nothing_raised do
|
@@ -31,9 +31,9 @@ class TestMetaid < Test::Unit::TestCase
|
|
31
31
|
# assert_equal(2, o.testing(1) )
|
32
32
|
#end
|
33
33
|
|
34
|
-
def test_singleton_class
|
35
|
-
|
36
|
-
|
37
|
-
end
|
34
|
+
#def test_singleton_class
|
35
|
+
# o = Object.new
|
36
|
+
# assert_equal( (class << o; self; end), o.singleton_class )
|
37
|
+
#end
|
38
38
|
|
39
39
|
end
|
@@ -4,10 +4,124 @@ require 'time'
|
|
4
4
|
|
5
5
|
class TC_Time_Hence < Test::Unit::TestCase
|
6
6
|
|
7
|
-
def
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
def test_change_years
|
8
|
+
assert_equal Time.utc(2007,11, 1, 18,30,57),
|
9
|
+
Time.utc(2008,11, 1, 18,30,57).ago(1, :years)
|
10
|
+
|
11
|
+
assert_equal Time.utc(2008,11, 1, 18,30,57),
|
12
|
+
Time.utc(2007,11, 1, 18,30,57).hence(1, :years)
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_change_weeks
|
16
|
+
assert_equal Time.utc(2008,11,24, 18,30,57),
|
17
|
+
Time.utc(2008,12, 1, 18,30,57).ago(1, :weeks)
|
18
|
+
|
19
|
+
assert_equal Time.utc(2008,12, 1, 18,30,57),
|
20
|
+
Time.utc(2008,11,24, 18,30,57).hence(1, :weeks)
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_change_days
|
24
|
+
assert_equal Time.utc(2008,11,30, 18,30,57),
|
25
|
+
Time.utc(2008,12, 1, 18,30,57).ago(1, :days)
|
26
|
+
|
27
|
+
assert_equal Time.utc(2008,12, 1, 18,30,57),
|
28
|
+
Time.utc(2008,11,30, 18,30,57).hence(1, :days)
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_change_hours
|
32
|
+
assert_equal Time.utc(2008,11,30, 23,30,57),
|
33
|
+
Time.utc(2008,12, 1, 0,30,57).ago(1, :hours)
|
34
|
+
|
35
|
+
assert_equal Time.utc(2008,12, 1, 0,30,57),
|
36
|
+
Time.utc(2008,11,30, 23,30,57).hence(1, :hours)
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_change_minutes
|
40
|
+
assert_equal Time.utc(2008,11,30, 23,58,57),
|
41
|
+
Time.utc(2008,12, 1, 0, 0,57).ago(2, :minutes)
|
42
|
+
|
43
|
+
assert_equal Time.utc(2008,12, 1, 0, 0,57),
|
44
|
+
Time.utc(2008,11,30, 23,58,57).hence(2, :minutes)
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_change_seconds
|
48
|
+
assert_equal Time.utc(2008,11,30, 23,59,57),
|
49
|
+
Time.utc(2008,12, 1, 0, 0, 1).ago(4, :seconds)
|
50
|
+
|
51
|
+
assert_equal Time.utc(2008,12, 1, 0, 0, 1),
|
52
|
+
Time.utc(2008,11,30, 23,59,57).hence(4, :seconds)
|
53
|
+
end
|
54
|
+
|
55
|
+
#-------------------------------------------------------------------------------------------------
|
56
|
+
# Months are the tricky one, so they get their own little section
|
57
|
+
|
58
|
+
def test_change_month_no_year_wrap
|
59
|
+
assert_equal Time.utc(2008,11, 1),
|
60
|
+
Time.utc(2008,12, 1).ago(1, :months)
|
61
|
+
|
62
|
+
assert_equal Time.utc(2008,12, 1),
|
63
|
+
Time.utc(2008,11, 1).hence(1, :months)
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_change_month_with_year_wrap_due_to_month
|
67
|
+
assert_equal Time.utc(2007,12, 1),
|
68
|
+
Time.utc(2008, 1, 1).ago(1, :months)
|
69
|
+
|
70
|
+
assert_equal Time.utc(2008, 1, 1),
|
71
|
+
Time.utc(2007,12, 1).hence(1, :months)
|
72
|
+
end
|
73
|
+
|
74
|
+
def test_change_month_with_12_or_more_converts_extra_months_into_a_year_adjustment
|
75
|
+
(
|
76
|
+
assert_equal Time.utc(2007, 1, 1),
|
77
|
+
Time.utc(2008, 1, 1).ago(12, :months)
|
78
|
+
|
79
|
+
assert_equal Time.utc(2008, 1, 1),
|
80
|
+
Time.utc(2007, 1, 1).hence(12, :months)
|
81
|
+
)
|
82
|
+
(
|
83
|
+
assert_equal Time.utc(2006,11, 1),
|
84
|
+
Time.utc(2008,12, 1).ago(25, :months)
|
85
|
+
|
86
|
+
assert_equal Time.utc(2008,12, 1),
|
87
|
+
Time.utc(2006,11, 1).hence(25, :months)
|
88
|
+
)
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_change_month_with_12_or_more_AND_year_wrap_due_to_month
|
92
|
+
(
|
93
|
+
# 13 months = 1 year + 1 month AND month changing from 12 to 1 when going backward means go back 1 extra year
|
94
|
+
assert_equal Time.utc(2006,12, 1),
|
95
|
+
Time.utc(2008, 1, 1).ago(13, :months)
|
96
|
+
|
97
|
+
assert_equal Time.utc(2008, 1, 1),
|
98
|
+
Time.utc(2006,12, 1).hence(13, :months)
|
99
|
+
|
100
|
+
)
|
101
|
+
(
|
102
|
+
# Smaller units should remain unchanged.
|
103
|
+
assert_equal Time.utc(2005, 8,20, 15,37,59),
|
104
|
+
Time.utc(2006, 1,20, 15,37,59).ago(5, :months)
|
105
|
+
|
106
|
+
assert_equal Time.utc(2006, 1,20, 15,37,59),
|
107
|
+
Time.utc(2005, 8,20, 15,37,59).hence(5, :months)
|
108
|
+
)
|
109
|
+
end
|
110
|
+
|
111
|
+
def test_passing_a_negative_number_to_ago_should_be_same_as_a_positive_number_to_hence
|
112
|
+
assert_equal Time.utc(2008, 1, 1),
|
113
|
+
Time.utc(2006,12, 1).ago(-13, :months)
|
114
|
+
|
115
|
+
assert_equal Time.utc(2006, 1,20),
|
116
|
+
Time.utc(2005, 8,20).ago(-5, :months)
|
117
|
+
end
|
118
|
+
|
119
|
+
def test_passing_a_negative_number_to_hence_should_be_same_as_a_positive_number_to_ago
|
120
|
+
assert_equal Time.utc(2006,12, 1),
|
121
|
+
Time.utc(2008, 1, 1).hence(-13, :months)
|
122
|
+
|
123
|
+
assert_equal Time.utc(2005, 8,20),
|
124
|
+
Time.utc(2006, 1,20).hence(-5, :months)
|
11
125
|
end
|
12
126
|
|
13
127
|
end
|
@@ -1,15 +1,11 @@
|
|
1
|
-
# Test for facets/arguments.rb.
|
2
|
-
|
3
1
|
require 'test/unit'
|
4
|
-
require 'facets/
|
5
|
-
|
6
|
-
class TestArguments < Test::Unit::TestCase
|
2
|
+
require 'facets/argvector.rb'
|
7
3
|
|
8
|
-
|
4
|
+
class TestArgvector < Test::Unit::TestCase
|
9
5
|
|
10
6
|
def test_parameters
|
11
7
|
line = "-x baz --foo=8 bar"
|
12
|
-
cargs =
|
8
|
+
cargs = Argvector.new(line)
|
13
9
|
args, keys = cargs.parameters
|
14
10
|
assert_equal(['baz','bar'], args)
|
15
11
|
assert_equal({'foo'=>'8','x'=>true}, keys)
|
@@ -17,7 +13,7 @@ class TestArguments < Test::Unit::TestCase
|
|
17
13
|
|
18
14
|
def test_parameters_with_arity
|
19
15
|
line = "-g a -x b -x c"
|
20
|
-
cargs =
|
16
|
+
cargs = Argvector.new(line, :g=>1, :x=>1)
|
21
17
|
args, keys = cargs.parameters
|
22
18
|
assert_equal({'g'=>'a','x'=>['b','c']}, keys)
|
23
19
|
assert_equal([], args)
|
@@ -25,14 +21,14 @@ class TestArguments < Test::Unit::TestCase
|
|
25
21
|
|
26
22
|
def test_flags
|
27
23
|
line = "-x baz --foo=8 bar"
|
28
|
-
cargs =
|
24
|
+
cargs = Argvector.new(line)
|
29
25
|
flags = cargs.flags
|
30
26
|
assert_equal(['x'], flags)
|
31
27
|
end
|
32
28
|
|
33
29
|
def test_repeat
|
34
30
|
line = "-x baz --foo=1 --foo=2 bar"
|
35
|
-
cargs =
|
31
|
+
cargs = Argvector.new(line)
|
36
32
|
args, keys = cargs.parameters
|
37
33
|
assert_equal(['baz','bar'], args)
|
38
34
|
assert_equal({'x'=>true,'foo'=>['1','2']}, keys)
|
@@ -40,14 +36,14 @@ class TestArguments < Test::Unit::TestCase
|
|
40
36
|
|
41
37
|
def test_preoptions
|
42
38
|
line = "-x --foo=7 baz -y bar"
|
43
|
-
cargs =
|
39
|
+
cargs = Argvector.new(line)
|
44
40
|
flags = cargs.preoptions
|
45
41
|
assert_equal({'x'=>true,'foo'=>'7'}, flags)
|
46
42
|
end
|
47
43
|
|
48
44
|
def test_with_arity
|
49
45
|
line = "-q baz --aq 5 bar"
|
50
|
-
cargs =
|
46
|
+
cargs = Argvector.new(line,'aq'=>1)
|
51
47
|
words, flags = cargs.parameters
|
52
48
|
assert_equal(['baz','bar'],words)
|
53
49
|
assert_equal({'q'=>true,'aq'=>'5'},flags)
|
@@ -0,0 +1,87 @@
|
|
1
|
+
require 'facets/filter'
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
class TC_Enumerator_Filter < Test::Unit::TestCase
|
5
|
+
|
6
|
+
SOURCE = (1..1/0.0) # infinite Enumerable object
|
7
|
+
|
8
|
+
def test_enumerator_with_block
|
9
|
+
# This example taken from ri19 Enumerator.new
|
10
|
+
fib = Enumerator.new { |y|
|
11
|
+
a = b = 1
|
12
|
+
loop {
|
13
|
+
y << a
|
14
|
+
a, b = b, a + b
|
15
|
+
}
|
16
|
+
}
|
17
|
+
assert_equal [1, 1, 2, 3, 5, 8, 13, 21, 34, 55], fib.take(10)
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_filter_without_block
|
21
|
+
a = SOURCE.filter
|
22
|
+
assert_equal Enumerator::Filter, a.class
|
23
|
+
assert_equal [1,2,3,4,5], a.take(5).to_a
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_filter_with_block
|
27
|
+
a = SOURCE.filter { |out,i| out << i*2 }
|
28
|
+
assert_equal Enumerator::Filter, a.class
|
29
|
+
assert_equal [2,4,6,8,10], a.take(5).to_a
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_each
|
33
|
+
res = []
|
34
|
+
(1..5).filter.each { |i| res << i }
|
35
|
+
assert_equal [1,2,3,4,5], res
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_return
|
39
|
+
res = (1..5).filter.inject({}) { |h,v| h[v] = v*2; h }
|
40
|
+
assert_equal({1=>2,2=>4,3=>6,4=>8,5=>10}, res)
|
41
|
+
res = (1..5).filter.inject({}) { |h,v| h[v] = v*2; break h if v>=3; h }
|
42
|
+
assert_equal({1=>2,2=>4,3=>6}, res)
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_other_enumerable
|
46
|
+
a = SOURCE.filter
|
47
|
+
assert_equal 5, a.take(5).max
|
48
|
+
assert_equal 2, a.map { |i| i*2 }.take(5).min
|
49
|
+
assert_equal [5,4,3,2,1], a.take(5).sort_by { |x| -x }
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_filter_filter
|
53
|
+
a = SOURCE.filter.filter { |out,i| out << i*2 }
|
54
|
+
assert_equal [2,4,6,8,10], a.take(5).to_a
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_filter_chain
|
58
|
+
a = SOURCE.filter { |out,i| out.yield(i) if i % 2 == 0 }.
|
59
|
+
filter { |out,i| out.yield(i + 100) }
|
60
|
+
assert_equal [102,104,106,108,110], a.take(5).to_a
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_select_map
|
64
|
+
a = SOURCE.filter.select { |i| i % 2 == 0 }.map { |i| i + 100 }
|
65
|
+
assert_equal [102,104,106,108,110], a.take(5).to_a
|
66
|
+
end
|
67
|
+
|
68
|
+
def test_find_all_collect
|
69
|
+
a = SOURCE.filter.find_all { |i| i % 2 == 0 }.collect { |i| i + 100 }
|
70
|
+
assert_equal [102,104,106,108,110], a.take(5).to_a
|
71
|
+
end
|
72
|
+
|
73
|
+
def test_reject
|
74
|
+
a = SOURCE.filter.reject { |i| i % 3 == 0 }
|
75
|
+
assert_equal [1,2,4,5,7], a.take(5).to_a
|
76
|
+
end
|
77
|
+
|
78
|
+
def test_skip_take
|
79
|
+
a = SOURCE.filter.skip(20).take(5)
|
80
|
+
assert_equal [21,22,23,24,25], a.to_a
|
81
|
+
end
|
82
|
+
|
83
|
+
#def test_each_cons
|
84
|
+
# a = SOURCE.filter
|
85
|
+
# assert_equal [[1,2,3],[2,3,4],[3,4,5],[4,5,6]], a.each_cons(3).take(4)
|
86
|
+
#end
|
87
|
+
end
|
data/test/more/test_memoize.rb
CHANGED
@@ -17,19 +17,21 @@ class TC_Memoize < Test::Unit::TestCase
|
|
17
17
|
|
18
18
|
|
19
19
|
def setup
|
20
|
-
@
|
20
|
+
@t1 = T.new(1)
|
21
|
+
@t2 = T.new(2)
|
22
|
+
@t3 = T.new(3)
|
21
23
|
end
|
22
24
|
|
23
|
-
def
|
24
|
-
assert_equal( @
|
25
|
+
def test_memoize_gives_correct_value
|
26
|
+
assert_equal( @t1.a, "6" )
|
27
|
+
assert_equal( @t2.a, "5" )
|
28
|
+
assert_equal( @t3.a, "4" )
|
25
29
|
end
|
26
30
|
|
27
|
-
def
|
28
|
-
assert_equal( @
|
29
|
-
|
30
|
-
|
31
|
-
def test_memoize_03
|
32
|
-
assert_equal( @t.a.__id__, @t.a.__id__ )
|
31
|
+
def test_memoize_returns_identical_objects
|
32
|
+
assert_equal( @t1.a.__id__, @t1.a.__id__ )
|
33
|
+
assert_equal( @t2.a.__id__, @t2.a.__id__ )
|
34
|
+
assert_equal( @t3.a.__id__, @t3.a.__id__ )
|
33
35
|
end
|
34
36
|
|
35
37
|
end
|
@@ -0,0 +1,279 @@
|
|
1
|
+
# This is a mostly complete testcase for SparseArray.
|
2
|
+
# SparseArray is tested by comparison to standard Array.
|
3
|
+
|
4
|
+
require 'test/unit'
|
5
|
+
require 'facets/sparse_array'
|
6
|
+
|
7
|
+
class TC_SparseArray < Test::Unit::TestCase
|
8
|
+
|
9
|
+
def aha(a)
|
10
|
+
return a, SparseArray[*a]
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_conversions
|
14
|
+
a, ha = aha [1,3,'a',8,nil,[1]]
|
15
|
+
assert_equal(ha, ha.to_ary) # these need to be opposite
|
16
|
+
assert_equal(a, ha.to_a) #
|
17
|
+
assert_equal(a.to_s, ha.to_s)
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_set_operations
|
21
|
+
a, ha = aha [1,3,5,8,9]
|
22
|
+
b, hb = aha [2,3,6,8,9]
|
23
|
+
assert_equal(a | b, (ha | hb).to_a)
|
24
|
+
assert_equal(a & b, (ha & hb).to_a)
|
25
|
+
assert_equal(a + b, (ha + hb).to_a)
|
26
|
+
assert_equal(a - b, (ha - hb).to_a)
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_multiple
|
30
|
+
a, ha = aha [1,3]
|
31
|
+
assert_equal(a*3,(ha*3).to_a)
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_assign
|
35
|
+
a, ha = aha [1,2,3,4]
|
36
|
+
a[1..2] = [8,9]
|
37
|
+
ha[1..2] = [8,9]
|
38
|
+
assert_equal(a, ha.to_a)
|
39
|
+
end
|
40
|
+
def test_assoc
|
41
|
+
a, ha = aha [[1,2],[3,4],[3,6]]
|
42
|
+
assert_equal(a.assoc(3), ha.assoc(3).to_a)
|
43
|
+
end
|
44
|
+
def test_at
|
45
|
+
a, ha = aha [4,5,6,6]
|
46
|
+
assert_equal(a.at(0), ha.at(0))
|
47
|
+
assert_equal(a.at(2), ha.at(2))
|
48
|
+
assert_equal(a.at(4), ha.at(4))
|
49
|
+
assert_equal(a.at(9), ha.at(9))
|
50
|
+
assert_equal(a.at(-1), ha.at(-1))
|
51
|
+
assert_equal(a.at(-3), ha.at(-3))
|
52
|
+
assert_equal(a.at(-4), ha.at(-4))
|
53
|
+
assert_equal(a.at(-5), ha.at(-5))
|
54
|
+
end
|
55
|
+
def test_collect
|
56
|
+
a, ha = aha [4,5,6,6]
|
57
|
+
assert_equal(a.collect{|e|e}, ha.collect{|e|e}.to_a)
|
58
|
+
assert_equal(a.collect!{|e|e}, ha.collect!{|e|e}.to_a)
|
59
|
+
assert_equal(a,ha.to_a)
|
60
|
+
end
|
61
|
+
def test_compact
|
62
|
+
a, ha = aha [4,nil,5,nil,6]
|
63
|
+
assert_equal(a.compact, ha.compact.to_a)
|
64
|
+
end
|
65
|
+
def test_concat
|
66
|
+
a, ha = aha [1,3,5,8,9]
|
67
|
+
b, hb = aha [2,3,6,8,9]
|
68
|
+
assert_equal(a.concat(b),ha.concat(hb).to_a)
|
69
|
+
end
|
70
|
+
def test_count
|
71
|
+
ha = SparseArray[9,3,9,5,nil,nil,9,3]
|
72
|
+
assert_equal(2,ha.count)
|
73
|
+
assert_equal(2,ha.count(3))
|
74
|
+
assert_equal(3,ha.count{|e|e==9})
|
75
|
+
end
|
76
|
+
def test_delete
|
77
|
+
a, ha = aha [1,3,5,8,9,'a','b','c','c','d']
|
78
|
+
# test delete
|
79
|
+
assert_equal(a.delete(1),ha.delete(1))
|
80
|
+
assert_equal(a,ha.to_a)
|
81
|
+
assert_equal(a.delete('a'),ha.delete('a'))
|
82
|
+
assert_equal(a,ha.to_a)
|
83
|
+
# test delete_at
|
84
|
+
assert_equal(a.delete_at(0),ha.delete_at(0))
|
85
|
+
assert_equal(a,ha.to_a)
|
86
|
+
# test delete_if
|
87
|
+
assert_equal(a.delete_if{|v|v=='c'},ha.delete_if{|v|v=='c'}.to_a)
|
88
|
+
assert_equal(a,ha.to_a)
|
89
|
+
end
|
90
|
+
def test_each
|
91
|
+
a, ha = aha [4,'a',nil,'b']
|
92
|
+
# test each
|
93
|
+
ca, cha = '', ''
|
94
|
+
a.each{|e| ca += e.to_s}
|
95
|
+
ha.each{|e| cha += e.to_s}
|
96
|
+
assert_equal(ca,cha)
|
97
|
+
assert_equal(a,ha.to_a)
|
98
|
+
# test each_index
|
99
|
+
ca, cha = '', ''
|
100
|
+
a.each_index{|i| ca += i.to_s}
|
101
|
+
ha.each_index{|i| cha += i.to_s}
|
102
|
+
assert_equal(ca,cha)
|
103
|
+
assert_equal(a,ha.to_a)
|
104
|
+
end
|
105
|
+
def test_eql?
|
106
|
+
a, ha = aha [4,'a',nil,'b']
|
107
|
+
b, hb = aha [4,'a',nil,'b']
|
108
|
+
assert_equal(a,b)
|
109
|
+
assert_equal(ha,hb)
|
110
|
+
assert_equal(a.eql?(b),ha.eql?(hb))
|
111
|
+
assert_equal(b.eql?(a),hb.eql?(ha))
|
112
|
+
assert(ha.eql?(hb))
|
113
|
+
assert(hb.eql?(ha))
|
114
|
+
end
|
115
|
+
def test_empty?
|
116
|
+
a, ha = aha []
|
117
|
+
assert_equal(a.empty?,ha.empty?)
|
118
|
+
a, ha = aha [1,2,3]
|
119
|
+
assert_equal(a.empty?,ha.empty?)
|
120
|
+
end
|
121
|
+
def test_fill
|
122
|
+
a, ha = aha ['a','b','c','d']
|
123
|
+
assert_equal(a.fill('x'),ha.fill('x').to_a)
|
124
|
+
assert_equal(a,ha.to_a)
|
125
|
+
assert_equal(a.fill('y',2,2),ha.fill('y',2,2).to_a)
|
126
|
+
assert_equal(a,ha.to_a)
|
127
|
+
assert_equal(a.fill('z',0..1),ha.fill('z',0..1).to_a)
|
128
|
+
assert_equal(a,ha.to_a)
|
129
|
+
end
|
130
|
+
def test_first
|
131
|
+
a, ha = aha [2,3,4]
|
132
|
+
assert_equal(a.first,ha.first)
|
133
|
+
end
|
134
|
+
def test_flatten
|
135
|
+
a, ha = aha [2,[3],'a',[[1,2],4],nil,5]
|
136
|
+
assert_equal(a.flatten,ha.flatten.to_a)
|
137
|
+
a, ha = aha [2,[3],'a',[[1,2],4],nil,5]
|
138
|
+
assert_equal(a.flatten!,ha.flatten!.to_a)
|
139
|
+
assert_equal(a,ha.to_a)
|
140
|
+
a, ha = aha [2,3,'a',nil,5]
|
141
|
+
assert_equal(a.flatten!,ha.flatten!)
|
142
|
+
end
|
143
|
+
def test_include?
|
144
|
+
a, ha = aha ['a','b','c','d']
|
145
|
+
assert_equal(a.include?('b'),ha.include?('b'))
|
146
|
+
assert_equal(a.include?('x'),ha.include?('x'))
|
147
|
+
end
|
148
|
+
def test_index
|
149
|
+
a, ha = aha ['a','b','b','c','d']
|
150
|
+
assert_equal(a.index('b'),ha.index('b'))
|
151
|
+
assert_equal(a.index('x'),ha.index('x'))
|
152
|
+
end
|
153
|
+
def test_join
|
154
|
+
a, ha = aha [2,3,4]
|
155
|
+
assert_equal(a.join,ha.join)
|
156
|
+
assert_equal(a.join(','),ha.join(','))
|
157
|
+
end
|
158
|
+
def test_last
|
159
|
+
a, ha = aha [2,3,4]
|
160
|
+
assert_equal(a.last,ha.last)
|
161
|
+
end
|
162
|
+
def test_length
|
163
|
+
a, ha = aha [2,3,4]
|
164
|
+
assert_equal(a.length,ha.length)
|
165
|
+
end
|
166
|
+
def test_map!
|
167
|
+
a, ha = aha [4,5,6,6]
|
168
|
+
assert_equal(a.map!{|e|e}, ha.map!{|e|e}.to_a)
|
169
|
+
assert_equal(a,ha.to_a)
|
170
|
+
end
|
171
|
+
def test_nitems
|
172
|
+
a, ha = aha [4,5,nil,6,nil]
|
173
|
+
assert_equal(a.nitems, ha.nitems)
|
174
|
+
end
|
175
|
+
def test_pop
|
176
|
+
a, ha = aha [4,5,nil,6,nil]
|
177
|
+
assert_equal(a.pop, ha.pop)
|
178
|
+
assert_equal(a, ha.to_a)
|
179
|
+
assert_equal(a.pop, ha.pop)
|
180
|
+
assert_equal(a, ha.to_a)
|
181
|
+
end
|
182
|
+
def test_push
|
183
|
+
a, ha = aha [4,5,nil,6,nil]
|
184
|
+
args = [1,2,3]
|
185
|
+
assert_equal(a.push(*args), ha.push(*args).to_a)
|
186
|
+
assert_equal(a, ha.to_a)
|
187
|
+
end
|
188
|
+
def test_rassoc
|
189
|
+
a, ha = aha [[1,2],[1,3],[1,3]]
|
190
|
+
assert_equal(a.rassoc(3), ha.rassoc(3).to_a)
|
191
|
+
end
|
192
|
+
def test_reject!
|
193
|
+
a, ha = aha ['a','b','c','c','d']
|
194
|
+
assert_equal(a.reject!{|v|v=='c'},ha.reject!{|v|v=='c'}.to_a)
|
195
|
+
assert_equal(a,ha.to_a)
|
196
|
+
assert_equal(a.reject!{|v|v=='x'},ha.reject!{|v|v=='x'})
|
197
|
+
assert_equal(a,ha.to_a)
|
198
|
+
end
|
199
|
+
def test_reverse
|
200
|
+
a, ha = aha ['a','b','c','c','d']
|
201
|
+
assert_equal(a.reverse,ha.reverse.to_a)
|
202
|
+
assert_equal(a.reverse!,ha.reverse!.to_a)
|
203
|
+
assert_equal(a,ha.to_a)
|
204
|
+
a, ha = aha [1,2,3,'a','b','c']
|
205
|
+
assert_equal(a.reverse!,ha.reverse!.to_a)
|
206
|
+
assert_equal(a,ha.to_a)
|
207
|
+
end
|
208
|
+
def test_reverse_each
|
209
|
+
a, ha = aha [4,'a',nil,'b']
|
210
|
+
# test each
|
211
|
+
ca, cha = '', ''
|
212
|
+
a.reverse_each{|e| ca += e.to_s}
|
213
|
+
ha.reverse_each{|e| cha += e.to_s}
|
214
|
+
assert_equal(ca,cha)
|
215
|
+
assert_equal(a,ha.to_a)
|
216
|
+
end
|
217
|
+
def test_rindex
|
218
|
+
a, ha = aha ['a','b','c','c','d']
|
219
|
+
assert_equal(a.rindex('c'),ha.rindex('c'))
|
220
|
+
assert_equal(a.rindex('x'),ha.rindex('x'))
|
221
|
+
end
|
222
|
+
def test_shift
|
223
|
+
a, ha = aha ['a','b','c','c','d']
|
224
|
+
assert_equal(a.shift,ha.shift)
|
225
|
+
assert_equal(a,ha.to_a)
|
226
|
+
end
|
227
|
+
|
228
|
+
def test_slice
|
229
|
+
a, ha = aha [1,2,3,4]
|
230
|
+
# test []
|
231
|
+
assert_equal(a[1], ha[1])
|
232
|
+
assert_equal(a[1..2], ha[1..2].to_a)
|
233
|
+
assert_equal(a[1...2], ha[1...2].to_a)
|
234
|
+
assert_equal(a[1..7], ha[1..7].to_a)
|
235
|
+
assert_equal(a[1,2], ha[1,2].to_a)
|
236
|
+
# test slice
|
237
|
+
assert_equal(a.slice(1), ha.slice(1))
|
238
|
+
assert_equal(a.slice(1..2), ha.slice(1..2).to_a)
|
239
|
+
assert_equal(a.slice(1...2), ha.slice(1...2).to_a)
|
240
|
+
assert_equal(a.slice(1...2), ha.slice(1...2).to_a)
|
241
|
+
assert_equal(a.slice(1,2), ha.slice(1,2).to_a)
|
242
|
+
# test slice!
|
243
|
+
assert_equal(a.slice!(1..2), ha.slice!(1..2).to_a)
|
244
|
+
assert_equal(a, ha.to_a)
|
245
|
+
end
|
246
|
+
|
247
|
+
def test_sort
|
248
|
+
a, ha = aha [1,2,3,4]
|
249
|
+
# test sort
|
250
|
+
assert_equal(a.sort, ha.sort.to_a)
|
251
|
+
#assert_equal(a.sort{|x,y| y<=>x}, ha.sort{|x,y| y<=>x}.to_a)
|
252
|
+
# test sort!
|
253
|
+
assert_equal(a.sort!, ha.sort!.to_a)
|
254
|
+
assert_equal(a, ha.to_a)
|
255
|
+
end
|
256
|
+
|
257
|
+
def test_uniq
|
258
|
+
a, ha = aha [1,1,2,3,3,4,5,6,6]
|
259
|
+
assert_equal(a.uniq, ha.uniq.to_a)
|
260
|
+
end
|
261
|
+
|
262
|
+
def test_uniq!
|
263
|
+
a, ha = aha [1,1,2,3,3,4,5,6,6]
|
264
|
+
a.uniq!; ha.uniq!
|
265
|
+
assert_equal(a, ha.to_a)
|
266
|
+
end
|
267
|
+
|
268
|
+
def test_values_at
|
269
|
+
a, ha = aha ['a','b','c','d']
|
270
|
+
assert_equal(a.values_at(1,3),ha.values_at(1,3).to_a)
|
271
|
+
end
|
272
|
+
|
273
|
+
def test_unshift
|
274
|
+
a, ha = aha ['a','b','c','c','d']
|
275
|
+
assert_equal(a.unshift('x'),ha.unshift('x').to_a)
|
276
|
+
assert_equal(a,ha.to_a)
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|