facets 0.9.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +9 -2
- data/ProjectInfo +15 -22
- data/Rakefile +17 -15
- data/TODO +2 -29
- data/lib/facet/array.rb +33 -1
- data/lib/facet/array/at_rand.rb +52 -1
- data/lib/facet/array/body.rb +2 -1
- data/lib/facet/array/delete_unless.rb +35 -1
- data/lib/facet/array/delete_values.rb +38 -1
- data/lib/facet/array/delete_values_at.rb +57 -1
- data/lib/facet/array/each_with_key.rb +9 -1
- data/lib/facet/array/first.rb +84 -1
- data/lib/facet/array/foot.rb +2 -1
- data/lib/facet/array/head.rb +80 -1
- data/lib/facet/array/last.rb +2 -1
- data/lib/facet/array/last_index.rb +35 -1
- data/lib/facet/array/merge.rb +40 -1
- data/lib/facet/array/mid.rb +50 -1
- data/lib/facet/array/middle.rb +45 -1
- data/lib/facet/array/op_fetch.rb +40 -1
- data/lib/facet/array/op_store.rb +47 -1
- data/lib/facet/array/pick.rb +68 -1
- data/lib/facet/array/pos.rb +39 -1
- data/lib/facet/array/pull.rb +37 -1
- data/lib/facet/array/rand_index.rb +30 -1
- data/lib/facet/array/rand_subset.rb +56 -1
- data/lib/facet/array/range.rb +47 -1
- data/lib/facet/array/rotate.rb +67 -1
- data/lib/facet/array/select.rb +37 -1
- data/lib/facet/array/shuffle.rb +66 -1
- data/lib/facet/array/slap.rb +37 -1
- data/lib/facet/array/store.rb +7 -1
- data/lib/facet/array/tail.rb +2 -1
- data/lib/facet/array/thru.rb +38 -1
- data/lib/facet/array/to_b.rb +31 -1
- data/lib/facet/array/to_h.rb +57 -1
- data/lib/facet/array/to_hash.rb +46 -1
- data/lib/facet/array/unzip.rb +20 -1
- data/lib/facet/binding.rb +14 -1
- data/lib/facet/binding/__DIR__.rb +2 -1
- data/lib/facet/binding/__FILE__.rb +2 -1
- data/lib/facet/binding/__LINE__.rb +58 -1
- data/lib/facet/binding/call_stack.rb +42 -1
- data/lib/facet/binding/called.rb +41 -1
- data/lib/facet/binding/caller.rb +42 -1
- data/lib/facet/binding/defined.rb +41 -1
- data/lib/facet/binding/eval.rb +42 -1
- data/lib/facet/binding/local_variables.rb +45 -1
- data/lib/facet/binding/method_name.rb +48 -1
- data/lib/facet/binding/op_fetch.rb +45 -1
- data/lib/facet/binding/op_store.rb +46 -1
- data/lib/facet/binding/self.rb +41 -1
- data/lib/facet/binding/self/of_caller.rb +122 -1
- data/lib/facet/class.rb +5 -1
- data/lib/facet/class/by_name.rb +1 -1
- data/lib/facet/class/descendents.rb +44 -1
- data/lib/facet/class/remove_descendents.rb +46 -1
- data/lib/facet/class/remove_subclasses.rb +2 -1
- data/lib/facet/class/subclasses.rb +2 -1
- data/lib/facet/comparable.rb +5 -1
- data/lib/facet/comparable/at_least.rb +53 -1
- data/lib/facet/comparable/at_most.rb +2 -1
- data/lib/facet/comparable/cap.rb +2 -1
- data/lib/facet/comparable/clip.rb +72 -1
- data/lib/facet/comparable/cmp.rb +38 -1
- data/lib/facet/continuation.rb +1 -1
- data/lib/facet/continuation/self/create.rb +71 -1
- data/lib/facet/date.rb +0 -1
- data/lib/facet/date/days_in_month.rb +42 -1
- data/lib/facet/date/days_of_month.rb +34 -1
- data/lib/facet/date/stamp.rb +52 -1
- data/lib/facet/date/to_date.rb +36 -1
- data/lib/facet/date/to_s.rb +33 -1
- data/lib/facet/date/to_time.rb +36 -1
- data/lib/facet/dir.rb +4 -1
- data/lib/facet/dir/self/ancestor.rb +33 -1
- data/lib/facet/dir/self/ascend.rb +56 -1
- data/lib/facet/dir/self/ls_r.rb +76 -1
- data/lib/facet/dir/self/recurse.rb +2 -1
- data/lib/facet/enumerable.rb +38 -1
- data/lib/facet/enumerable/collect_with_counter.rb +2 -1
- data/lib/facet/enumerable/collect_with_index.rb +51 -1
- data/lib/facet/enumerable/commonality.rb +63 -1
- data/lib/facet/enumerable/compact_collect.rb +50 -1
- data/lib/facet/enumerable/compact_map.rb +2 -1
- data/lib/facet/enumerable/cross.rb +44 -1
- data/lib/facet/enumerable/each_by.rb +2 -1
- data/lib/facet/enumerable/each_combination.rb +59 -1
- data/lib/facet/enumerable/each_pair.rb +50 -1
- data/lib/facet/enumerable/each_permutation.rb +2 -1
- data/lib/facet/enumerable/each_slice.rb +131 -1
- data/lib/facet/enumerable/each_unique_pair.rb +66 -1
- data/lib/facet/enumerable/each_with_counter.rb +8 -1
- data/lib/facet/enumerable/elementwise.rb +2 -1
- data/lib/facet/enumerable/entropy.rb +52 -1
- data/lib/facet/enumerable/every.rb +65 -1
- data/lib/facet/enumerable/ew.rb +64 -1
- data/lib/facet/enumerable/filter_collect.rb +58 -1
- data/lib/facet/enumerable/filter_map.rb +2 -1
- data/lib/facet/enumerable/find_collisions.rb +41 -1
- data/lib/facet/enumerable/frequency.rb +39 -1
- data/lib/facet/enumerable/graph.rb +59 -1
- data/lib/facet/enumerable/ideal_entropy.rb +49 -1
- data/lib/facet/enumerable/map_with_counter.rb +2 -1
- data/lib/facet/enumerable/map_with_index.rb +2 -1
- data/lib/facet/enumerable/none.rb +56 -1
- data/lib/facet/enumerable/nonuniq.rb +39 -1
- data/lib/facet/enumerable/occur.rb +62 -1
- data/lib/facet/enumerable/one.rb +65 -1
- data/lib/facet/enumerable/op_pow.rb +38 -1
- data/lib/facet/enumerable/partition_by.rb +55 -1
- data/lib/facet/enumerable/permute.rb +135 -0
- data/lib/facet/enumerable/probability.rb +59 -1
- data/lib/facet/enumerable/project.rb +11 -1
- data/lib/facet/enumerable/self/combinations.rb +68 -1
- data/lib/facet/enumerable/self/cross.rb +79 -1
- data/lib/facet/enumerable/to_h.rb +50 -1
- data/lib/facet/enumerable/uniq_by.rb +39 -1
- data/lib/facet/enumerable/where.rb +12 -1
- data/lib/facet/file.rb +5 -1
- data/lib/facet/file/self/create.rb +52 -1
- data/lib/facet/file/self/open_as_string.rb +81 -1
- data/lib/facet/file/self/read_list.rb +47 -1
- data/lib/facet/file/self/sanitize.rb +50 -1
- data/lib/facet/file/self/split_all.rb +36 -1
- data/lib/facet/fileutils.rb +0 -1
- data/lib/facet/fileutils/head.rb +2 -1
- data/lib/facet/fileutils/safe_ln.rb +38 -1
- data/lib/facet/fileutils/slice.rb +152 -1
- data/lib/facet/fileutils/split_all.rb +29 -1
- data/lib/facet/fileutils/tail.rb +2 -1
- data/lib/facet/fileutils/wc.rb +128 -1
- data/lib/facet/fileutils/whereis.rb +76 -1
- data/lib/facet/fileutils/which.rb +117 -1
- data/lib/facet/float.rb +3 -1
- data/lib/facet/float/approx.rb +42 -1
- data/lib/facet/float/round_at.rb +72 -1
- data/lib/facet/float/round_to.rb +73 -1
- data/lib/facet/hash.rb +40 -1
- data/lib/facet/hash/alias.rb +54 -1
- data/lib/facet/hash/assert_has_keys.rb +38 -1
- data/lib/facet/hash/assert_has_only_keys.rb +38 -1
- data/lib/facet/hash/at.rb +26 -1
- data/lib/facet/hash/collate.rb +53 -1
- data/lib/facet/hash/delete_unless.rb +15 -1
- data/lib/facet/hash/each.rb +61 -1
- data/lib/facet/hash/each_with_index.rb +35 -1
- data/lib/facet/hash/each_with_key.rb +32 -1
- data/lib/facet/hash/graph.rb +31 -1
- data/lib/facet/hash/has_keys.rb +37 -1
- data/lib/facet/hash/has_only_keys.rb +37 -1
- data/lib/facet/hash/inverse.rb +51 -1
- data/lib/facet/hash/join.rb +19 -1
- data/lib/facet/hash/keys_to_iv.rb +60 -1
- data/lib/facet/hash/keys_to_s.rb +80 -1
- data/lib/facet/hash/keys_to_sym.rb +91 -1
- data/lib/facet/hash/op_fetch.rb +146 -1
- data/lib/facet/hash/op_lshift.rb +28 -1
- data/lib/facet/hash/op_store.rb +2 -1
- data/lib/facet/hash/rand_key.rb +47 -1
- data/lib/facet/hash/rand_pair.rb +50 -1
- data/lib/facet/hash/rand_value.rb +60 -1
- data/lib/facet/hash/replace_each.rb +33 -1
- data/lib/facet/hash/self/zipnew.rb +37 -1
- data/lib/facet/hash/shuffle.rb +53 -1
- data/lib/facet/hash/slice.rb +33 -1
- data/lib/facet/hash/stringify_keys.rb +2 -1
- data/lib/facet/hash/swap.rb +36 -1
- data/lib/facet/hash/swapkey.rb +44 -1
- data/lib/facet/hash/symoblize_keys.rb +2 -1
- data/lib/facet/hash/to_h.rb +35 -1
- data/lib/facet/hash/to_ostruct.rb +40 -1
- data/lib/facet/hash/to_ostruct_recurse.rb +45 -1
- data/lib/facet/hash/traverse.rb +63 -1
- data/lib/facet/hash/update_each.rb +43 -1
- data/lib/facet/hash/update_keys.rb +31 -1
- data/lib/facet/hash/update_values.rb +32 -1
- data/lib/facet/hash/variablize_keys.rb +2 -1
- data/lib/facet/hash/weave.rb +88 -1
- data/lib/facet/integer.rb +8 -1
- data/lib/facet/integer/even.rb +2 -1
- data/lib/facet/integer/fac.rb +2 -0
- data/lib/facet/integer/fact.rb +2 -1
- data/lib/facet/integer/factorial.rb +61 -1
- data/lib/facet/integer/multiple.rb +69 -1
- data/lib/facet/integer/odd.rb +2 -1
- data/lib/facet/integer/ordinal.rb +41 -1
- data/lib/facet/integer/times_collect.rb +39 -1
- data/lib/facet/integer/times_map.rb +2 -1
- data/lib/facet/kernel.rb +65 -1
- data/lib/facet/kernel/__DIR__.rb +11 -0
- data/lib/facet/kernel/__class__.rb +31 -1
- data/lib/facet/kernel/__meta__.rb +28 -1
- data/lib/facet/kernel/adhoc.rb +11 -0
- data/lib/facet/kernel/as.rb +91 -1
- data/lib/facet/kernel/assign_from.rb +82 -1
- data/lib/facet/kernel/assign_with.rb +75 -1
- data/lib/facet/kernel/autoreload.rb +46 -1
- data/lib/facet/kernel/autoreload_glob.rb +36 -1
- data/lib/facet/kernel/bool.rb +77 -1
- data/lib/facet/kernel/bug.rb +39 -1
- data/lib/facet/kernel/call_stack.rb +59 -1
- data/lib/facet/kernel/called.rb +40 -1
- data/lib/facet/kernel/complete.rb +6 -1
- data/lib/facet/kernel/constant.rb +52 -1
- data/lib/facet/kernel/copy.rb +48 -1
- data/lib/facet/kernel/deep_copy.rb +49 -1
- data/lib/facet/kernel/demo.rb +46 -1
- data/lib/facet/kernel/eigenclass.rb +17 -1
- data/lib/facet/kernel/false.rb +2 -1
- data/lib/facet/kernel/fn.rb +33 -1
- data/lib/facet/kernel/generate_method_name.rb +39 -1
- data/lib/facet/kernel/get_by_id.rb +33 -1
- data/lib/facet/kernel/here.rb +34 -1
- data/lib/facet/kernel/in.rb +35 -1
- data/lib/facet/kernel/instance_assign.rb +25 -1
- data/lib/facet/kernel/instvar.rb +13 -1
- data/lib/facet/kernel/is.rb +5 -1
- data/lib/facet/kernel/maybe.rb +41 -1
- data/lib/facet/kernel/me.rb +17 -1
- data/lib/facet/kernel/meta.rb +2 -1
- data/lib/facet/kernel/metaclass.rb +42 -1
- data/lib/facet/kernel/method.rb +76 -1
- data/lib/facet/kernel/method_name.rb +49 -1
- data/lib/facet/kernel/methods.rb +79 -1
- data/lib/facet/kernel/nack.rb +12 -1
- data/lib/facet/kernel/new.rb +40 -1
- data/lib/facet/kernel/object_class.rb +31 -1
- data/lib/facet/kernel/object_hexid.rb +35 -1
- data/lib/facet/kernel/op_esc.rb +37 -1
- data/lib/facet/kernel/own.rb +17 -1
- data/lib/facet/kernel/p.rb +12 -1
- data/lib/facet/kernel/require_all.rb +44 -1
- data/lib/facet/kernel/require_esc.rb +42 -1
- data/lib/facet/kernel/require_facet.rb +41 -1
- data/lib/facet/kernel/require_local.rb +25 -1
- data/lib/facet/kernel/resc.rb +32 -1
- data/lib/facet/kernel/returning.rb +49 -1
- data/lib/facet/kernel/send_as.rb +34 -1
- data/lib/facet/kernel/set_from.rb +69 -1
- data/lib/facet/kernel/set_with.rb +74 -1
- data/lib/facet/kernel/silence_warnings.rb +2 -1
- data/lib/facet/kernel/silently.rb +41 -1
- data/lib/facet/kernel/singleton.rb +47 -1
- data/lib/facet/kernel/superior.rb +53 -1
- data/lib/facet/kernel/supermethod.rb +44 -1
- data/lib/facet/kernel/this.rb +33 -1
- data/lib/facet/kernel/to_b.rb +41 -1
- data/lib/facet/kernel/to_bool.rb +47 -1
- data/lib/facet/kernel/true.rb +2 -1
- data/lib/facet/kernel/unuri.rb +2 -1
- data/lib/facet/kernel/uri.rb +38 -1
- data/lib/facet/kernel/val.rb +52 -1
- data/lib/facet/kernel/warn_with_line.rb +30 -1
- data/lib/facet/kernel/with_accessor.rb +94 -1
- data/lib/facet/kernel/with_reader.rb +2 -1
- data/lib/facet/kernel/with_writer.rb +2 -1
- data/lib/facet/logger.rb +0 -1
- data/lib/facet/logger/format.rb +28 -1
- data/lib/facet/logger/format_message.rb +1 -1
- data/lib/facet/matchdata.rb +3 -1
- data/lib/facet/matchdata/match.rb +37 -1
- data/lib/facet/matchdata/matchset.rb +2 -1
- data/lib/facet/matchdata/matchtree.rb +62 -1
- data/lib/facet/module.rb +40 -1
- data/lib/facet/module/abstract.rb +50 -1
- data/lib/facet/module/alias_module_function.rb +57 -1
- data/lib/facet/module/ancestor.rb +38 -1
- data/lib/facet/module/attr.rb +23 -1
- data/lib/facet/module/attr_setter.rb +48 -1
- data/lib/facet/module/attr_tester.rb +56 -1
- data/lib/facet/module/basename.rb +39 -1
- data/lib/facet/module/by_name.rb +68 -1
- data/lib/facet/module/cattr_accessor.rb +141 -1
- data/lib/facet/module/cattr_reader.rb +2 -1
- data/lib/facet/module/cattr_writer.rb +2 -1
- data/lib/facet/module/clone_removing.rb +2 -1
- data/lib/facet/module/clone_renaming.rb +2 -1
- data/lib/facet/module/clone_using.rb +87 -1
- data/lib/facet/module/dirname.rb +42 -1
- data/lib/facet/module/equate_on.rb +70 -1
- data/lib/facet/module/generate_instance_method_name.rb +47 -1
- data/lib/facet/module/include_as.rb +102 -1
- data/lib/facet/module/initializer.rb +65 -1
- data/lib/facet/module/instance_methods.rb +186 -1
- data/lib/facet/module/integrate.rb +51 -1
- data/lib/facet/module/is.rb +34 -1
- data/lib/facet/module/memoize.rb +95 -1
- data/lib/facet/module/modspace.rb +43 -1
- data/lib/facet/module/namespace.rb +61 -1
- data/lib/facet/module/nesting.rb +45 -1
- data/lib/facet/module/redef.rb +31 -1
- data/lib/facet/module/redefine_method.rb +57 -1
- data/lib/facet/module/redirect.rb +30 -1
- data/lib/facet/module/redirect_method.rb +64 -1
- data/lib/facet/module/remove.rb +29 -1
- data/lib/facet/module/rename.rb +31 -1
- data/lib/facet/module/rename_method.rb +38 -1
- data/lib/facet/module/revisal.rb +49 -1
- data/lib/facet/module/shadow_all.rb +17 -1
- data/lib/facet/module/shadow_method.rb +42 -1
- data/lib/facet/module/sort_on.rb +73 -1
- data/lib/facet/module/undef.rb +29 -1
- data/lib/facet/module/wrap.rb +30 -1
- data/lib/facet/module/wrap_method.rb +48 -1
- data/lib/facet/nilclass.rb +7 -1
- data/lib/facet/nilclass/empty.rb +32 -1
- data/lib/facet/nilclass/include.rb +32 -1
- data/lib/facet/nilclass/length.rb +2 -1
- data/lib/facet/nilclass/op_fetch.rb +37 -1
- data/lib/facet/nilclass/size.rb +44 -1
- data/lib/facet/nilclass/to_f.rb +32 -1
- data/lib/facet/nilclass/to_h.rb +33 -1
- data/lib/facet/numeric.rb +5 -1
- data/lib/facet/numeric/ceil_multiple.rb +40 -1
- data/lib/facet/numeric/pred.rb +2 -1
- data/lib/facet/numeric/succ.rb +69 -1
- data/lib/facet/numeric/to_b.rb +38 -1
- data/lib/facet/ostruct.rb +0 -1
- data/lib/facet/ostruct/__merge__.rb +52 -1
- data/lib/facet/ostruct/__table__.rb +17 -1
- data/lib/facet/ostruct/__update__.rb +45 -1
- data/lib/facet/ostruct/op_fetch.rb +40 -1
- data/lib/facet/ostruct/op_store.rb +42 -1
- data/lib/facet/ostruct/to_h.rb +8 -1
- data/lib/facet/pathname.rb +2 -1
- data/lib/facet/pathname/ascend.rb +22 -1
- data/lib/facet/pathname/descend.rb +20 -1
- data/lib/facet/proc.rb +3 -1
- data/lib/facet/proc/compose.rb +62 -1
- data/lib/facet/proc/op_mul.rb +2 -1
- data/lib/facet/proc/to_method.rb +74 -1
- data/lib/facet/range.rb +4 -1
- data/lib/facet/range/to_r.rb +32 -1
- data/lib/facet/range/to_range.rb +36 -1
- data/lib/facet/range/umbrella.rb +67 -1
- data/lib/facet/range/within.rb +44 -1
- data/lib/facet/regexp.rb +3 -1
- data/lib/facet/regexp/arity.rb +41 -1
- data/lib/facet/regexp/to_re.rb +38 -1
- data/lib/facet/regexp/to_regexp.rb +36 -1
- data/lib/facet/string.rb +86 -1
- data/lib/facet/string/align_center.rb +87 -1
- data/lib/facet/string/align_left.rb +2 -1
- data/lib/facet/string/align_right.rb +2 -1
- data/lib/facet/string/at.rb +8 -1
- data/lib/facet/string/at_rand.rb +65 -1
- data/lib/facet/string/basename.rb +48 -1
- data/lib/facet/string/blank.rb +36 -1
- data/lib/facet/string/bracket.rb +70 -1
- data/lib/facet/string/brief.rb +33 -1
- data/lib/facet/string/bytes.rb +19 -1
- data/lib/facet/string/camelcase.rb +58 -1
- data/lib/facet/string/camelize.rb +35 -1
- data/lib/facet/string/capitalized.rb +38 -1
- data/lib/facet/string/chars.rb +34 -1
- data/lib/facet/string/cmp.rb +43 -1
- data/lib/facet/string/demodulize.rb +40 -1
- data/lib/facet/string/dequote.rb +29 -1
- data/lib/facet/string/downcase.rb +37 -1
- data/lib/facet/string/dresner.rb +49 -1
- data/lib/facet/string/each_char.rb +35 -1
- data/lib/facet/string/each_word.rb +50 -1
- data/lib/facet/string/ends_with.rb +2 -1
- data/lib/facet/string/first.rb +94 -1
- data/lib/facet/string/first_char.rb +20 -1
- data/lib/facet/string/fold.rb +67 -1
- data/lib/facet/string/format.rb +17 -1
- data/lib/facet/string/frequency.rb +39 -1
- data/lib/facet/string/humanize.rb +31 -1
- data/lib/facet/string/indent.rb +68 -1
- data/lib/facet/string/index_all.rb +40 -1
- data/lib/facet/string/last.rb +94 -1
- data/lib/facet/string/last_char.rb +22 -1
- data/lib/facet/string/line_wrap.rb +77 -1
- data/lib/facet/string/lines.rb +33 -1
- data/lib/facet/string/lowercase.rb +32 -1
- data/lib/facet/string/margin.rb +138 -1
- data/lib/facet/string/mscan.rb +42 -1
- data/lib/facet/string/natcmp.rb +108 -1
- data/lib/facet/string/nchar.rb +45 -1
- data/lib/facet/string/ordinal.rb +16 -1
- data/lib/facet/string/plural.rb +2 -1
- data/lib/facet/string/pop.rb +54 -1
- data/lib/facet/string/probability.rb +34 -1
- data/lib/facet/string/pull.rb +17 -1
- data/lib/facet/string/push.rb +44 -1
- data/lib/facet/string/quote.rb +68 -1
- data/lib/facet/string/rand_byte.rb +55 -1
- data/lib/facet/string/rand_index.rb +29 -1
- data/lib/facet/string/range.rb +37 -1
- data/lib/facet/string/range_all.rb +48 -1
- data/lib/facet/string/range_of_line.rb +42 -1
- data/lib/facet/string/regesc.rb +32 -0
- data/lib/facet/string/self/format.rb +17 -1
- data/lib/facet/string/self/interpolate.rb +31 -1
- data/lib/facet/string/self/patterns.rb +51 -1
- data/lib/facet/string/self/rand_letter.rb +34 -1
- data/lib/facet/string/self/random.rb +36 -1
- data/lib/facet/string/shatter.rb +45 -1
- data/lib/facet/string/shift.rb +42 -1
- data/lib/facet/string/shuffle.rb +42 -1
- data/lib/facet/string/similarity.rb +108 -1
- data/lib/facet/string/singular.rb +117 -1
- data/lib/facet/string/slap.rb +44 -1
- data/lib/facet/string/soundex.rb +102 -1
- data/lib/facet/string/starts_with.rb +24 -1
- data/lib/facet/string/succ.rb +38 -1
- data/lib/facet/string/tab.rb +2 -1
- data/lib/facet/string/tabto.rb +2 -1
- data/lib/facet/string/to_a.rb +35 -1
- data/lib/facet/string/to_arr.rb +55 -1
- data/lib/facet/string/to_b.rb +64 -1
- data/lib/facet/string/to_const.rb +39 -1
- data/lib/facet/string/to_date.rb +35 -1
- data/lib/facet/string/to_proc.rb +54 -1
- data/lib/facet/string/to_re.rb +46 -1
- data/lib/facet/string/to_rx.rb +2 -0
- data/lib/facet/string/to_time.rb +34 -1
- data/lib/facet/string/unbracket.rb +46 -1
- data/lib/facet/string/underscore.rb +18 -1
- data/lib/facet/string/unix_crypt.rb +41 -1
- data/lib/facet/string/unpack.rb +45 -1
- data/lib/facet/string/unshift.rb +42 -1
- data/lib/facet/string/upcase.rb +45 -1
- data/lib/facet/string/uppercase.rb +2 -1
- data/lib/facet/string/whitespace.rb +27 -1
- data/lib/facet/string/word_filter.rb +61 -1
- data/lib/facet/string/word_wrap.rb +90 -1
- data/lib/facet/string/words.rb +45 -1
- data/lib/facet/symbol.rb +13 -1
- data/lib/facet/symbol/camelcase.rb +42 -1
- data/lib/facet/symbol/camelize.rb +33 -1
- data/lib/facet/symbol/capitalize.rb +31 -1
- data/lib/facet/symbol/capitalized.rb +33 -1
- data/lib/facet/symbol/downcase.rb +36 -1
- data/lib/facet/symbol/not.rb +40 -1
- data/lib/facet/symbol/pad.rb +43 -1
- data/lib/facet/symbol/succ.rb +42 -1
- data/lib/facet/symbol/to_const.rb +40 -1
- data/lib/facet/symbol/to_proc.rb +45 -1
- data/lib/facet/symbol/to_str.rb +39 -1
- data/lib/facet/symbol/underscore.rb +32 -1
- data/lib/facet/symbol/upcase.rb +37 -1
- data/lib/facet/time.rb +7 -1
- data/lib/facet/time/change.rb +51 -1
- data/lib/facet/time/elapse.rb +41 -1
- data/lib/facet/time/self/days_extrema.rb +22 -1
- data/lib/facet/time/stamp.rb +47 -1
- data/lib/facet/time/to_date.rb +37 -1
- data/lib/facet/time/to_s.rb +33 -1
- data/lib/facet/time/to_time.rb +36 -1
- data/lib/facet/unboundmethod.rb +1 -1
- data/lib/facet/unboundmethod/name.rb +8 -1
- data/lib/facets.rb +135 -154
- data/lib/facets/english/bytes.rb +212 -0
- data/lib/facets/english/multipliers.rb +192 -0
- data/lib/facets/english/ormsupport.rb +233 -0
- data/lib/facets/english/time.rb +327 -0
- data/lib/facets/group/inflect.rb +71 -0
- data/lib/facets/group/nilasemptiness.rb +34 -0
- data/lib/facets/group/random.rb +21 -0
- data/lib/facets/group/stringasarray.rb +16 -0
- data/lib/facets/method/README +1 -0
- data/lib/facets/support/functor.rb +49 -0
- data/test/lib/facet/array/test_at_rand.rb +34 -0
- data/test/lib/facet/array/test_delete_unless.rb +28 -0
- data/test/lib/facet/array/test_delete_values.rb +28 -0
- data/test/lib/facet/array/test_delete_values_at.rb +31 -0
- data/test/lib/facet/array/test_first.rb +46 -0
- data/test/lib/facet/array/test_head.rb +42 -0
- data/test/lib/facet/array/test_last_index.rb +26 -0
- data/test/lib/facet/array/test_merge.rb +35 -0
- data/test/lib/facet/array/test_mid.rb +33 -0
- data/test/lib/facet/array/test_middle.rb +29 -0
- data/test/lib/facet/array/test_op_fetch.rb +27 -0
- data/test/lib/facet/array/test_op_store.rb +30 -0
- data/test/lib/facet/array/test_pick.rb +40 -0
- data/test/lib/facet/array/test_pos.rb +28 -0
- data/test/lib/facet/array/test_pull.rb +28 -0
- data/test/lib/facet/array/test_rand_index.rb +29 -0
- data/test/lib/facet/array/test_rand_subset.rb +29 -0
- data/test/lib/facet/array/test_range.rb +32 -0
- data/test/lib/facet/array/test_rotate.rb +36 -0
- data/test/lib/facet/array/test_select.rb +28 -0
- data/test/lib/facet/array/test_shuffle.rb +35 -0
- data/test/lib/facet/array/test_slap.rb +28 -0
- data/test/lib/facet/array/test_thru.rb +27 -0
- data/test/lib/facet/array/test_to_b.rb +27 -0
- data/test/lib/facet/array/test_to_h.rb +33 -0
- data/test/lib/facet/array/test_to_hash.rb +27 -0
- data/test/lib/facet/binding/self/test_of_caller.rb +35 -0
- data/test/lib/facet/binding/test___LINE__.rb +43 -0
- data/test/lib/facet/binding/test_call_stack.rb +34 -0
- data/test/lib/facet/binding/test_called.rb +30 -0
- data/test/lib/facet/binding/test_caller.rb +35 -0
- data/test/lib/facet/binding/test_defined.rb +34 -0
- data/test/lib/facet/binding/test_eval.rb +34 -0
- data/test/lib/facet/binding/test_local_variables.rb +34 -0
- data/test/lib/facet/binding/test_method_name.rb +34 -0
- data/test/lib/facet/binding/test_op_fetch.rb +34 -0
- data/test/lib/facet/binding/test_op_store.rb +35 -0
- data/test/lib/facet/binding/test_self.rb +34 -0
- data/test/lib/facet/class/test_descendents.rb +30 -0
- data/test/lib/facet/class/test_remove_descendents.rb +32 -0
- data/test/lib/facet/comparable/test_at_least.rb +34 -0
- data/test/lib/facet/comparable/test_clip.rb +44 -0
- data/test/lib/facet/comparable/test_cmp.rb +28 -0
- data/test/lib/facet/continuation/self/test_create.rb +26 -0
- data/test/lib/facet/date/test_days_in_month.rb +30 -0
- data/test/lib/facet/date/test_days_of_month.rb +30 -0
- data/test/lib/facet/date/test_stamp.rb +38 -0
- data/test/lib/facet/date/test_to_date.rb +30 -0
- data/test/lib/facet/date/test_to_s.rb +30 -0
- data/test/lib/facet/date/test_to_time.rb +30 -0
- data/test/lib/facet/dir/self/test_ancestor.rb +26 -0
- data/test/lib/facet/dir/self/test_ascend.rb +41 -0
- data/test/lib/facet/dir/self/test_ls_r.rb +52 -0
- data/test/lib/facet/enumerable/self/test_combinations.rb +43 -0
- data/test/lib/facet/enumerable/self/test_cross.rb +31 -0
- data/test/lib/facet/enumerable/test_collect_with_index.rb +27 -0
- data/test/lib/facet/enumerable/test_commonality.rb +31 -0
- data/test/lib/facet/enumerable/test_compact_collect.rb +27 -0
- data/test/lib/facet/enumerable/test_cross.rb +30 -0
- data/test/lib/facet/enumerable/test_each_combination.rb +29 -0
- data/test/lib/facet/enumerable/test_each_pair.rb +29 -0
- data/test/lib/facet/enumerable/test_each_slice.rb +74 -0
- data/test/lib/facet/enumerable/test_each_unique_pair.rb +29 -0
- data/test/lib/facet/enumerable/test_entropy.rb +26 -0
- data/test/lib/facet/enumerable/test_every.rb +35 -0
- data/test/lib/facet/enumerable/test_ew.rb +31 -0
- data/test/lib/facet/enumerable/test_filter_collect.rb +31 -0
- data/test/lib/facet/enumerable/test_find_collisions.rb +30 -0
- data/test/lib/facet/enumerable/test_frequency.rb +27 -0
- data/test/lib/facet/enumerable/test_graph.rb +30 -0
- data/test/lib/facet/enumerable/test_ideal_entropy.rb +27 -0
- data/test/lib/facet/enumerable/test_none.rb +33 -0
- data/test/lib/facet/enumerable/test_occur.rb +30 -0
- data/test/lib/facet/enumerable/test_one.rb +35 -0
- data/test/lib/facet/enumerable/test_op_pow.rb +27 -0
- data/test/lib/facet/enumerable/test_partition_by.rb +31 -0
- data/test/lib/facet/enumerable/test_permute.rb +29 -0
- data/test/lib/facet/enumerable/test_probability.rb +27 -0
- data/test/lib/facet/enumerable/test_to_h.rb +27 -0
- data/test/lib/facet/enumerable/test_uniq_by.rb +28 -0
- data/test/lib/facet/file/self/test_create.rb +39 -0
- data/test/lib/facet/file/self/test_open_as_string.rb +40 -0
- data/test/lib/facet/file/self/test_read_list.rb +37 -0
- data/test/lib/facet/file/self/test_sanitize.rb +46 -0
- data/test/lib/facet/file/self/test_split_all.rb +27 -0
- data/test/lib/facet/fileutils/test_slice.rb +96 -0
- data/test/lib/facet/fileutils/test_wc.rb +68 -0
- data/test/lib/facet/fileutils/test_which.rb +61 -0
- data/test/lib/facet/float/test_approx.rb +28 -0
- data/test/lib/facet/float/test_round_at.rb +46 -0
- data/test/lib/facet/float/test_round_to.rb +46 -0
- data/test/lib/facet/hash/self/test_zipnew.rb +28 -0
- data/test/lib/facet/hash/test_alias.rb +31 -0
- data/test/lib/facet/hash/test_assert_has_keys.rb +27 -0
- data/test/lib/facet/hash/test_assert_has_only_keys.rb +27 -0
- data/test/lib/facet/hash/test_at.rb +28 -0
- data/test/lib/facet/hash/test_collate.rb +35 -0
- data/test/lib/facet/hash/test_each.rb +36 -0
- data/test/lib/facet/hash/test_each_with_index.rb +29 -0
- data/test/lib/facet/hash/test_each_with_key.rb +29 -0
- data/test/lib/facet/hash/test_graph.rb +28 -0
- data/test/lib/facet/hash/test_has_keys.rb +27 -0
- data/test/lib/facet/hash/test_has_only_keys.rb +27 -0
- data/test/lib/facet/hash/test_inverse.rb +28 -0
- data/test/lib/facet/hash/test_keys_to_s.rb +34 -0
- data/test/lib/facet/hash/test_keys_to_sym.rb +34 -0
- data/test/lib/facet/hash/test_op_fetch.rb +111 -0
- data/test/lib/facet/hash/test_op_lshift.rb +29 -0
- data/test/lib/facet/hash/test_rand_key.rb +27 -0
- data/test/lib/facet/hash/test_rand_pair.rb +27 -0
- data/test/lib/facet/hash/test_rand_value.rb +27 -0
- data/test/lib/facet/hash/test_replace_each.rb +29 -0
- data/test/lib/facet/hash/test_shuffle.rb +32 -0
- data/test/lib/facet/hash/test_slice.rb +27 -0
- data/test/lib/facet/hash/test_swap.rb +27 -0
- data/test/lib/facet/hash/test_swapkey.rb +29 -0
- data/test/lib/facet/hash/test_to_h.rb +27 -0
- data/test/lib/facet/hash/test_to_ostruct.rb +30 -0
- data/test/lib/facet/hash/test_to_ostruct_recurse.rb +30 -0
- data/test/lib/facet/hash/test_traverse.rb +37 -0
- data/test/lib/facet/hash/test_update_each.rb +29 -0
- data/test/lib/facet/hash/test_update_keys.rb +28 -0
- data/test/lib/facet/hash/test_update_values.rb +28 -0
- data/test/lib/facet/hash/test_weave.rb +29 -0
- data/test/lib/facet/integer/test_factorial.rb +30 -0
- data/test/lib/facet/integer/test_multiple.rb +43 -0
- data/test/lib/facet/integer/test_ordinal.rb +29 -0
- data/test/lib/facet/integer/test_times_collect.rb +28 -0
- data/test/lib/facet/kernel/test___class__.rb +26 -0
- data/test/lib/facet/kernel/test_as.rb +42 -0
- data/test/lib/facet/kernel/test_assign_from.rb +31 -0
- data/test/lib/facet/kernel/test_assign_with.rb +31 -0
- data/test/lib/facet/kernel/test_bool.rb +41 -0
- data/test/lib/facet/kernel/test_bug.rb +26 -0
- data/test/lib/facet/kernel/test_call_stack.rb +26 -0
- data/test/lib/facet/kernel/test_called.rb +26 -0
- data/test/lib/facet/kernel/test_constant.rb +33 -0
- data/test/lib/facet/kernel/test_copy.rb +40 -0
- data/test/lib/facet/kernel/test_deep_copy.rb +40 -0
- data/test/lib/facet/kernel/test_demo.rb +28 -0
- data/test/lib/facet/kernel/test_fn.rb +26 -0
- data/test/lib/facet/kernel/test_generate_method_name.rb +26 -0
- data/test/lib/facet/kernel/test_get_by_id.rb +28 -0
- data/test/lib/facet/kernel/test_here.rb +26 -0
- data/test/lib/facet/kernel/test_in.rb +27 -0
- data/test/lib/facet/kernel/test_maybe.rb +26 -0
- data/test/lib/facet/kernel/test_metaclass.rb +34 -0
- data/test/lib/facet/kernel/test_method.rb +32 -0
- data/test/lib/facet/kernel/test_method_name.rb +31 -0
- data/test/lib/facet/kernel/test_methods.rb +50 -0
- data/test/lib/facet/kernel/test_new.rb +30 -0
- data/test/lib/facet/kernel/test_object_class.rb +26 -0
- data/test/lib/facet/kernel/test_object_hexid.rb +27 -0
- data/test/lib/facet/kernel/test_require_all.rb +26 -0
- data/test/lib/facet/kernel/test_require_esc.rb +27 -0
- data/test/lib/facet/kernel/test_require_facet.rb +27 -0
- data/test/lib/facet/kernel/test_resc.rb +27 -0
- data/test/lib/facet/kernel/test_returning.rb +30 -0
- data/test/lib/facet/kernel/test_send_as.rb +26 -0
- data/test/lib/facet/kernel/test_set_from.rb +33 -0
- data/test/lib/facet/kernel/test_set_with.rb +33 -0
- data/test/lib/facet/kernel/test_silently.rb +28 -0
- data/test/lib/facet/kernel/test_singleton.rb +40 -0
- data/test/lib/facet/kernel/test_superior.rb +30 -0
- data/test/lib/facet/kernel/test_supermethod.rb +33 -0
- data/test/lib/facet/kernel/test_this.rb +26 -0
- data/test/lib/facet/kernel/test_to_b.rb +28 -0
- data/test/lib/facet/kernel/test_to_bool.rb +28 -0
- data/test/lib/facet/kernel/test_uri.rb +30 -0
- data/test/lib/facet/kernel/test_val.rb +43 -0
- data/test/lib/facet/kernel/test_with_accessor.rb +51 -0
- data/test/lib/facet/matchdata/test_match.rb +29 -0
- data/test/lib/facet/matchdata/test_matchtree.rb +32 -0
- data/test/lib/facet/module/test_abstract.rb +36 -0
- data/test/lib/facet/module/test_alias_module_function.rb +34 -0
- data/test/lib/facet/module/test_ancestor.rb +26 -0
- data/test/lib/facet/module/test_basename.rb +26 -0
- data/test/lib/facet/module/test_by_name.rb +29 -0
- data/test/lib/facet/module/test_cattr_accessor.rb +55 -0
- data/test/lib/facet/module/test_clone_using.rb +55 -0
- data/test/lib/facet/module/test_dirname.rb +26 -0
- data/test/lib/facet/module/test_equate_on.rb +37 -0
- data/test/lib/facet/module/test_generate_instance_method_name.rb +33 -0
- data/test/lib/facet/module/test_include_as.rb +35 -0
- data/test/lib/facet/module/test_initializer.rb +32 -0
- data/test/lib/facet/module/test_instance_methods.rb +59 -0
- data/test/lib/facet/module/test_integrate.rb +35 -0
- data/test/lib/facet/module/test_memoize.rb +50 -0
- data/test/lib/facet/module/test_modspace.rb +27 -0
- data/test/lib/facet/module/test_namespace.rb +33 -0
- data/test/lib/facet/module/test_nesting.rb +36 -0
- data/test/lib/facet/module/test_redef.rb +30 -0
- data/test/lib/facet/module/test_redefine_method.rb +30 -0
- data/test/lib/facet/module/test_redirect.rb +30 -0
- data/test/lib/facet/module/test_redirect_method.rb +30 -0
- data/test/lib/facet/module/test_remove.rb +30 -0
- data/test/lib/facet/module/test_rename.rb +31 -0
- data/test/lib/facet/module/test_rename_method.rb +31 -0
- data/test/lib/facet/module/test_revisal.rb +35 -0
- data/test/lib/facet/module/test_shadow_method.rb +30 -0
- data/test/lib/facet/module/test_sort_on.rb +42 -0
- data/test/lib/facet/module/test_undef.rb +30 -0
- data/test/lib/facet/module/test_wrap.rb +30 -0
- data/test/lib/facet/module/test_wrap_method.rb +30 -0
- data/test/lib/facet/nilclass/test_empty.rb +26 -0
- data/test/lib/facet/nilclass/test_include.rb +26 -0
- data/test/lib/facet/nilclass/test_op_fetch.rb +28 -0
- data/test/lib/facet/nilclass/test_size.rb +30 -0
- data/test/lib/facet/nilclass/test_to_f.rb +26 -0
- data/test/lib/facet/nilclass/test_to_h.rb +26 -0
- data/test/lib/facet/numeric/test_ceil_multiple.rb +31 -0
- data/test/lib/facet/numeric/test_succ.rb +40 -0
- data/test/lib/facet/numeric/test_to_b.rb +27 -0
- data/test/lib/facet/ostruct/test___merge__.rb +38 -0
- data/test/lib/facet/ostruct/test___update__.rb +29 -0
- data/test/lib/facet/ostruct/test_op_fetch.rb +27 -0
- data/test/lib/facet/ostruct/test_op_store.rb +28 -0
- data/test/lib/facet/proc/test_compose.rb +36 -0
- data/test/lib/facet/proc/test_to_method.rb +31 -0
- data/test/lib/facet/range/test_to_r.rb +27 -0
- data/test/lib/facet/range/test_to_range.rb +27 -0
- data/test/lib/facet/range/test_umbrella.rb +34 -0
- data/test/lib/facet/range/test_within.rb +29 -0
- data/test/lib/facet/regexp/test_arity.rb +33 -0
- data/test/lib/facet/regexp/test_to_re.rb +27 -0
- data/test/lib/facet/regexp/test_to_regexp.rb +27 -0
- data/test/lib/facet/string/self/test_interpolate.rb +27 -0
- data/test/lib/facet/string/self/test_patterns.rb +28 -0
- data/test/lib/facet/string/self/test_rand_letter.rb +26 -0
- data/test/lib/facet/string/test_align_center.rb +34 -0
- data/test/lib/facet/string/test_at_rand.rb +35 -0
- data/test/lib/facet/string/test_basename.rb +41 -0
- data/test/lib/facet/string/test_blank.rb +27 -0
- data/test/lib/facet/string/test_bracket.rb +49 -0
- data/test/lib/facet/string/test_camelcase.rb +39 -0
- data/test/lib/facet/string/test_camelize.rb +26 -0
- data/test/lib/facet/string/test_capitalized.rb +26 -0
- data/test/lib/facet/string/test_chars.rb +27 -0
- data/test/lib/facet/string/test_cmp.rb +30 -0
- data/test/lib/facet/string/test_demodulize.rb +38 -0
- data/test/lib/facet/string/test_downcase.rb +26 -0
- data/test/lib/facet/string/test_dresner.rb +32 -0
- data/test/lib/facet/string/test_each_char.rb +29 -0
- data/test/lib/facet/string/test_each_word.rb +29 -0
- data/test/lib/facet/string/test_first.rb +43 -0
- data/test/lib/facet/string/test_fold.rb +34 -0
- data/test/lib/facet/string/test_frequency.rb +28 -0
- data/test/lib/facet/string/test_humanize.rb +26 -0
- data/test/lib/facet/string/test_indent.rb +40 -0
- data/test/lib/facet/string/test_index_all.rb +26 -0
- data/test/lib/facet/string/test_last.rb +46 -0
- data/test/lib/facet/string/test_line_wrap.rb +27 -0
- data/test/lib/facet/string/test_lines.rb +26 -0
- data/test/lib/facet/string/test_lowercase.rb +26 -0
- data/test/lib/facet/string/test_margin.rb +117 -0
- data/test/lib/facet/string/test_mscan.rb +30 -0
- data/test/lib/facet/string/test_natcmp.rb +30 -0
- data/test/lib/facet/string/test_nchar.rb +29 -0
- data/test/lib/facet/string/test_pop.rb +47 -0
- data/test/lib/facet/string/test_probability.rb +28 -0
- data/test/lib/facet/string/test_push.rb +40 -0
- data/test/lib/facet/string/test_quote.rb +49 -0
- data/test/lib/facet/string/test_rand_byte.rb +35 -0
- data/test/lib/facet/string/test_rand_index.rb +26 -0
- data/test/lib/facet/string/test_range.rb +27 -0
- data/test/lib/facet/string/test_range_all.rb +27 -0
- data/test/lib/facet/string/test_range_of_line.rb +28 -0
- data/test/lib/facet/string/test_regesc.rb +28 -0
- data/test/lib/facet/string/test_shatter.rb +29 -0
- data/test/lib/facet/string/test_shift.rb +40 -0
- data/test/lib/facet/string/test_shuffle.rb +27 -0
- data/test/lib/facet/string/test_similarity.rb +26 -0
- data/test/lib/facet/string/test_singular.rb +32 -0
- data/test/lib/facet/string/test_slap.rb +40 -0
- data/test/lib/facet/string/test_soundex.rb +41 -0
- data/test/lib/facet/string/test_succ.rb +29 -0
- data/test/lib/facet/string/test_to_a.rb +27 -0
- data/test/lib/facet/string/test_to_arr.rb +26 -0
- data/test/lib/facet/string/test_to_b.rb +41 -0
- data/test/lib/facet/string/test_to_const.rb +28 -0
- data/test/lib/facet/string/test_to_date.rb +30 -0
- data/test/lib/facet/string/test_to_proc.rb +33 -0
- data/test/lib/facet/string/test_to_re.rb +28 -0
- data/test/lib/facet/string/test_to_time.rb +30 -0
- data/test/lib/facet/string/test_unix_crypt.rb +30 -0
- data/test/lib/facet/string/test_unpack.rb +34 -0
- data/test/lib/facet/string/test_unshift.rb +39 -0
- data/test/lib/facet/string/test_upcase.rb +30 -0
- data/test/lib/facet/string/test_whitespace.rb +27 -0
- data/test/lib/facet/string/test_word_filter.rb +34 -0
- data/test/lib/facet/string/test_word_wrap.rb +51 -0
- data/test/lib/facet/string/test_words.rb +37 -0
- data/test/lib/facet/symbol/test_camelcase.rb +26 -0
- data/test/lib/facet/symbol/test_camelize.rb +27 -0
- data/test/lib/facet/symbol/test_capitalize.rb +26 -0
- data/test/lib/facet/symbol/test_capitalized.rb +27 -0
- data/test/lib/facet/symbol/test_downcase.rb +27 -0
- data/test/lib/facet/symbol/test_not.rb +29 -0
- data/test/lib/facet/symbol/test_pad.rb +27 -0
- data/test/lib/facet/symbol/test_succ.rb +28 -0
- data/test/lib/facet/symbol/test_to_const.rb +28 -0
- data/test/lib/facet/symbol/test_to_proc.rb +27 -0
- data/test/lib/facet/symbol/test_to_str.rb +28 -0
- data/test/lib/facet/symbol/test_underscore.rb +26 -0
- data/test/lib/facet/symbol/test_upcase.rb +27 -0
- data/test/lib/facet/time/test_change.rb +33 -0
- data/test/lib/facet/time/test_elapse.rb +27 -0
- data/test/lib/facet/time/test_stamp.rb +31 -0
- data/test/lib/facet/time/test_to_date.rb +31 -0
- data/test/lib/facet/time/test_to_s.rb +31 -0
- data/test/lib/facet/time/test_to_time.rb +31 -0
- data/test/lib/facets/english/test_bytes.rb +84 -0
- data/test/lib/facets/english/test_multipliers.rb +114 -0
- data/test/lib/facets/english/test_time.rb +73 -0
- metadata +895 -1625
- data/ANN +0 -59
- data/LICENSE/COPYING-GPL +0 -341
- data/LICENSE/LICENSE-ART +0 -50
- data/LICENSE/LICENSE-LGPL +0 -175
- data/LICENSE/LICENSE-MIT +0 -8
- data/LICENSE/LICENSE-RUBY +0 -60
- data/bench/b_calls.rb +0 -74
- data/bench/b_harray.rb +0 -49
- data/bench/b_pathname.rb +0 -24
- data/bench/b_range.rb +0 -64
- data/bench/return-bench.rb +0 -56
- data/bin/uri +0 -6
- data/conf/facets/extra +0 -7
- data/data/facets/units/binary/base.yaml +0 -12
- data/data/facets/units/binary/extra.yaml +0 -8
- data/data/facets/units/cex.yaml +0 -7
- data/data/facets/units/currency/base.yaml +0 -268
- data/data/facets/units/default.yaml +0 -22
- data/data/facets/units/dump_yaml.rb +0 -309
- data/data/facets/units/si/base.yaml +0 -36
- data/data/facets/units/si/derived.yaml +0 -133
- data/data/facets/units/si/extra.yaml +0 -107
- data/data/facets/units/standard.yaml +0 -5
- data/data/facets/units/uk.yaml +0 -16
- data/data/facets/units/uk/base.yaml +0 -107
- data/data/facets/units/us.yaml +0 -16
- data/data/facets/units/us/base.yaml +0 -112
- data/data/facets/units/xmethods/cached.yaml +0 -83
- data/data/facets/units/xmethods/mapping.yaml +0 -85
- data/demo/ann-demo.rb +0 -22
- data/lib/facet/all.rb +0 -1
- data/lib/facet/annotation.rb +0 -1
- data/lib/facet/ansicolor.rb +0 -1
- data/lib/facet/association.rb +0 -1
- data/lib/facet/base.rb +0 -1
- data/lib/facet/basicobject.rb +0 -1
- data/lib/facet/bbcode.rb +0 -1
- data/lib/facet/binary_multiplier.rb +0 -1
- data/lib/facet/binaryreader.rb +0 -1
- data/lib/facet/blankslate.rb +0 -1
- data/lib/facet/byteorder.rb +0 -1
- data/lib/facet/class_inherit.rb +0 -1
- data/lib/facet/classmethods.rb +0 -1
- data/lib/facet/cloneable.rb +0 -1
- data/lib/facet/constants.rb +0 -1
- data/lib/facet/coroutine.rb +0 -1
- data/lib/facet/crosscase.rb +0 -1
- data/lib/facet/crypt.rb +0 -1
- data/lib/facet/dictionary.rb +0 -1
- data/lib/facet/downloader.rb +0 -1
- data/lib/facet/dynamod.rb +0 -1
- data/lib/facet/enumerable_args.rb +0 -1
- data/lib/facet/enumtype.rb +0 -1
- data/lib/facet/expirable.rb +0 -1
- data/lib/facet/filelist.rb +0 -1
- data/lib/facet/fixnum_const.rb +0 -1
- data/lib/facet/floatstring.rb +0 -1
- data/lib/facet/functor.rb +0 -1
- data/lib/facet/harray.rb +0 -1
- data/lib/facet/heap.rb +0 -1
- data/lib/facet/infinity.rb +0 -1
- data/lib/facet/inflect.rb +0 -1
- data/lib/facet/inheritor.rb +0 -1
- data/lib/facet/interval.rb +0 -1
- data/lib/facet/ioreactor.rb +0 -1
- data/lib/facet/ioredirect.rb +0 -1
- data/lib/facet/lisp.rb +0 -1
- data/lib/facet/lru_cache.rb +0 -1
- data/lib/facet/methodprobe.rb +0 -1
- data/lib/facet/mock.rb +0 -1
- data/lib/facet/multiplier.rb +0 -1
- data/lib/facet/multiton.rb +0 -1
- data/lib/facet/nack.rb +0 -1
- data/lib/facet/nil_as_emptiness.rb +0 -1
- data/lib/facet/nilcomparable.rb +0 -1
- data/lib/facet/notcopyable.rb +0 -1
- data/lib/facet/null.rb +0 -1
- data/lib/facet/ohash.rb +0 -1
- data/lib/facet/one.rb +0 -1
- data/lib/facet/openobject.rb +0 -1
- data/lib/facet/orm_support.rb +0 -1
- data/lib/facet/ostructable.rb +0 -1
- data/lib/facet/package.rb +0 -1
- data/lib/facet/pool.rb +0 -1
- data/lib/facet/preinitialize.rb +0 -1
- data/lib/facet/progressbar.rb +0 -1
- data/lib/facet/promoteself.rb +0 -1
- data/lib/facet/proxy.rb +0 -1
- data/lib/facet/quicktest.rb +0 -1
- data/lib/facet/random.rb +0 -1
- data/lib/facet/reference.rb +0 -1
- data/lib/facet/semaphore.rb +0 -1
- data/lib/facet/shellcommand.rb +0 -1
- data/lib/facet/snapshot.rb +0 -1
- data/lib/facet/stateparser.rb +0 -1
- data/lib/facet/statichash.rb +0 -1
- data/lib/facet/string_as_array.rb +0 -1
- data/lib/facet/superstruct.rb +0 -1
- data/lib/facet/syncarray.rb +0 -1
- data/lib/facet/synchash.rb +0 -1
- data/lib/facet/tagiter.rb +0 -1
- data/lib/facet/template.rb +0 -1
- data/lib/facet/test.rb +0 -1
- data/lib/facet/time_in_english.rb +0 -1
- data/lib/facet/timer.rb +0 -1
- data/lib/facet/tracepoint.rb +0 -1
- data/lib/facet/tuple.rb +0 -1
- data/lib/facet/uninheritable.rb +0 -1
- data/lib/facet/units.rb +0 -1
- data/lib/facet/version.rb +0 -1
- data/lib/facet/yamlstruct.rb +0 -1
- data/lib/mega/annotation.rb +0 -568
- data/lib/mega/ansicolor.rb +0 -193
- data/lib/mega/association.rb +0 -174
- data/lib/mega/basicobject.rb +0 -108
- data/lib/mega/bbcode.rb +0 -410
- data/lib/mega/binary_multiplier.rb +0 -250
- data/lib/mega/binaryreader.rb +0 -210
- data/lib/mega/blankslate.rb +0 -3
- data/lib/mega/byteorder.rb +0 -119
- data/lib/mega/class_inherit.rb +0 -208
- data/lib/mega/classmethods.rb +0 -111
- data/lib/mega/cloneable.rb +0 -52
- data/lib/mega/constants.rb +0 -308
- data/lib/mega/coroutine.rb +0 -173
- data/lib/mega/crosscase.rb +0 -347
- data/lib/mega/crypt.rb +0 -167
- data/lib/mega/dictionary.rb +0 -340
- data/lib/mega/downloader.rb +0 -240
- data/lib/mega/dynamod.rb +0 -249
- data/lib/mega/enumerable_args.rb +0 -218
- data/lib/mega/enumtype.rb +0 -105
- data/lib/mega/expirable.rb +0 -88
- data/lib/mega/filelist.rb +0 -478
- data/lib/mega/fixnum_const.rb +0 -62
- data/lib/mega/floatstring.rb +0 -179
- data/lib/mega/functor.rb +0 -98
- data/lib/mega/harray.rb +0 -817
- data/lib/mega/heap.rb +0 -226
- data/lib/mega/infinity.rb +0 -123
- data/lib/mega/inheritor.rb +0 -236
- data/lib/mega/interval.rb +0 -426
- data/lib/mega/ioreactor.rb +0 -671
- data/lib/mega/ioredirect.rb +0 -130
- data/lib/mega/lisp.rb +0 -387
- data/lib/mega/lru_cache.rb +0 -184
- data/lib/mega/mock.rb +0 -224
- data/lib/mega/multiplier.rb +0 -180
- data/lib/mega/multiton.rb +0 -360
- data/lib/mega/nack.rb +0 -162
- data/lib/mega/nilcomparable.rb +0 -128
- data/lib/mega/notcopyable.rb +0 -146
- data/lib/mega/null.rb +0 -40
- data/lib/mega/ohash.rb +0 -3
- data/lib/mega/one.rb +0 -72
- data/lib/mega/openobject.rb +0 -220
- data/lib/mega/orm_support.rb +0 -233
- data/lib/mega/ostructable.rb +0 -212
- data/lib/mega/package.rb +0 -58
- data/lib/mega/pool.rb +0 -98
- data/lib/mega/preinitialize.rb +0 -152
- data/lib/mega/progressbar.rb +0 -214
- data/lib/mega/promoteself.rb +0 -104
- data/lib/mega/proxy.rb +0 -13
- data/lib/mega/reference.rb +0 -83
- data/lib/mega/semaphore.rb +0 -106
- data/lib/mega/shellcommand.rb +0 -55
- data/lib/mega/snapshot.rb +0 -190
- data/lib/mega/stateparser.rb +0 -576
- data/lib/mega/statichash.rb +0 -86
- data/lib/mega/superstruct.rb +0 -744
- data/lib/mega/syncarray.rb +0 -118
- data/lib/mega/synchash.rb +0 -173
- data/lib/mega/tagiter.rb +0 -389
- data/lib/mega/template.rb +0 -211
- data/lib/mega/time_in_english.rb +0 -347
- data/lib/mega/timer.rb +0 -293
- data/lib/mega/tracepoint.rb +0 -184
- data/lib/mega/tuple.rb +0 -97
- data/lib/mega/uninheritable.rb +0 -92
- data/lib/mega/units.rb +0 -926
- data/lib/mega/version.rb +0 -245
- data/lib/mega/yamlstruct.rb +0 -16
- data/lib/nano/all.rb +0 -18
- data/lib/nano/array.rb +0 -33
- data/lib/nano/array/at_rand.rb +0 -52
- data/lib/nano/array/body.rb +0 -35
- data/lib/nano/array/delete_unless.rb +0 -35
- data/lib/nano/array/delete_values.rb +0 -38
- data/lib/nano/array/delete_values_at.rb +0 -57
- data/lib/nano/array/each_with_key.rb +0 -9
- data/lib/nano/array/first.rb +0 -53
- data/lib/nano/array/foot.rb +0 -36
- data/lib/nano/array/head.rb +0 -36
- data/lib/nano/array/last.rb +0 -53
- data/lib/nano/array/last_index.rb +0 -35
- data/lib/nano/array/merge.rb +0 -40
- data/lib/nano/array/mid.rb +0 -50
- data/lib/nano/array/middle.rb +0 -45
- data/lib/nano/array/op_fetch.rb +0 -40
- data/lib/nano/array/op_store.rb +0 -47
- data/lib/nano/array/pick.rb +0 -68
- data/lib/nano/array/pos.rb +0 -39
- data/lib/nano/array/pull.rb +0 -37
- data/lib/nano/array/rand_index.rb +0 -30
- data/lib/nano/array/rand_subset.rb +0 -56
- data/lib/nano/array/range.rb +0 -47
- data/lib/nano/array/rotate.rb +0 -67
- data/lib/nano/array/select.rb +0 -37
- data/lib/nano/array/shuffle.rb +0 -66
- data/lib/nano/array/slap.rb +0 -37
- data/lib/nano/array/store.rb +0 -7
- data/lib/nano/array/tail.rb +0 -34
- data/lib/nano/array/thru.rb +0 -38
- data/lib/nano/array/to_b.rb +0 -31
- data/lib/nano/array/to_h.rb +0 -57
- data/lib/nano/array/to_hash.rb +0 -46
- data/lib/nano/array/unzip.rb +0 -20
- data/lib/nano/base.rb +0 -73
- data/lib/nano/binding.rb +0 -14
- data/lib/nano/binding/__DIR__.rb +0 -2
- data/lib/nano/binding/__FILE__.rb +0 -2
- data/lib/nano/binding/__LINE__.rb +0 -58
- data/lib/nano/binding/call_stack.rb +0 -41
- data/lib/nano/binding/called.rb +0 -41
- data/lib/nano/binding/caller.rb +0 -41
- data/lib/nano/binding/defined.rb +0 -40
- data/lib/nano/binding/eval.rb +0 -41
- data/lib/nano/binding/local_variables.rb +0 -44
- data/lib/nano/binding/method_name.rb +0 -47
- data/lib/nano/binding/op_fetch.rb +0 -45
- data/lib/nano/binding/op_store.rb +0 -46
- data/lib/nano/binding/self.rb +0 -41
- data/lib/nano/binding/self/of_caller.rb +0 -122
- data/lib/nano/class.rb +0 -5
- data/lib/nano/class/by_name.rb +0 -1
- data/lib/nano/class/descendents.rb +0 -44
- data/lib/nano/class/remove_descendents.rb +0 -46
- data/lib/nano/class/remove_subclasses.rb +0 -2
- data/lib/nano/class/subclasses.rb +0 -2
- data/lib/nano/comparable.rb +0 -5
- data/lib/nano/comparable/at_least.rb +0 -53
- data/lib/nano/comparable/at_most.rb +0 -2
- data/lib/nano/comparable/cap.rb +0 -2
- data/lib/nano/comparable/clip.rb +0 -72
- data/lib/nano/comparable/cmp.rb +0 -38
- data/lib/nano/continuation.rb +0 -1
- data/lib/nano/continuation/self/create.rb +0 -71
- data/lib/nano/date.rb +0 -0
- data/lib/nano/date/days_in_month.rb +0 -42
- data/lib/nano/date/days_of_month.rb +0 -34
- data/lib/nano/date/stamp.rb +0 -52
- data/lib/nano/date/to_date.rb +0 -36
- data/lib/nano/date/to_s.rb +0 -33
- data/lib/nano/date/to_time.rb +0 -36
- data/lib/nano/dir.rb +0 -4
- data/lib/nano/dir/self/ancestor.rb +0 -33
- data/lib/nano/dir/self/ascend.rb +0 -56
- data/lib/nano/dir/self/ls_r.rb +0 -76
- data/lib/nano/dir/self/recurse.rb +0 -2
- data/lib/nano/enumerable.rb +0 -38
- data/lib/nano/enumerable/collect_with_counter.rb +0 -2
- data/lib/nano/enumerable/collect_with_index.rb +0 -51
- data/lib/nano/enumerable/commonality.rb +0 -63
- data/lib/nano/enumerable/compact_collect.rb +0 -50
- data/lib/nano/enumerable/compact_map.rb +0 -2
- data/lib/nano/enumerable/cross.rb +0 -44
- data/lib/nano/enumerable/each_by.rb +0 -2
- data/lib/nano/enumerable/each_combination.rb +0 -59
- data/lib/nano/enumerable/each_pair.rb +0 -50
- data/lib/nano/enumerable/each_permutation.rb +0 -42
- data/lib/nano/enumerable/each_slice.rb +0 -131
- data/lib/nano/enumerable/each_unique_pair.rb +0 -66
- data/lib/nano/enumerable/each_with_counter.rb +0 -8
- data/lib/nano/enumerable/elementwise.rb +0 -2
- data/lib/nano/enumerable/entropy.rb +0 -52
- data/lib/nano/enumerable/every.rb +0 -61
- data/lib/nano/enumerable/ew.rb +0 -59
- data/lib/nano/enumerable/filter_collect.rb +0 -58
- data/lib/nano/enumerable/filter_map.rb +0 -2
- data/lib/nano/enumerable/find_collisions.rb +0 -41
- data/lib/nano/enumerable/frequency.rb +0 -39
- data/lib/nano/enumerable/graph.rb +0 -59
- data/lib/nano/enumerable/ideal_entropy.rb +0 -49
- data/lib/nano/enumerable/map_with_counter.rb +0 -2
- data/lib/nano/enumerable/map_with_index.rb +0 -2
- data/lib/nano/enumerable/none.rb +0 -56
- data/lib/nano/enumerable/nonuniq.rb +0 -39
- data/lib/nano/enumerable/occur.rb +0 -62
- data/lib/nano/enumerable/one.rb +0 -65
- data/lib/nano/enumerable/op_pow.rb +0 -38
- data/lib/nano/enumerable/partition_by.rb +0 -55
- data/lib/nano/enumerable/probability.rb +0 -59
- data/lib/nano/enumerable/project.rb +0 -11
- data/lib/nano/enumerable/self/combinations.rb +0 -68
- data/lib/nano/enumerable/self/cross.rb +0 -79
- data/lib/nano/enumerable/to_h.rb +0 -50
- data/lib/nano/enumerable/uniq_by.rb +0 -39
- data/lib/nano/enumerable/where.rb +0 -12
- data/lib/nano/file.rb +0 -5
- data/lib/nano/file/self/create.rb +0 -52
- data/lib/nano/file/self/open_as_string.rb +0 -81
- data/lib/nano/file/self/read_list.rb +0 -47
- data/lib/nano/file/self/sanitize.rb +0 -50
- data/lib/nano/file/self/split_all.rb +0 -36
- data/lib/nano/fileutils.rb +0 -0
- data/lib/nano/fileutils/head.rb +0 -2
- data/lib/nano/fileutils/safe_ln.rb +0 -38
- data/lib/nano/fileutils/slice.rb +0 -148
- data/lib/nano/fileutils/split_all.rb +0 -29
- data/lib/nano/fileutils/tail.rb +0 -2
- data/lib/nano/fileutils/wc.rb +0 -128
- data/lib/nano/fileutils/whereis.rb +0 -76
- data/lib/nano/fileutils/which.rb +0 -117
- data/lib/nano/float.rb +0 -3
- data/lib/nano/float/approx.rb +0 -42
- data/lib/nano/float/round_at.rb +0 -72
- data/lib/nano/float/round_to.rb +0 -73
- data/lib/nano/hash.rb +0 -40
- data/lib/nano/hash/alias.rb +0 -54
- data/lib/nano/hash/assert_has_keys.rb +0 -38
- data/lib/nano/hash/assert_has_only_keys.rb +0 -38
- data/lib/nano/hash/at.rb +0 -26
- data/lib/nano/hash/collate.rb +0 -53
- data/lib/nano/hash/delete_unless.rb +0 -15
- data/lib/nano/hash/each.rb +0 -61
- data/lib/nano/hash/each_with_index.rb +0 -35
- data/lib/nano/hash/each_with_key.rb +0 -32
- data/lib/nano/hash/graph.rb +0 -31
- data/lib/nano/hash/has_keys.rb +0 -37
- data/lib/nano/hash/has_only_keys.rb +0 -37
- data/lib/nano/hash/inverse.rb +0 -51
- data/lib/nano/hash/join.rb +0 -19
- data/lib/nano/hash/keys_to_iv.rb +0 -60
- data/lib/nano/hash/keys_to_s.rb +0 -80
- data/lib/nano/hash/keys_to_sym.rb +0 -91
- data/lib/nano/hash/op_fetch.rb +0 -146
- data/lib/nano/hash/op_lshift.rb +0 -28
- data/lib/nano/hash/op_store.rb +0 -2
- data/lib/nano/hash/rand_key.rb +0 -47
- data/lib/nano/hash/rand_pair.rb +0 -50
- data/lib/nano/hash/rand_value.rb +0 -60
- data/lib/nano/hash/replace_each.rb +0 -33
- data/lib/nano/hash/self/zipnew.rb +0 -37
- data/lib/nano/hash/shuffle.rb +0 -53
- data/lib/nano/hash/slice.rb +0 -33
- data/lib/nano/hash/stringify_keys.rb +0 -2
- data/lib/nano/hash/swap.rb +0 -36
- data/lib/nano/hash/swapkey.rb +0 -44
- data/lib/nano/hash/symoblize_keys.rb +0 -2
- data/lib/nano/hash/to_h.rb +0 -35
- data/lib/nano/hash/to_ostruct.rb +0 -40
- data/lib/nano/hash/to_ostruct_recurse.rb +0 -45
- data/lib/nano/hash/traverse.rb +0 -63
- data/lib/nano/hash/update_each.rb +0 -43
- data/lib/nano/hash/update_keys.rb +0 -31
- data/lib/nano/hash/update_values.rb +0 -32
- data/lib/nano/hash/variablize_keys.rb +0 -2
- data/lib/nano/hash/weave.rb +0 -88
- data/lib/nano/inflect.rb +0 -36
- data/lib/nano/integer.rb +0 -8
- data/lib/nano/integer/even.rb +0 -2
- data/lib/nano/integer/fact.rb +0 -2
- data/lib/nano/integer/factorial.rb +0 -47
- data/lib/nano/integer/multiple.rb +0 -69
- data/lib/nano/integer/odd.rb +0 -2
- data/lib/nano/integer/ordinal.rb +0 -41
- data/lib/nano/integer/times_collect.rb +0 -37
- data/lib/nano/integer/times_map.rb +0 -28
- data/lib/nano/kernel.rb +0 -65
- data/lib/nano/kernel/__class__.rb +0 -31
- data/lib/nano/kernel/__meta__.rb +0 -57
- data/lib/nano/kernel/as.rb +0 -87
- data/lib/nano/kernel/assign_from.rb +0 -82
- data/lib/nano/kernel/assign_with.rb +0 -75
- data/lib/nano/kernel/autoreload.rb +0 -46
- data/lib/nano/kernel/autoreload_glob.rb +0 -36
- data/lib/nano/kernel/bool.rb +0 -77
- data/lib/nano/kernel/bug.rb +0 -39
- data/lib/nano/kernel/call_stack.rb +0 -59
- data/lib/nano/kernel/called.rb +0 -40
- data/lib/nano/kernel/complete.rb +0 -6
- data/lib/nano/kernel/constant.rb +0 -52
- data/lib/nano/kernel/copy.rb +0 -48
- data/lib/nano/kernel/deep_copy.rb +0 -49
- data/lib/nano/kernel/demo.rb +0 -46
- data/lib/nano/kernel/eigenclass.rb +0 -17
- data/lib/nano/kernel/false.rb +0 -2
- data/lib/nano/kernel/fn.rb +0 -33
- data/lib/nano/kernel/generate_method_name.rb +0 -39
- data/lib/nano/kernel/get_by_id.rb +0 -33
- data/lib/nano/kernel/here.rb +0 -34
- data/lib/nano/kernel/in.rb +0 -35
- data/lib/nano/kernel/instance_assign.rb +0 -25
- data/lib/nano/kernel/instvar.rb +0 -13
- data/lib/nano/kernel/is.rb +0 -5
- data/lib/nano/kernel/maybe.rb +0 -41
- data/lib/nano/kernel/me.rb +0 -17
- data/lib/nano/kernel/meta.rb +0 -2
- data/lib/nano/kernel/metaclass.rb +0 -42
- data/lib/nano/kernel/method.rb +0 -76
- data/lib/nano/kernel/method_name.rb +0 -49
- data/lib/nano/kernel/methods.rb +0 -79
- data/lib/nano/kernel/nack.rb +0 -12
- data/lib/nano/kernel/new.rb +0 -40
- data/lib/nano/kernel/object_class.rb +0 -31
- data/lib/nano/kernel/object_hexid.rb +0 -35
- data/lib/nano/kernel/op_esc.rb +0 -37
- data/lib/nano/kernel/own.rb +0 -17
- data/lib/nano/kernel/p.rb +0 -12
- data/lib/nano/kernel/require_all.rb +0 -44
- data/lib/nano/kernel/require_esc.rb +0 -42
- data/lib/nano/kernel/require_facet.rb +0 -41
- data/lib/nano/kernel/require_local.rb +0 -25
- data/lib/nano/kernel/resc.rb +0 -32
- data/lib/nano/kernel/returning.rb +0 -49
- data/lib/nano/kernel/send_as.rb +0 -34
- data/lib/nano/kernel/set_from.rb +0 -69
- data/lib/nano/kernel/set_with.rb +0 -74
- data/lib/nano/kernel/silence_warnings.rb +0 -2
- data/lib/nano/kernel/silently.rb +0 -41
- data/lib/nano/kernel/singleton.rb +0 -47
- data/lib/nano/kernel/superior.rb +0 -53
- data/lib/nano/kernel/supermethod.rb +0 -44
- data/lib/nano/kernel/this.rb +0 -33
- data/lib/nano/kernel/to_b.rb +0 -41
- data/lib/nano/kernel/to_bool.rb +0 -47
- data/lib/nano/kernel/true.rb +0 -2
- data/lib/nano/kernel/unuri.rb +0 -2
- data/lib/nano/kernel/uri.rb +0 -38
- data/lib/nano/kernel/val.rb +0 -52
- data/lib/nano/kernel/warn_with_line.rb +0 -30
- data/lib/nano/kernel/with_accessor.rb +0 -94
- data/lib/nano/kernel/with_reader.rb +0 -2
- data/lib/nano/kernel/with_writer.rb +0 -2
- data/lib/nano/logger.rb +0 -0
- data/lib/nano/logger/format.rb +0 -28
- data/lib/nano/logger/format_message.rb +0 -1
- data/lib/nano/matchdata.rb +0 -3
- data/lib/nano/matchdata/match.rb +0 -37
- data/lib/nano/matchdata/matchset.rb +0 -2
- data/lib/nano/matchdata/matchtree.rb +0 -62
- data/lib/nano/module.rb +0 -40
- data/lib/nano/module/abstract.rb +0 -50
- data/lib/nano/module/alias_module_function.rb +0 -57
- data/lib/nano/module/ancestor.rb +0 -38
- data/lib/nano/module/attr.rb +0 -23
- data/lib/nano/module/attr_setter.rb +0 -48
- data/lib/nano/module/attr_tester.rb +0 -56
- data/lib/nano/module/basename.rb +0 -39
- data/lib/nano/module/by_name.rb +0 -68
- data/lib/nano/module/cattr_accessor.rb +0 -141
- data/lib/nano/module/cattr_reader.rb +0 -2
- data/lib/nano/module/cattr_writer.rb +0 -2
- data/lib/nano/module/clone_removing.rb +0 -2
- data/lib/nano/module/clone_renaming.rb +0 -2
- data/lib/nano/module/clone_using.rb +0 -87
- data/lib/nano/module/dirname.rb +0 -42
- data/lib/nano/module/equate_on.rb +0 -70
- data/lib/nano/module/generate_instance_method_name.rb +0 -47
- data/lib/nano/module/include_as.rb +0 -102
- data/lib/nano/module/initializer.rb +0 -65
- data/lib/nano/module/instance_methods.rb +0 -186
- data/lib/nano/module/integrate.rb +0 -48
- data/lib/nano/module/is.rb +0 -34
- data/lib/nano/module/memoize.rb +0 -95
- data/lib/nano/module/modspace.rb +0 -43
- data/lib/nano/module/namespace.rb +0 -61
- data/lib/nano/module/nesting.rb +0 -45
- data/lib/nano/module/redef.rb +0 -31
- data/lib/nano/module/redefine_method.rb +0 -57
- data/lib/nano/module/redirect.rb +0 -30
- data/lib/nano/module/redirect_method.rb +0 -64
- data/lib/nano/module/remove.rb +0 -29
- data/lib/nano/module/rename.rb +0 -31
- data/lib/nano/module/rename_method.rb +0 -38
- data/lib/nano/module/revisal.rb +0 -49
- data/lib/nano/module/shadow_all.rb +0 -17
- data/lib/nano/module/shadow_method.rb +0 -42
- data/lib/nano/module/sort_on.rb +0 -73
- data/lib/nano/module/undef.rb +0 -29
- data/lib/nano/module/wrap.rb +0 -30
- data/lib/nano/module/wrap_method.rb +0 -48
- data/lib/nano/nil_as_emptiness.rb +0 -34
- data/lib/nano/nilclass.rb +0 -7
- data/lib/nano/nilclass/empty.rb +0 -32
- data/lib/nano/nilclass/include.rb +0 -32
- data/lib/nano/nilclass/length.rb +0 -2
- data/lib/nano/nilclass/op_fetch.rb +0 -37
- data/lib/nano/nilclass/size.rb +0 -44
- data/lib/nano/nilclass/to_f.rb +0 -32
- data/lib/nano/nilclass/to_h.rb +0 -33
- data/lib/nano/numeric.rb +0 -5
- data/lib/nano/numeric/ceil_multiple.rb +0 -40
- data/lib/nano/numeric/pred.rb +0 -2
- data/lib/nano/numeric/succ.rb +0 -69
- data/lib/nano/numeric/to_b.rb +0 -38
- data/lib/nano/ostruct.rb +0 -0
- data/lib/nano/ostruct/__merge__.rb +0 -52
- data/lib/nano/ostruct/__table__.rb +0 -17
- data/lib/nano/ostruct/__update__.rb +0 -45
- data/lib/nano/ostruct/op_fetch.rb +0 -40
- data/lib/nano/ostruct/op_store.rb +0 -42
- data/lib/nano/ostruct/to_h.rb +0 -8
- data/lib/nano/pathname.rb +0 -2
- data/lib/nano/pathname/ascend.rb +0 -22
- data/lib/nano/pathname/descend.rb +0 -20
- data/lib/nano/proc.rb +0 -3
- data/lib/nano/proc/compose.rb +0 -62
- data/lib/nano/proc/op_mul.rb +0 -2
- data/lib/nano/proc/to_method.rb +0 -74
- data/lib/nano/random.rb +0 -21
- data/lib/nano/range.rb +0 -4
- data/lib/nano/range/to_r.rb +0 -32
- data/lib/nano/range/to_range.rb +0 -36
- data/lib/nano/range/umbrella.rb +0 -67
- data/lib/nano/range/within.rb +0 -44
- data/lib/nano/regexp.rb +0 -3
- data/lib/nano/regexp/arity.rb +0 -41
- data/lib/nano/regexp/to_re.rb +0 -38
- data/lib/nano/regexp/to_regexp.rb +0 -36
- data/lib/nano/string.rb +0 -86
- data/lib/nano/string/align_center.rb +0 -87
- data/lib/nano/string/align_left.rb +0 -2
- data/lib/nano/string/align_right.rb +0 -2
- data/lib/nano/string/at.rb +0 -8
- data/lib/nano/string/at_rand.rb +0 -65
- data/lib/nano/string/basename.rb +0 -48
- data/lib/nano/string/blank.rb +0 -36
- data/lib/nano/string/bracket.rb +0 -70
- data/lib/nano/string/brief.rb +0 -33
- data/lib/nano/string/bytes.rb +0 -19
- data/lib/nano/string/camelcase.rb +0 -58
- data/lib/nano/string/camelize.rb +0 -35
- data/lib/nano/string/capitalized.rb +0 -38
- data/lib/nano/string/chars.rb +0 -34
- data/lib/nano/string/cmp.rb +0 -43
- data/lib/nano/string/demodulize.rb +0 -40
- data/lib/nano/string/dequote.rb +0 -29
- data/lib/nano/string/downcase.rb +0 -37
- data/lib/nano/string/dresner.rb +0 -49
- data/lib/nano/string/each_char.rb +0 -35
- data/lib/nano/string/each_word.rb +0 -50
- data/lib/nano/string/ends_with.rb +0 -2
- data/lib/nano/string/first.rb +0 -94
- data/lib/nano/string/first_char.rb +0 -20
- data/lib/nano/string/fold.rb +0 -67
- data/lib/nano/string/format.rb +0 -17
- data/lib/nano/string/frequency.rb +0 -39
- data/lib/nano/string/humanize.rb +0 -31
- data/lib/nano/string/indent.rb +0 -68
- data/lib/nano/string/index_all.rb +0 -40
- data/lib/nano/string/last.rb +0 -94
- data/lib/nano/string/last_char.rb +0 -22
- data/lib/nano/string/line_wrap.rb +0 -77
- data/lib/nano/string/lines.rb +0 -33
- data/lib/nano/string/lowercase.rb +0 -32
- data/lib/nano/string/margin.rb +0 -138
- data/lib/nano/string/mscan.rb +0 -42
- data/lib/nano/string/natcmp.rb +0 -108
- data/lib/nano/string/nchar.rb +0 -45
- data/lib/nano/string/ordinal.rb +0 -16
- data/lib/nano/string/plural.rb +0 -2
- data/lib/nano/string/pop.rb +0 -54
- data/lib/nano/string/probability.rb +0 -34
- data/lib/nano/string/pull.rb +0 -17
- data/lib/nano/string/push.rb +0 -44
- data/lib/nano/string/quote.rb +0 -68
- data/lib/nano/string/rand_byte.rb +0 -55
- data/lib/nano/string/rand_index.rb +0 -29
- data/lib/nano/string/range.rb +0 -37
- data/lib/nano/string/range_all.rb +0 -48
- data/lib/nano/string/range_of_line.rb +0 -42
- data/lib/nano/string/self/format.rb +0 -17
- data/lib/nano/string/self/interpolate.rb +0 -31
- data/lib/nano/string/self/patterns.rb +0 -51
- data/lib/nano/string/self/rand_letter.rb +0 -34
- data/lib/nano/string/self/random.rb +0 -36
- data/lib/nano/string/shatter.rb +0 -45
- data/lib/nano/string/shift.rb +0 -42
- data/lib/nano/string/shuffle.rb +0 -42
- data/lib/nano/string/similarity.rb +0 -105
- data/lib/nano/string/singular.rb +0 -117
- data/lib/nano/string/slap.rb +0 -44
- data/lib/nano/string/soundex.rb +0 -102
- data/lib/nano/string/starts_with.rb +0 -24
- data/lib/nano/string/succ.rb +0 -38
- data/lib/nano/string/tab.rb +0 -2
- data/lib/nano/string/tabto.rb +0 -2
- data/lib/nano/string/to_a.rb +0 -35
- data/lib/nano/string/to_arr.rb +0 -55
- data/lib/nano/string/to_b.rb +0 -64
- data/lib/nano/string/to_const.rb +0 -39
- data/lib/nano/string/to_date.rb +0 -35
- data/lib/nano/string/to_proc.rb +0 -54
- data/lib/nano/string/to_re.rb +0 -37
- data/lib/nano/string/to_time.rb +0 -34
- data/lib/nano/string/unbracket.rb +0 -46
- data/lib/nano/string/underscore.rb +0 -18
- data/lib/nano/string/unix_crypt.rb +0 -41
- data/lib/nano/string/unpack.rb +0 -45
- data/lib/nano/string/unshift.rb +0 -42
- data/lib/nano/string/upcase.rb +0 -45
- data/lib/nano/string/uppercase.rb +0 -2
- data/lib/nano/string/whitespace.rb +0 -27
- data/lib/nano/string/word_filter.rb +0 -61
- data/lib/nano/string/word_wrap.rb +0 -90
- data/lib/nano/string/words.rb +0 -35
- data/lib/nano/string_as_array.rb +0 -16
- data/lib/nano/symbol.rb +0 -13
- data/lib/nano/symbol/camelcase.rb +0 -42
- data/lib/nano/symbol/camelize.rb +0 -33
- data/lib/nano/symbol/capitalize.rb +0 -31
- data/lib/nano/symbol/capitalized.rb +0 -33
- data/lib/nano/symbol/downcase.rb +0 -36
- data/lib/nano/symbol/not.rb +0 -40
- data/lib/nano/symbol/pad.rb +0 -43
- data/lib/nano/symbol/succ.rb +0 -42
- data/lib/nano/symbol/to_const.rb +0 -40
- data/lib/nano/symbol/to_proc.rb +0 -45
- data/lib/nano/symbol/to_str.rb +0 -39
- data/lib/nano/symbol/underscore.rb +0 -32
- data/lib/nano/symbol/upcase.rb +0 -37
- data/lib/nano/time.rb +0 -7
- data/lib/nano/time/change.rb +0 -51
- data/lib/nano/time/elapse.rb +0 -41
- data/lib/nano/time/self/days_extrema.rb +0 -22
- data/lib/nano/time/stamp.rb +0 -47
- data/lib/nano/time/to_date.rb +0 -37
- data/lib/nano/time/to_s.rb +0 -33
- data/lib/nano/time/to_time.rb +0 -36
- data/lib/nano/unboundmethod.rb +0 -1
- data/lib/nano/unboundmethod/name.rb +0 -8
- data/lib/unit/methodprobe.rb +0 -215
- data/lib/unit/quicktest.rb +0 -36
- data/lib/unit/test.rb +0 -145
- data/test/lib/mega/test_annotation.rb +0 -217
- data/test/lib/mega/test_ansicolor.rb +0 -36
- data/test/lib/mega/test_bbcode.rb +0 -34
- data/test/lib/mega/test_binary_multiplier.rb +0 -84
- data/test/lib/mega/test_byteorder.rb +0 -56
- data/test/lib/mega/test_class_inherit.rb +0 -118
- data/test/lib/mega/test_classmethods.rb +0 -47
- data/test/lib/mega/test_constants.rb +0 -18
- data/test/lib/mega/test_coroutine.rb +0 -60
- data/test/lib/mega/test_crosscase.rb +0 -45
- data/test/lib/mega/test_dictionary.rb +0 -90
- data/test/lib/mega/test_dynamod.rb +0 -62
- data/test/lib/mega/test_enumerable_args.rb +0 -80
- data/test/lib/mega/test_enumtype.rb +0 -25
- data/test/lib/mega/test_expirable.rb +0 -25
- data/test/lib/mega/test_filelist.rb +0 -40
- data/test/lib/mega/test_fixnum_const.rb +0 -25
- data/test/lib/mega/test_floatstring.rb +0 -36
- data/test/lib/mega/test_functor.rb +0 -39
- data/test/lib/mega/test_harray.rb +0 -294
- data/test/lib/mega/test_heap.rb +0 -18
- data/test/lib/mega/test_infinity.rb +0 -36
- data/test/lib/mega/test_inheritor.rb +0 -155
- data/test/lib/mega/test_interval.rb +0 -119
- data/test/lib/mega/test_lisp.rb +0 -47
- data/test/lib/mega/test_lru_cache.rb +0 -25
- data/test/lib/mega/test_mock.rb +0 -36
- data/test/lib/mega/test_multiplier.rb +0 -114
- data/test/lib/mega/test_multiton.rb +0 -200
- data/test/lib/mega/test_nack.rb +0 -45
- data/test/lib/mega/test_nilcomparable.rb +0 -43
- data/test/lib/mega/test_notcopyable.rb +0 -74
- data/test/lib/mega/test_openobject.rb +0 -66
- data/test/lib/mega/test_ostructable.rb +0 -43
- data/test/lib/mega/test_package.rb +0 -39
- data/test/lib/mega/test_promoteself.rb +0 -45
- data/test/lib/mega/test_snapshot.rb +0 -34
- data/test/lib/mega/test_statichash.rb +0 -31
- data/test/lib/mega/test_superstruct.rb +0 -334
- data/test/lib/mega/test_syncarray.rb +0 -28
- data/test/lib/mega/test_synchash.rb +0 -28
- data/test/lib/mega/test_tagiter.rb +0 -93
- data/test/lib/mega/test_time_in_english.rb +0 -73
- data/test/lib/mega/test_timer.rb +0 -66
- data/test/lib/mega/test_tuple.rb +0 -32
- data/test/lib/mega/test_uninheritable.rb +0 -42
- data/test/lib/mega/test_units.rb +0 -104
- data/test/lib/mega/test_version.rb +0 -104
- data/test/lib/nano/array/test_at_rand.rb +0 -34
- data/test/lib/nano/array/test_body.rb +0 -27
- data/test/lib/nano/array/test_delete_unless.rb +0 -28
- data/test/lib/nano/array/test_delete_values.rb +0 -28
- data/test/lib/nano/array/test_delete_values_at.rb +0 -31
- data/test/lib/nano/array/test_first.rb +0 -34
- data/test/lib/nano/array/test_foot.rb +0 -27
- data/test/lib/nano/array/test_head.rb +0 -27
- data/test/lib/nano/array/test_last.rb +0 -34
- data/test/lib/nano/array/test_last_index.rb +0 -26
- data/test/lib/nano/array/test_merge.rb +0 -35
- data/test/lib/nano/array/test_mid.rb +0 -33
- data/test/lib/nano/array/test_middle.rb +0 -29
- data/test/lib/nano/array/test_op_fetch.rb +0 -27
- data/test/lib/nano/array/test_op_store.rb +0 -30
- data/test/lib/nano/array/test_pick.rb +0 -40
- data/test/lib/nano/array/test_pos.rb +0 -28
- data/test/lib/nano/array/test_pull.rb +0 -28
- data/test/lib/nano/array/test_rand_index.rb +0 -29
- data/test/lib/nano/array/test_rand_subset.rb +0 -29
- data/test/lib/nano/array/test_range.rb +0 -32
- data/test/lib/nano/array/test_rotate.rb +0 -36
- data/test/lib/nano/array/test_select.rb +0 -28
- data/test/lib/nano/array/test_shuffle.rb +0 -35
- data/test/lib/nano/array/test_slap.rb +0 -28
- data/test/lib/nano/array/test_tail.rb +0 -27
- data/test/lib/nano/array/test_thru.rb +0 -27
- data/test/lib/nano/array/test_to_b.rb +0 -27
- data/test/lib/nano/array/test_to_h.rb +0 -33
- data/test/lib/nano/array/test_to_hash.rb +0 -27
- data/test/lib/nano/binding/self/test_of_caller.rb +0 -35
- data/test/lib/nano/binding/test___LINE__.rb +0 -43
- data/test/lib/nano/binding/test_call_stack.rb +0 -34
- data/test/lib/nano/binding/test_called.rb +0 -30
- data/test/lib/nano/binding/test_caller.rb +0 -35
- data/test/lib/nano/binding/test_defined.rb +0 -34
- data/test/lib/nano/binding/test_eval.rb +0 -34
- data/test/lib/nano/binding/test_local_variables.rb +0 -34
- data/test/lib/nano/binding/test_method_name.rb +0 -34
- data/test/lib/nano/binding/test_op_fetch.rb +0 -34
- data/test/lib/nano/binding/test_op_store.rb +0 -35
- data/test/lib/nano/binding/test_self.rb +0 -34
- data/test/lib/nano/class/test_descendents.rb +0 -30
- data/test/lib/nano/class/test_remove_descendents.rb +0 -32
- data/test/lib/nano/comparable/test_at_least.rb +0 -34
- data/test/lib/nano/comparable/test_clip.rb +0 -44
- data/test/lib/nano/comparable/test_cmp.rb +0 -28
- data/test/lib/nano/continuation/self/test_create.rb +0 -26
- data/test/lib/nano/date/test_days_in_month.rb +0 -30
- data/test/lib/nano/date/test_days_of_month.rb +0 -30
- data/test/lib/nano/date/test_stamp.rb +0 -38
- data/test/lib/nano/date/test_to_date.rb +0 -30
- data/test/lib/nano/date/test_to_s.rb +0 -30
- data/test/lib/nano/date/test_to_time.rb +0 -30
- data/test/lib/nano/dir/self/test_ancestor.rb +0 -26
- data/test/lib/nano/dir/self/test_ascend.rb +0 -41
- data/test/lib/nano/dir/self/test_ls_r.rb +0 -52
- data/test/lib/nano/enumerable/self/test_combinations.rb +0 -43
- data/test/lib/nano/enumerable/self/test_cross.rb +0 -31
- data/test/lib/nano/enumerable/test_collect_with_index.rb +0 -27
- data/test/lib/nano/enumerable/test_commonality.rb +0 -31
- data/test/lib/nano/enumerable/test_compact_collect.rb +0 -27
- data/test/lib/nano/enumerable/test_cross.rb +0 -30
- data/test/lib/nano/enumerable/test_each_combination.rb +0 -29
- data/test/lib/nano/enumerable/test_each_pair.rb +0 -29
- data/test/lib/nano/enumerable/test_each_slice.rb +0 -74
- data/test/lib/nano/enumerable/test_each_unique_pair.rb +0 -29
- data/test/lib/nano/enumerable/test_entropy.rb +0 -26
- data/test/lib/nano/enumerable/test_every.rb +0 -35
- data/test/lib/nano/enumerable/test_ew.rb +0 -31
- data/test/lib/nano/enumerable/test_filter_collect.rb +0 -31
- data/test/lib/nano/enumerable/test_find_collisions.rb +0 -30
- data/test/lib/nano/enumerable/test_frequency.rb +0 -27
- data/test/lib/nano/enumerable/test_graph.rb +0 -30
- data/test/lib/nano/enumerable/test_ideal_entropy.rb +0 -27
- data/test/lib/nano/enumerable/test_none.rb +0 -33
- data/test/lib/nano/enumerable/test_occur.rb +0 -30
- data/test/lib/nano/enumerable/test_one.rb +0 -35
- data/test/lib/nano/enumerable/test_op_pow.rb +0 -27
- data/test/lib/nano/enumerable/test_partition_by.rb +0 -31
- data/test/lib/nano/enumerable/test_probability.rb +0 -27
- data/test/lib/nano/enumerable/test_to_h.rb +0 -27
- data/test/lib/nano/enumerable/test_uniq_by.rb +0 -28
- data/test/lib/nano/file/self/test_create.rb +0 -39
- data/test/lib/nano/file/self/test_open_as_string.rb +0 -40
- data/test/lib/nano/file/self/test_read_list.rb +0 -37
- data/test/lib/nano/file/self/test_sanitize.rb +0 -46
- data/test/lib/nano/file/self/test_split_all.rb +0 -27
- data/test/lib/nano/fileutils/test_slice.rb +0 -96
- data/test/lib/nano/fileutils/test_wc.rb +0 -68
- data/test/lib/nano/fileutils/test_which.rb +0 -61
- data/test/lib/nano/float/test_approx.rb +0 -28
- data/test/lib/nano/float/test_round_at.rb +0 -46
- data/test/lib/nano/float/test_round_to.rb +0 -46
- data/test/lib/nano/hash/self/test_zipnew.rb +0 -28
- data/test/lib/nano/hash/test_alias.rb +0 -31
- data/test/lib/nano/hash/test_assert_has_keys.rb +0 -27
- data/test/lib/nano/hash/test_assert_has_only_keys.rb +0 -27
- data/test/lib/nano/hash/test_at.rb +0 -28
- data/test/lib/nano/hash/test_collate.rb +0 -35
- data/test/lib/nano/hash/test_each.rb +0 -36
- data/test/lib/nano/hash/test_each_with_index.rb +0 -29
- data/test/lib/nano/hash/test_each_with_key.rb +0 -29
- data/test/lib/nano/hash/test_graph.rb +0 -28
- data/test/lib/nano/hash/test_has_keys.rb +0 -27
- data/test/lib/nano/hash/test_has_only_keys.rb +0 -27
- data/test/lib/nano/hash/test_inverse.rb +0 -28
- data/test/lib/nano/hash/test_keys_to_s.rb +0 -34
- data/test/lib/nano/hash/test_keys_to_sym.rb +0 -34
- data/test/lib/nano/hash/test_op_fetch.rb +0 -111
- data/test/lib/nano/hash/test_op_lshift.rb +0 -29
- data/test/lib/nano/hash/test_rand_key.rb +0 -27
- data/test/lib/nano/hash/test_rand_pair.rb +0 -27
- data/test/lib/nano/hash/test_rand_value.rb +0 -27
- data/test/lib/nano/hash/test_replace_each.rb +0 -29
- data/test/lib/nano/hash/test_shuffle.rb +0 -32
- data/test/lib/nano/hash/test_slice.rb +0 -27
- data/test/lib/nano/hash/test_swap.rb +0 -27
- data/test/lib/nano/hash/test_swapkey.rb +0 -29
- data/test/lib/nano/hash/test_to_h.rb +0 -27
- data/test/lib/nano/hash/test_to_ostruct.rb +0 -30
- data/test/lib/nano/hash/test_to_ostruct_recurse.rb +0 -30
- data/test/lib/nano/hash/test_traverse.rb +0 -37
- data/test/lib/nano/hash/test_update_each.rb +0 -29
- data/test/lib/nano/hash/test_update_keys.rb +0 -28
- data/test/lib/nano/hash/test_update_values.rb +0 -28
- data/test/lib/nano/hash/test_weave.rb +0 -29
- data/test/lib/nano/integer/test_factorial.rb +0 -30
- data/test/lib/nano/integer/test_multiple.rb +0 -43
- data/test/lib/nano/integer/test_ordinal.rb +0 -29
- data/test/lib/nano/integer/test_times_collect.rb +0 -28
- data/test/lib/nano/integer/test_times_map.rb +0 -28
- data/test/lib/nano/kernel/test___class__.rb +0 -26
- data/test/lib/nano/kernel/test_as.rb +0 -42
- data/test/lib/nano/kernel/test_assign_from.rb +0 -31
- data/test/lib/nano/kernel/test_assign_with.rb +0 -31
- data/test/lib/nano/kernel/test_bool.rb +0 -41
- data/test/lib/nano/kernel/test_bug.rb +0 -26
- data/test/lib/nano/kernel/test_call_stack.rb +0 -26
- data/test/lib/nano/kernel/test_called.rb +0 -26
- data/test/lib/nano/kernel/test_constant.rb +0 -33
- data/test/lib/nano/kernel/test_copy.rb +0 -40
- data/test/lib/nano/kernel/test_deep_copy.rb +0 -40
- data/test/lib/nano/kernel/test_demo.rb +0 -28
- data/test/lib/nano/kernel/test_fn.rb +0 -26
- data/test/lib/nano/kernel/test_generate_method_name.rb +0 -26
- data/test/lib/nano/kernel/test_get_by_id.rb +0 -28
- data/test/lib/nano/kernel/test_here.rb +0 -26
- data/test/lib/nano/kernel/test_in.rb +0 -27
- data/test/lib/nano/kernel/test_maybe.rb +0 -26
- data/test/lib/nano/kernel/test_metaclass.rb +0 -34
- data/test/lib/nano/kernel/test_method.rb +0 -32
- data/test/lib/nano/kernel/test_method_name.rb +0 -31
- data/test/lib/nano/kernel/test_methods.rb +0 -50
- data/test/lib/nano/kernel/test_new.rb +0 -30
- data/test/lib/nano/kernel/test_object_class.rb +0 -26
- data/test/lib/nano/kernel/test_object_hexid.rb +0 -27
- data/test/lib/nano/kernel/test_require_all.rb +0 -26
- data/test/lib/nano/kernel/test_require_esc.rb +0 -27
- data/test/lib/nano/kernel/test_require_facet.rb +0 -27
- data/test/lib/nano/kernel/test_resc.rb +0 -27
- data/test/lib/nano/kernel/test_returning.rb +0 -30
- data/test/lib/nano/kernel/test_send_as.rb +0 -26
- data/test/lib/nano/kernel/test_set_from.rb +0 -33
- data/test/lib/nano/kernel/test_set_with.rb +0 -33
- data/test/lib/nano/kernel/test_silently.rb +0 -28
- data/test/lib/nano/kernel/test_singleton.rb +0 -40
- data/test/lib/nano/kernel/test_superior.rb +0 -30
- data/test/lib/nano/kernel/test_supermethod.rb +0 -33
- data/test/lib/nano/kernel/test_this.rb +0 -26
- data/test/lib/nano/kernel/test_to_b.rb +0 -28
- data/test/lib/nano/kernel/test_to_bool.rb +0 -28
- data/test/lib/nano/kernel/test_uri.rb +0 -30
- data/test/lib/nano/kernel/test_val.rb +0 -43
- data/test/lib/nano/kernel/test_with_accessor.rb +0 -51
- data/test/lib/nano/matchdata/test_match.rb +0 -29
- data/test/lib/nano/matchdata/test_matchtree.rb +0 -32
- data/test/lib/nano/module/test_abstract.rb +0 -36
- data/test/lib/nano/module/test_alias_module_function.rb +0 -34
- data/test/lib/nano/module/test_ancestor.rb +0 -26
- data/test/lib/nano/module/test_basename.rb +0 -26
- data/test/lib/nano/module/test_by_name.rb +0 -29
- data/test/lib/nano/module/test_cattr_accessor.rb +0 -55
- data/test/lib/nano/module/test_clone_using.rb +0 -55
- data/test/lib/nano/module/test_dirname.rb +0 -26
- data/test/lib/nano/module/test_equate_on.rb +0 -37
- data/test/lib/nano/module/test_generate_instance_method_name.rb +0 -33
- data/test/lib/nano/module/test_include_as.rb +0 -35
- data/test/lib/nano/module/test_initializer.rb +0 -32
- data/test/lib/nano/module/test_instance_methods.rb +0 -59
- data/test/lib/nano/module/test_integrate.rb +0 -35
- data/test/lib/nano/module/test_memoize.rb +0 -50
- data/test/lib/nano/module/test_modspace.rb +0 -27
- data/test/lib/nano/module/test_namespace.rb +0 -33
- data/test/lib/nano/module/test_nesting.rb +0 -36
- data/test/lib/nano/module/test_redef.rb +0 -30
- data/test/lib/nano/module/test_redefine_method.rb +0 -30
- data/test/lib/nano/module/test_redirect.rb +0 -30
- data/test/lib/nano/module/test_redirect_method.rb +0 -30
- data/test/lib/nano/module/test_remove.rb +0 -30
- data/test/lib/nano/module/test_rename.rb +0 -31
- data/test/lib/nano/module/test_rename_method.rb +0 -31
- data/test/lib/nano/module/test_revisal.rb +0 -35
- data/test/lib/nano/module/test_shadow_method.rb +0 -30
- data/test/lib/nano/module/test_sort_on.rb +0 -42
- data/test/lib/nano/module/test_undef.rb +0 -30
- data/test/lib/nano/module/test_wrap.rb +0 -30
- data/test/lib/nano/module/test_wrap_method.rb +0 -30
- data/test/lib/nano/nilclass/test_empty.rb +0 -26
- data/test/lib/nano/nilclass/test_include.rb +0 -26
- data/test/lib/nano/nilclass/test_op_fetch.rb +0 -28
- data/test/lib/nano/nilclass/test_size.rb +0 -30
- data/test/lib/nano/nilclass/test_to_f.rb +0 -26
- data/test/lib/nano/nilclass/test_to_h.rb +0 -26
- data/test/lib/nano/numeric/test_ceil_multiple.rb +0 -31
- data/test/lib/nano/numeric/test_succ.rb +0 -40
- data/test/lib/nano/numeric/test_to_b.rb +0 -27
- data/test/lib/nano/ostruct/test___merge__.rb +0 -38
- data/test/lib/nano/ostruct/test___update__.rb +0 -29
- data/test/lib/nano/ostruct/test_op_fetch.rb +0 -27
- data/test/lib/nano/ostruct/test_op_store.rb +0 -28
- data/test/lib/nano/proc/test_compose.rb +0 -36
- data/test/lib/nano/proc/test_to_method.rb +0 -31
- data/test/lib/nano/range/test_to_r.rb +0 -27
- data/test/lib/nano/range/test_to_range.rb +0 -27
- data/test/lib/nano/range/test_umbrella.rb +0 -34
- data/test/lib/nano/range/test_within.rb +0 -29
- data/test/lib/nano/regexp/test_arity.rb +0 -33
- data/test/lib/nano/regexp/test_to_re.rb +0 -27
- data/test/lib/nano/regexp/test_to_regexp.rb +0 -27
- data/test/lib/nano/string/self/test_interpolate.rb +0 -27
- data/test/lib/nano/string/self/test_patterns.rb +0 -28
- data/test/lib/nano/string/self/test_rand_letter.rb +0 -26
- data/test/lib/nano/string/test_align_center.rb +0 -34
- data/test/lib/nano/string/test_at_rand.rb +0 -35
- data/test/lib/nano/string/test_basename.rb +0 -41
- data/test/lib/nano/string/test_blank.rb +0 -27
- data/test/lib/nano/string/test_bracket.rb +0 -49
- data/test/lib/nano/string/test_camelcase.rb +0 -39
- data/test/lib/nano/string/test_camelize.rb +0 -26
- data/test/lib/nano/string/test_capitalized.rb +0 -26
- data/test/lib/nano/string/test_chars.rb +0 -27
- data/test/lib/nano/string/test_cmp.rb +0 -30
- data/test/lib/nano/string/test_demodulize.rb +0 -38
- data/test/lib/nano/string/test_downcase.rb +0 -26
- data/test/lib/nano/string/test_dresner.rb +0 -32
- data/test/lib/nano/string/test_each_char.rb +0 -29
- data/test/lib/nano/string/test_each_word.rb +0 -29
- data/test/lib/nano/string/test_first.rb +0 -43
- data/test/lib/nano/string/test_fold.rb +0 -28
- data/test/lib/nano/string/test_frequency.rb +0 -28
- data/test/lib/nano/string/test_humanize.rb +0 -26
- data/test/lib/nano/string/test_indent.rb +0 -40
- data/test/lib/nano/string/test_index_all.rb +0 -26
- data/test/lib/nano/string/test_last.rb +0 -46
- data/test/lib/nano/string/test_line_wrap.rb +0 -27
- data/test/lib/nano/string/test_lines.rb +0 -26
- data/test/lib/nano/string/test_lowercase.rb +0 -26
- data/test/lib/nano/string/test_margin.rb +0 -117
- data/test/lib/nano/string/test_mscan.rb +0 -30
- data/test/lib/nano/string/test_natcmp.rb +0 -30
- data/test/lib/nano/string/test_nchar.rb +0 -29
- data/test/lib/nano/string/test_pop.rb +0 -47
- data/test/lib/nano/string/test_probability.rb +0 -28
- data/test/lib/nano/string/test_push.rb +0 -40
- data/test/lib/nano/string/test_quote.rb +0 -49
- data/test/lib/nano/string/test_rand_byte.rb +0 -35
- data/test/lib/nano/string/test_rand_index.rb +0 -26
- data/test/lib/nano/string/test_range.rb +0 -27
- data/test/lib/nano/string/test_range_all.rb +0 -27
- data/test/lib/nano/string/test_range_of_line.rb +0 -28
- data/test/lib/nano/string/test_shatter.rb +0 -29
- data/test/lib/nano/string/test_shift.rb +0 -40
- data/test/lib/nano/string/test_shuffle.rb +0 -27
- data/test/lib/nano/string/test_similarity.rb +0 -26
- data/test/lib/nano/string/test_singular.rb +0 -32
- data/test/lib/nano/string/test_slap.rb +0 -40
- data/test/lib/nano/string/test_soundex.rb +0 -41
- data/test/lib/nano/string/test_succ.rb +0 -29
- data/test/lib/nano/string/test_to_a.rb +0 -27
- data/test/lib/nano/string/test_to_arr.rb +0 -26
- data/test/lib/nano/string/test_to_b.rb +0 -41
- data/test/lib/nano/string/test_to_const.rb +0 -28
- data/test/lib/nano/string/test_to_date.rb +0 -30
- data/test/lib/nano/string/test_to_proc.rb +0 -33
- data/test/lib/nano/string/test_to_re.rb +0 -28
- data/test/lib/nano/string/test_to_time.rb +0 -30
- data/test/lib/nano/string/test_unix_crypt.rb +0 -30
- data/test/lib/nano/string/test_unpack.rb +0 -34
- data/test/lib/nano/string/test_unshift.rb +0 -39
- data/test/lib/nano/string/test_upcase.rb +0 -30
- data/test/lib/nano/string/test_whitespace.rb +0 -27
- data/test/lib/nano/string/test_word_filter.rb +0 -34
- data/test/lib/nano/string/test_word_wrap.rb +0 -51
- data/test/lib/nano/string/test_words.rb +0 -27
- data/test/lib/nano/symbol/test_camelcase.rb +0 -26
- data/test/lib/nano/symbol/test_camelize.rb +0 -27
- data/test/lib/nano/symbol/test_capitalize.rb +0 -26
- data/test/lib/nano/symbol/test_capitalized.rb +0 -27
- data/test/lib/nano/symbol/test_downcase.rb +0 -27
- data/test/lib/nano/symbol/test_not.rb +0 -29
- data/test/lib/nano/symbol/test_pad.rb +0 -27
- data/test/lib/nano/symbol/test_succ.rb +0 -28
- data/test/lib/nano/symbol/test_to_const.rb +0 -28
- data/test/lib/nano/symbol/test_to_proc.rb +0 -27
- data/test/lib/nano/symbol/test_to_str.rb +0 -28
- data/test/lib/nano/symbol/test_underscore.rb +0 -26
- data/test/lib/nano/symbol/test_upcase.rb +0 -27
- data/test/lib/nano/time/test_change.rb +0 -33
- data/test/lib/nano/time/test_elapse.rb +0 -27
- data/test/lib/nano/time/test_stamp.rb +0 -31
- data/test/lib/nano/time/test_to_date.rb +0 -31
- data/test/lib/nano/time/test_to_s.rb +0 -31
- data/test/lib/nano/time/test_to_time.rb +0 -31
- data/test/lib/unit/test_methodprobe.rb +0 -53
- data/test/tc_nil_as_emptiness.rb +0 -20
- data/web/favicon.ico +0 -0
- data/web/images/abc.png +0 -0
- data/web/images/abc1.png +0 -0
- data/web/images/gray.jpg +0 -0
- data/web/images/ruby-lg.png +0 -0
- data/web/images/ruby.gif +0 -0
- data/web/index.html +0 -310
data/lib/mega/fixnum_const.rb
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Fixnum Constants
|
3
|
-
#
|
4
|
-
# Copyright (c) 2005 Thomas Sawyer
|
5
|
-
#
|
6
|
-
# Ruby License
|
7
|
-
#
|
8
|
-
# This module is free software. You may use, modify, and/or redistribute this
|
9
|
-
# software under the same terms as Ruby.
|
10
|
-
#
|
11
|
-
# This program is distributed in the hope that it will be useful, but WITHOUT
|
12
|
-
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
13
|
-
# FOR A PARTICULAR PURPOSE.
|
14
|
-
#
|
15
|
-
#
|
16
|
-
# ==========================================================================
|
17
|
-
# Revision History ::
|
18
|
-
# --------------------------------------------------------------------------
|
19
|
-
# 05.07.05 trans * Placed in Calibre
|
20
|
-
# ==========================================================================
|
21
|
-
#++
|
22
|
-
|
23
|
-
#:title: Fixnum Constants
|
24
|
-
#
|
25
|
-
# Constants providing the numerical limitations of Fixnum class.
|
26
|
-
#
|
27
|
-
# == Synopsis
|
28
|
-
#
|
29
|
-
# require 'mega/fixnum-constants'
|
30
|
-
#
|
31
|
-
# puts Fixnum::MAX #=>
|
32
|
-
#
|
33
|
-
class Fixnum
|
34
|
-
N_BYTES = [42].pack('i').size
|
35
|
-
N_BITS = N_BYTES * 8
|
36
|
-
MAX = 2 ** (N_BITS - 2) - 1
|
37
|
-
MIN = -MAX - 1
|
38
|
-
end
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
# _____ _
|
43
|
-
# |_ _|__ ___| |_
|
44
|
-
# | |/ _ \/ __| __|
|
45
|
-
# | | __/\__ \ |_
|
46
|
-
# |_|\___||___/\__|
|
47
|
-
#
|
48
|
-
|
49
|
-
# TODO
|
50
|
-
|
51
|
-
=begin testing
|
52
|
-
|
53
|
-
require 'test/unit'
|
54
|
-
|
55
|
-
class TC_FixnumConst < Test::Unit::TestCase
|
56
|
-
|
57
|
-
def test_01
|
58
|
-
end
|
59
|
-
|
60
|
-
end
|
61
|
-
|
62
|
-
=end
|
data/lib/mega/floatstring.rb
DELETED
@@ -1,179 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# FloatString
|
3
|
-
#
|
4
|
-
# Copyright (c) 2004,2005 Thomas Sawyer
|
5
|
-
#
|
6
|
-
# Ruby License
|
7
|
-
#
|
8
|
-
# This module is free software. You may use, modify, and/or redistribute this
|
9
|
-
# software under the same terms as Ruby.
|
10
|
-
#
|
11
|
-
# This program is distributed in the hope that it will be useful, but WITHOUT
|
12
|
-
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
13
|
-
# FOR A PARTICULAR PURPOSE.
|
14
|
-
#
|
15
|
-
#
|
16
|
-
# ==========================================================================
|
17
|
-
# Revision History ::
|
18
|
-
# --------------------------------------------------------------------------
|
19
|
-
# 04.11.01 Trans * Complete first usable verion (still needs TLC)
|
20
|
-
# ==========================================================================
|
21
|
-
#++
|
22
|
-
|
23
|
-
#:title: FloatString
|
24
|
-
#
|
25
|
-
# FloatString allows unlimited string insertion between string segments.
|
26
|
-
#
|
27
|
-
# == Usage
|
28
|
-
#
|
29
|
-
# TODO: Comming soon.....
|
30
|
-
#
|
31
|
-
# == Notes
|
32
|
-
#
|
33
|
-
# Although usable, it is still a very new idea, and therefore
|
34
|
-
# has a much greater potential for change. If you decide it is useful
|
35
|
-
# to you, please contribute to its improvement. Thanks.
|
36
|
-
#
|
37
|
-
# == Author(s)
|
38
|
-
#
|
39
|
-
# * Thomas Sawyer
|
40
|
-
#
|
41
|
-
|
42
|
-
class FloatString
|
43
|
-
|
44
|
-
def initialize( str )
|
45
|
-
@str = str
|
46
|
-
@float = {}
|
47
|
-
i = 0
|
48
|
-
while i < @str.length
|
49
|
-
@float[i.to_f] = @str[i,1]
|
50
|
-
i += 1
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def undo
|
55
|
-
initialize( @str )
|
56
|
-
end
|
57
|
-
|
58
|
-
def re_enumerate
|
59
|
-
initialize( to_s )
|
60
|
-
end
|
61
|
-
alias_method( :renumerate, :re_enumerate )
|
62
|
-
|
63
|
-
def to_s
|
64
|
-
@float.to_a.sort_by{ |k,v| k }.collect{ |k,v| v }.join('')
|
65
|
-
end
|
66
|
-
|
67
|
-
def to_str
|
68
|
-
@float.to_a.sort_by{ |k,v| k }.collect{ |k,v| v }.join('')
|
69
|
-
end
|
70
|
-
|
71
|
-
# these should probably check the decimal and start there
|
72
|
-
# rather then startint at 0.5
|
73
|
-
|
74
|
-
def inner_insert(s, i)
|
75
|
-
n = 0.5; i = i.to_f - n
|
76
|
-
while @float.has_key?(i)
|
77
|
-
n = n/2
|
78
|
-
i += n
|
79
|
-
end
|
80
|
-
@float[i] = s
|
81
|
-
end
|
82
|
-
|
83
|
-
def outer_insert(s, i)
|
84
|
-
n = 0.5; i = i.to_f - 0.5
|
85
|
-
while @float.has_key?(i)
|
86
|
-
n = n/2
|
87
|
-
i -= n
|
88
|
-
end
|
89
|
-
@float[i] = s
|
90
|
-
end
|
91
|
-
|
92
|
-
def inner_append(s, i)
|
93
|
-
n = 0.5; i = i.to_f + 0.5
|
94
|
-
while @float.has_key?(i)
|
95
|
-
n = n/2
|
96
|
-
i -= n
|
97
|
-
end
|
98
|
-
@float[i] = s
|
99
|
-
end
|
100
|
-
|
101
|
-
def outer_append(s, i)
|
102
|
-
n = 0.5; i = i.to_f + 0.5
|
103
|
-
while @float.has_key?(i)
|
104
|
-
n = n/2
|
105
|
-
i += n
|
106
|
-
end
|
107
|
-
@float[i] = s
|
108
|
-
end
|
109
|
-
|
110
|
-
# an inner and outer wrap method would be nice
|
111
|
-
|
112
|
-
def [](arg)
|
113
|
-
if arg.kind_of?(Range)
|
114
|
-
#r = Range.new(arg.first.to_f, arg.last.to_f, arg.exclude_end?)
|
115
|
-
a = @float.to_a.sort_by{ |k,v| k }
|
116
|
-
s = a.index(a.find{ |e| e[0] == arg.first.to_f})
|
117
|
-
f = a.index(a.find{ |e| e[0] == arg.last.to_f})
|
118
|
-
a = arg.exclude_end? ? a[s...f] : a[s..f]
|
119
|
-
a.collect{ |k,v| v }.join('')
|
120
|
-
else
|
121
|
-
@float[arg.to_f]
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
def []=(arg,v)
|
126
|
-
@float[arg.to_f] = v
|
127
|
-
end
|
128
|
-
|
129
|
-
def fill(val, rng=0..-1)
|
130
|
-
a = @float.to_a.sort_by{ |k,v| k }
|
131
|
-
s = a.index( a.find{ |e| e[0] == rng.first.to_f } )
|
132
|
-
f = a.index( a.find{ |e| e[0] == rng.last.to_f } )
|
133
|
-
x = (rng.exclude_end? ? a[s...f] : a[s..f])
|
134
|
-
x.each{ |k,v| @float[k] = val.to_s }
|
135
|
-
self.to_s
|
136
|
-
end
|
137
|
-
|
138
|
-
def empty(rng)
|
139
|
-
fill('', rng)
|
140
|
-
end
|
141
|
-
|
142
|
-
def blank(rng)
|
143
|
-
fill(' ', rng)
|
144
|
-
end
|
145
|
-
|
146
|
-
end
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
# _____ _
|
151
|
-
# |_ _|__ ___| |_
|
152
|
-
# | |/ _ \/ __| __|
|
153
|
-
# | | __/\__ \ |_
|
154
|
-
# |_|\___||___/\__|
|
155
|
-
#
|
156
|
-
|
157
|
-
=begin testing
|
158
|
-
|
159
|
-
require 'test/unit'
|
160
|
-
|
161
|
-
class TC_FloatString < Test::Unit::TestCase
|
162
|
-
|
163
|
-
def test_inner_inset
|
164
|
-
fs = FloatString.new( "Hello World!" )
|
165
|
-
fs.inner_insert("XXX", 4)
|
166
|
-
assert_equal("HellXXXo World!", fs.to_s)
|
167
|
-
fs.inner_insert("YYY", 4)
|
168
|
-
assert_equal("HellXXXYYYo World!", fs.to_s)
|
169
|
-
end
|
170
|
-
|
171
|
-
def test_fill
|
172
|
-
fs = FloatString.new( "Hello World!" )
|
173
|
-
fs.inner_insert("XXX", 4)
|
174
|
-
assert_equal("HeNNNN World!", fs.fill("N", 2..4))
|
175
|
-
end
|
176
|
-
|
177
|
-
end
|
178
|
-
|
179
|
-
=end
|
data/lib/mega/functor.rb
DELETED
@@ -1,98 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Functor
|
3
|
-
# Copyright (c) 2004,2005 Thomas Sawyer
|
4
|
-
#
|
5
|
-
# Ruby License
|
6
|
-
#
|
7
|
-
# This module is free software. You may use, modify, and/or redistribute this
|
8
|
-
# software under the same terms as Ruby.
|
9
|
-
#
|
10
|
-
# This program is distributed in the hope that it will be useful, but WITHOUT
|
11
|
-
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
12
|
-
# FOR A PARTICULAR PURPOSE.
|
13
|
-
#
|
14
|
-
# ==========================================================================
|
15
|
-
# Revision History
|
16
|
-
# ==========================================================================
|
17
|
-
# 05-09-22 trans
|
18
|
-
# Made a subclass of BasicObject.
|
19
|
-
#
|
20
|
-
# 05-01-10 trans
|
21
|
-
# Ported to Mega Modules.
|
22
|
-
# ==========================================================================
|
23
|
-
#++
|
24
|
-
|
25
|
-
require 'mega/basicobject'
|
26
|
-
|
27
|
-
#:title: Functor
|
28
|
-
#
|
29
|
-
# By definition a Functor is simply a first class method, but these are common
|
30
|
-
# in the form of Method and Proc. So here a Functor is a bit more specialized
|
31
|
-
# as a 1st class _metafunction_. Essentally, a Functor can vary its behavior
|
32
|
-
# accorrding to the operation applied to it.
|
33
|
-
#
|
34
|
-
# == Synopsis
|
35
|
-
#
|
36
|
-
# require 'mega/functor'
|
37
|
-
#
|
38
|
-
# f = Functor.new { |op, x| x.send(op, x) }
|
39
|
-
# f + 1 #=> 2
|
40
|
-
# f + 2 #=> 4
|
41
|
-
# f + 3 #=> 6
|
42
|
-
# f * 1 #=> 1
|
43
|
-
# f * 2 #=> 2
|
44
|
-
# f * 3 #=> 9
|
45
|
-
#
|
46
|
-
# == Author(s)
|
47
|
-
#
|
48
|
-
# * Thomas Sawyer
|
49
|
-
#
|
50
|
-
|
51
|
-
class Functor < BasicObject
|
52
|
-
def initialize(*obj, &func)
|
53
|
-
@obj = obj
|
54
|
-
@func = func
|
55
|
-
end
|
56
|
-
def method_missing(op, *args)
|
57
|
-
if @obj.empty?
|
58
|
-
@func.call(op, *args)
|
59
|
-
else
|
60
|
-
@func.call(op, *(@obj + args))
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
|
66
|
-
# _____ _
|
67
|
-
# |_ _|__ ___| |_
|
68
|
-
# | |/ _ \/ __| __|
|
69
|
-
# | | __/\__ \ |_
|
70
|
-
# |_|\___||___/\__|
|
71
|
-
#
|
72
|
-
|
73
|
-
=begin testing
|
74
|
-
|
75
|
-
require 'test/unit'
|
76
|
-
|
77
|
-
class TC_Functor < Test::Unit::TestCase
|
78
|
-
|
79
|
-
def test_function
|
80
|
-
f = Functor.new { |op, x| x.send(op, x) }
|
81
|
-
assert_equal( 2, f + 1 ) #=> 2
|
82
|
-
assert_equal( 4, f + 2 ) #=> 4
|
83
|
-
assert_equal( 6, f + 3 ) #=> 6
|
84
|
-
assert_equal( 1, f * 1 ) #=> 1
|
85
|
-
assert_equal( 4, f * 2 ) #=> 4
|
86
|
-
assert_equal( 9, f * 3 ) #=> 9
|
87
|
-
end
|
88
|
-
|
89
|
-
def test_decoration
|
90
|
-
f = Functor.new("A") { |op, a, x| x.send(op, a + x) }
|
91
|
-
assert_equal( 'BAB', f + 'B' )
|
92
|
-
assert_equal( 'CAC', f + 'C' )
|
93
|
-
assert_equal( 'DAD', f + 'D' )
|
94
|
-
end
|
95
|
-
|
96
|
-
end
|
97
|
-
|
98
|
-
=end
|
data/lib/mega/harray.rb
DELETED
@@ -1,817 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# HArray
|
3
|
-
#
|
4
|
-
# Copyright (c) 2004,2005 Thomas Sawyer
|
5
|
-
#
|
6
|
-
# Ruby License
|
7
|
-
#
|
8
|
-
# This module is free software. You may use, modify, and/or redistribute this
|
9
|
-
# software under the same terms as Ruby.
|
10
|
-
#
|
11
|
-
# This program is distributed in the hope that it will be useful, but WITHOUT
|
12
|
-
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
13
|
-
# FOR A PARTICULAR PURPOSE.
|
14
|
-
#
|
15
|
-
#
|
16
|
-
# ==========================================================================
|
17
|
-
# Revision History ::
|
18
|
-
# --------------------------------------------------------------------------
|
19
|
-
# 04.09 Trans * 99% Compatible with Array
|
20
|
-
# ==========================================================================
|
21
|
-
#++
|
22
|
-
|
23
|
-
#:title: HArray
|
24
|
-
#
|
25
|
-
# HArray is an implemenation of the Array class using only Hashes.
|
26
|
-
# Regular Arrays are never used except once to delegate the #pack method,
|
27
|
-
# and for *args parameters (since there is no way around those is some cases).
|
28
|
-
# HArray is for all practical purposes 100% compatible with Array.
|
29
|
-
#
|
30
|
-
# HArray is slower then the built in Array class, but not as slow
|
31
|
-
# as one might expect, since a Hash in general is faster than an Array.
|
32
|
-
# It might be interesting to see how this would perform if it were
|
33
|
-
# written in c. Not all that useful, but an interesting example.
|
34
|
-
#
|
35
|
-
# == AUTHOR(s)
|
36
|
-
#
|
37
|
-
# * Thamas Sawyer
|
38
|
-
#
|
39
|
-
|
40
|
-
class HArray < Hash
|
41
|
-
|
42
|
-
def HArray.[](*args)
|
43
|
-
nha = HArray.new
|
44
|
-
args.each { |a| nha.set(nha.length,a) }
|
45
|
-
nha
|
46
|
-
end
|
47
|
-
|
48
|
-
def HArray.new_h(hsh)
|
49
|
-
nha=HArray.new
|
50
|
-
nha.replace(hsh)
|
51
|
-
#nha.reindex!
|
52
|
-
end
|
53
|
-
|
54
|
-
def initialize(i=0,e=nil)
|
55
|
-
if i > 0
|
56
|
-
i.times { self.set(self.length,e) }
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
def &(ha)
|
61
|
-
nha=HArray.new
|
62
|
-
(0..self.length-1).each do |i|
|
63
|
-
if ha.has_value?(self.fetch(i)) and !nha.has_value?(self.fetch(i))
|
64
|
-
nha.set(nha.length,self.fetch(i))
|
65
|
-
end
|
66
|
-
end
|
67
|
-
nha
|
68
|
-
end
|
69
|
-
|
70
|
-
def *(j)
|
71
|
-
if j.kind_of?(String)
|
72
|
-
return self.join(j)
|
73
|
-
else
|
74
|
-
nha = HArray.new
|
75
|
-
j.times { (0...self.length).each { |i| nha.set(nha.length,self.fetch(i)) } }
|
76
|
-
return nha
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
def +(ha)
|
81
|
-
nha = self.dup
|
82
|
-
(0..ha.length-1).each { |i| nha.set(nha.length,ha.fetch(i)) }
|
83
|
-
nha
|
84
|
-
end
|
85
|
-
|
86
|
-
def -(ha)
|
87
|
-
nha = HArray.new
|
88
|
-
self.each { |v| nha << v if !ha.has_value?(v) }
|
89
|
-
#ha.each { |v| nha << i if !self.include?(v) }
|
90
|
-
nha
|
91
|
-
end
|
92
|
-
|
93
|
-
def <<(e)
|
94
|
-
self.set(self.length,e)
|
95
|
-
self
|
96
|
-
end
|
97
|
-
|
98
|
-
def <=>(ha)
|
99
|
-
(0..self.length-1).each do |i|
|
100
|
-
ieq = (self.fetch(i) <=> ha.fetch(i))
|
101
|
-
return ieq if ieq != 0
|
102
|
-
end
|
103
|
-
self.length <=> ha.length
|
104
|
-
end
|
105
|
-
|
106
|
-
def ===(ha)
|
107
|
-
self.==(ha)
|
108
|
-
end
|
109
|
-
|
110
|
-
alias_method :get, :[]
|
111
|
-
private :get
|
112
|
-
|
113
|
-
def [](i,l=nil)
|
114
|
-
if l
|
115
|
-
i = i...i+l
|
116
|
-
elsif ! i.kind_of?(Range)
|
117
|
-
return self.at(i)
|
118
|
-
end
|
119
|
-
nha = HArray.new
|
120
|
-
i.each { |j| nha.set(nha.length,get(j)) if has_key?(j) }
|
121
|
-
nha
|
122
|
-
end
|
123
|
-
|
124
|
-
alias set []=
|
125
|
-
def []=(i,b,c=nil)
|
126
|
-
if c
|
127
|
-
rng = (Integer(i)..Integer(i+b))
|
128
|
-
b = c
|
129
|
-
elsif i.kind_of? Range
|
130
|
-
rng = i
|
131
|
-
else
|
132
|
-
self.set(Integer(i),b)
|
133
|
-
return b
|
134
|
-
end
|
135
|
-
if b == nil
|
136
|
-
rng.each { |i| qdelete(i) }
|
137
|
-
self.reindex!
|
138
|
-
elsif b.kind_of?(Array) or b.kind_of?(HArray)
|
139
|
-
j = 0
|
140
|
-
rng.each { |i| self[i] = b[j]; j+=1 }
|
141
|
-
else
|
142
|
-
rng.each { |i| qdelete(i) }
|
143
|
-
self[rng.fist] = b
|
144
|
-
self.reindex!
|
145
|
-
end
|
146
|
-
end
|
147
|
-
|
148
|
-
def |(ha)
|
149
|
-
nha = self.dup
|
150
|
-
ha.each { |v| nha << v if !nha.has_value?(v) }
|
151
|
-
nha
|
152
|
-
end
|
153
|
-
|
154
|
-
def assoc(k)
|
155
|
-
(0...self.length).each { |i| return self.fetch(i) if self.fetch(i)[0] == k }
|
156
|
-
return nil
|
157
|
-
end
|
158
|
-
|
159
|
-
def at(i)
|
160
|
-
i = self.length + i if i <= -1
|
161
|
-
get(i)
|
162
|
-
#return nil if i < 0 or i >= self.length
|
163
|
-
#return self.fetch(i)
|
164
|
-
end
|
165
|
-
|
166
|
-
# clear okay
|
167
|
-
|
168
|
-
def collect
|
169
|
-
nha = HArray.new
|
170
|
-
(0...self.length).each { |i| nha << yield(self.fetch(i)) }
|
171
|
-
nha
|
172
|
-
end
|
173
|
-
|
174
|
-
def collect!
|
175
|
-
nha = HArray.new
|
176
|
-
(0...self.length).each { |i| nha << yield(self.fetch(i)) }
|
177
|
-
self.replace(nha)
|
178
|
-
end
|
179
|
-
|
180
|
-
def compact
|
181
|
-
nha, j = HArray.new, 0
|
182
|
-
(0..self.length-1).each do |i|
|
183
|
-
if self.fetch(i) != nil
|
184
|
-
nha.set(j,self.fetch(i))
|
185
|
-
j+=1
|
186
|
-
end
|
187
|
-
end
|
188
|
-
nha
|
189
|
-
end
|
190
|
-
|
191
|
-
def compact!
|
192
|
-
if self.has_value?(nil)
|
193
|
-
nha, j = HArray.new, 0
|
194
|
-
(0..self.length-1).each do |i|
|
195
|
-
if self.fetch(i) != nil
|
196
|
-
nha.set(j,self.fetch(i))
|
197
|
-
j+=1
|
198
|
-
end
|
199
|
-
end
|
200
|
-
return self.replace(nha)
|
201
|
-
else
|
202
|
-
return nil
|
203
|
-
end
|
204
|
-
end
|
205
|
-
|
206
|
-
def concat(ha)
|
207
|
-
(0...ha.length).each { |i| self.set(self.length,ha.fetch(i)) }
|
208
|
-
self
|
209
|
-
end
|
210
|
-
|
211
|
-
def count(e=nil)
|
212
|
-
if block_given?
|
213
|
-
cnt = 0
|
214
|
-
(0...self.length).each { |i| cnt += 1 if yield(self.fetch(i)) }
|
215
|
-
return cnt
|
216
|
-
else
|
217
|
-
cnt = 0
|
218
|
-
(0...self.length).each { |i| cnt += 1 if self.fetch(i) == e }
|
219
|
-
return cnt
|
220
|
-
end
|
221
|
-
end
|
222
|
-
|
223
|
-
alias qdelete delete
|
224
|
-
private :qdelete
|
225
|
-
|
226
|
-
def delete(e)
|
227
|
-
if has_value?(e)
|
228
|
-
qdelete_if { |i,v| v == e }
|
229
|
-
reindex!
|
230
|
-
return e
|
231
|
-
else
|
232
|
-
return yield if block_given?
|
233
|
-
return nil
|
234
|
-
end
|
235
|
-
end
|
236
|
-
|
237
|
-
def delete_at(i)
|
238
|
-
if self.has_key?(i)
|
239
|
-
e = self.fetch(i)
|
240
|
-
qdelete(i)
|
241
|
-
reindex!
|
242
|
-
return e
|
243
|
-
else
|
244
|
-
return nil
|
245
|
-
end
|
246
|
-
end
|
247
|
-
|
248
|
-
alias qdelete_if delete_if
|
249
|
-
private :qdelete_if
|
250
|
-
|
251
|
-
def delete_if
|
252
|
-
qdelete_if { |i,v| yield(v) }
|
253
|
-
reindex!
|
254
|
-
end
|
255
|
-
|
256
|
-
def each
|
257
|
-
(0...self.length).each { |i| yield(self.fetch(i)) }
|
258
|
-
end
|
259
|
-
|
260
|
-
def each_index
|
261
|
-
(0...self.length).each { |i| yield(i) }
|
262
|
-
end
|
263
|
-
|
264
|
-
# empty? okay as is
|
265
|
-
|
266
|
-
def eql?(ha)
|
267
|
-
return false if self.length != ha.length
|
268
|
-
return true if (0...self.length).all? { |i| self.fetch(i).eql?(ha.fetch(i)) }
|
269
|
-
return false
|
270
|
-
end
|
271
|
-
|
272
|
-
def fill(f,s=nil,l=nil)
|
273
|
-
if s.kind_of?(Range)
|
274
|
-
r = s
|
275
|
-
else
|
276
|
-
s = 0 if !s
|
277
|
-
l = self.length - s if !l
|
278
|
-
r = s...(s+l)
|
279
|
-
end
|
280
|
-
r.each{ |i| self.set(i,f) }
|
281
|
-
self
|
282
|
-
end
|
283
|
-
|
284
|
-
def first
|
285
|
-
return nil if self.empty?
|
286
|
-
self.fetch(0)
|
287
|
-
end
|
288
|
-
|
289
|
-
def flatten
|
290
|
-
nha = HArray.new
|
291
|
-
(0...self.length).each do |i|
|
292
|
-
sfi = self.fetch(i)
|
293
|
-
if sfi.kind_of?(HArray) or sfi.kind_of?(Array)
|
294
|
-
nha.concat(sfi.flatten)
|
295
|
-
else
|
296
|
-
nha.set(nha.length,sfi)
|
297
|
-
end
|
298
|
-
end
|
299
|
-
nha
|
300
|
-
end
|
301
|
-
|
302
|
-
def flatten!
|
303
|
-
return nil if !self.any? { |e| e.kind_of?(HArray) or e.kind_of?(Array) }
|
304
|
-
self.replace(self.flatten)
|
305
|
-
end
|
306
|
-
|
307
|
-
def include?(v)
|
308
|
-
self.has_value?(v)
|
309
|
-
end
|
310
|
-
|
311
|
-
# index okay
|
312
|
-
|
313
|
-
def join(sep='')
|
314
|
-
s = ''
|
315
|
-
(0...self.length).each { |i| s << "#{self.fetch(i)}#{sep}" }
|
316
|
-
return s.chomp(sep)
|
317
|
-
end
|
318
|
-
|
319
|
-
def last
|
320
|
-
self[self.length-1]
|
321
|
-
end
|
322
|
-
|
323
|
-
# length okay
|
324
|
-
|
325
|
-
alias map! collect!
|
326
|
-
|
327
|
-
def nitems
|
328
|
-
cnt = 0
|
329
|
-
(0...self.length).each { |i| cnt += 1 if self.fetch(i) != nil }
|
330
|
-
cnt
|
331
|
-
end
|
332
|
-
|
333
|
-
def pack(*args)
|
334
|
-
self.to_a.pack(*args)
|
335
|
-
end
|
336
|
-
|
337
|
-
def pop
|
338
|
-
self.delete_at(self.length-1)
|
339
|
-
end
|
340
|
-
|
341
|
-
def push(*e)
|
342
|
-
self.concat(e)
|
343
|
-
end
|
344
|
-
|
345
|
-
def rassoc(k)
|
346
|
-
(0...self.length).each { |i| return self.fetch(i) if self.fetch(i)[1] == k }
|
347
|
-
return nil
|
348
|
-
end
|
349
|
-
|
350
|
-
def reindex
|
351
|
-
nha, j, k, tl = HArray.new, 0, 0, self.length
|
352
|
-
while k < tl
|
353
|
-
if self.has_key?(j)
|
354
|
-
nha.set(k,self.fetch(j))
|
355
|
-
j+=1; k+=1
|
356
|
-
else
|
357
|
-
j+=1
|
358
|
-
end
|
359
|
-
end
|
360
|
-
nha
|
361
|
-
end
|
362
|
-
|
363
|
-
def reindex!
|
364
|
-
self.replace(self.reindex)
|
365
|
-
end
|
366
|
-
|
367
|
-
def reject!
|
368
|
-
chg=nil
|
369
|
-
qdelete_if { |i,v| r=yield(v); chg=true if r; r }
|
370
|
-
return nil if !chg
|
371
|
-
reindex!
|
372
|
-
end
|
373
|
-
|
374
|
-
#def replace(ha)
|
375
|
-
# if ha.length < self.length
|
376
|
-
# (ha.length..self.length-1).each { |i| self.delete(i) }
|
377
|
-
# (0..ha.length-1).each { |i| self.set(i,ha[i]) }
|
378
|
-
# end
|
379
|
-
#end
|
380
|
-
|
381
|
-
def reverse
|
382
|
-
nha = HArray.new
|
383
|
-
(0...self.length).each { |i| nha.set(self.length-1-i,self.fetch(i)) }
|
384
|
-
nha
|
385
|
-
end
|
386
|
-
|
387
|
-
def reverse!
|
388
|
-
(0...self.length/2).each do |i|
|
389
|
-
ri = self.length-1-i
|
390
|
-
tmp = self.fetch(ri)
|
391
|
-
self.set(ri,self.fetch(i))
|
392
|
-
self.set(i,tmp)
|
393
|
-
end
|
394
|
-
self
|
395
|
-
end
|
396
|
-
|
397
|
-
def reverse_each
|
398
|
-
i = self.length - 1
|
399
|
-
while i >= 0
|
400
|
-
yield(self.fetch(i))
|
401
|
-
i -= 1
|
402
|
-
end
|
403
|
-
end
|
404
|
-
|
405
|
-
def rindex(e)
|
406
|
-
i = self.length - 1
|
407
|
-
while i >= 0
|
408
|
-
return i if self.fetch(i) == e
|
409
|
-
i -= 1
|
410
|
-
end
|
411
|
-
return nil
|
412
|
-
end
|
413
|
-
|
414
|
-
def shift
|
415
|
-
e1 = self[0]
|
416
|
-
tl = self.length - 1
|
417
|
-
(1..tl).each { |i| self.set(i-1,self.fetch(i)) }
|
418
|
-
self.delete_at(tl)
|
419
|
-
e1
|
420
|
-
end
|
421
|
-
|
422
|
-
# size okay
|
423
|
-
|
424
|
-
def slice(*args)
|
425
|
-
self[*args]
|
426
|
-
end
|
427
|
-
|
428
|
-
def slice!(*args)
|
429
|
-
result = self[*args]
|
430
|
-
self[*args] = nil
|
431
|
-
result
|
432
|
-
end
|
433
|
-
|
434
|
-
def sort
|
435
|
-
raise "HArray does not currently support sorting with blocks" if block_given?
|
436
|
-
nha = self.dup
|
437
|
-
qsort(nha,0,nha.length-1)
|
438
|
-
end
|
439
|
-
|
440
|
-
def qsort(ha, l, r)
|
441
|
-
l_hold = l
|
442
|
-
r_hold = r
|
443
|
-
pivot = ha[l]
|
444
|
-
while l < r
|
445
|
-
r -= 1 while (ha[r] <=> pivot) >= 0 and l < r
|
446
|
-
if l != r
|
447
|
-
ha[l] = ha[r]
|
448
|
-
l += 1
|
449
|
-
end
|
450
|
-
l += 1 while (ha[l] <=> pivot) <= 0 and l < r
|
451
|
-
if l != r
|
452
|
-
ha[r] = ha[l]
|
453
|
-
r -= 1
|
454
|
-
end
|
455
|
-
end
|
456
|
-
ha[l] = pivot
|
457
|
-
pivot = l
|
458
|
-
l = l_hold
|
459
|
-
r = r_hold
|
460
|
-
qsort(ha,l,pivot-1) if l < pivot
|
461
|
-
qsort(ha,pivot+1,r) if r > pivot
|
462
|
-
ha
|
463
|
-
end
|
464
|
-
|
465
|
-
def sort!
|
466
|
-
raise "HArray does not currently support sorting with blocks" if block_given?
|
467
|
-
qsort(self,0,self.length-1)
|
468
|
-
end
|
469
|
-
|
470
|
-
def to_a
|
471
|
-
a = []
|
472
|
-
(0..self.length-1).each { |i| a << self.fetch(i) }
|
473
|
-
a
|
474
|
-
end
|
475
|
-
|
476
|
-
def to_ary
|
477
|
-
self
|
478
|
-
end
|
479
|
-
|
480
|
-
def to_h
|
481
|
-
h = Hash.new
|
482
|
-
self.each { |k,v| h[k] = v }
|
483
|
-
h
|
484
|
-
end
|
485
|
-
|
486
|
-
def to_s
|
487
|
-
self.join
|
488
|
-
end
|
489
|
-
|
490
|
-
def uniq
|
491
|
-
nha = HArray.new
|
492
|
-
(0..self.length-1).each do |i|
|
493
|
-
nha[nha.length] = self[i] if !nha.has_value?(self[i])
|
494
|
-
end
|
495
|
-
nha
|
496
|
-
end
|
497
|
-
|
498
|
-
def uniq!
|
499
|
-
j = 0
|
500
|
-
(1..self.length-1).each do |i|
|
501
|
-
if !self[0..j].has_value?(self[i])
|
502
|
-
self[j+1] = self[i]
|
503
|
-
j+=1
|
504
|
-
end
|
505
|
-
end
|
506
|
-
(j+1..self.length-1).each { |i| qdelete(i) }
|
507
|
-
end
|
508
|
-
|
509
|
-
def unshift(e)
|
510
|
-
i = self.length - 1
|
511
|
-
while i >= 0
|
512
|
-
self.set(i+1,self.fetch(i))
|
513
|
-
return i if self.fetch(i) == e
|
514
|
-
i -= 1
|
515
|
-
end
|
516
|
-
self.set(0,e)
|
517
|
-
self
|
518
|
-
end
|
519
|
-
|
520
|
-
def values_at(*ix)
|
521
|
-
nha = HArray.new
|
522
|
-
ix.each {|i| nha[nha.length] = self.at(i)}
|
523
|
-
nha
|
524
|
-
end
|
525
|
-
|
526
|
-
end
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
# _____ _
|
531
|
-
# |_ _|__ ___| |_
|
532
|
-
# | |/ _ \/ __| __|
|
533
|
-
# | | __/\__ \ |_
|
534
|
-
# |_|\___||___/\__|
|
535
|
-
#
|
536
|
-
|
537
|
-
=begin testing
|
538
|
-
|
539
|
-
# This is a mostly complete testcase for HArray.
|
540
|
-
# HArray is tested by comparison to standard Array.
|
541
|
-
|
542
|
-
require 'test/unit'
|
543
|
-
|
544
|
-
class TC_HArray < Test::Unit::TestCase
|
545
|
-
|
546
|
-
def aha(a)
|
547
|
-
return a, HArray[*a]
|
548
|
-
end
|
549
|
-
|
550
|
-
def test_conversions
|
551
|
-
a, ha = aha [1,3,'a',8,nil,[1]]
|
552
|
-
assert_equal(ha, ha.to_ary) # these need to be opposite
|
553
|
-
assert_equal(a, ha.to_a) #
|
554
|
-
assert_equal(a.to_s, ha.to_s)
|
555
|
-
end
|
556
|
-
|
557
|
-
def test_set_operations
|
558
|
-
a, ha = aha [1,3,5,8,9]
|
559
|
-
b, hb = aha [2,3,6,8,9]
|
560
|
-
assert_equal(a | b, (ha | hb).to_a)
|
561
|
-
assert_equal(a & b, (ha & hb).to_a)
|
562
|
-
assert_equal(a + b, (ha + hb).to_a)
|
563
|
-
assert_equal(a - b, (ha - hb).to_a)
|
564
|
-
end
|
565
|
-
|
566
|
-
def test_multiple
|
567
|
-
a, ha = aha [1,3]
|
568
|
-
assert_equal(a*3,(ha*3).to_a)
|
569
|
-
end
|
570
|
-
|
571
|
-
def test_assign
|
572
|
-
a, ha = aha [1,2,3,4]
|
573
|
-
a[1..2] = [8,9]
|
574
|
-
ha[1..2] = [8,9]
|
575
|
-
assert_equal(a, ha.to_a)
|
576
|
-
end
|
577
|
-
def test_assoc
|
578
|
-
a, ha = aha [[1,2],[3,4],[3,6]]
|
579
|
-
assert_equal(a.assoc(3), ha.assoc(3).to_a)
|
580
|
-
end
|
581
|
-
def test_at
|
582
|
-
a, ha = aha [4,5,6,6]
|
583
|
-
assert_equal(a.at(0), ha.at(0))
|
584
|
-
assert_equal(a.at(2), ha.at(2))
|
585
|
-
assert_equal(a.at(4), ha.at(4))
|
586
|
-
assert_equal(a.at(9), ha.at(9))
|
587
|
-
assert_equal(a.at(-1), ha.at(-1))
|
588
|
-
assert_equal(a.at(-3), ha.at(-3))
|
589
|
-
assert_equal(a.at(-4), ha.at(-4))
|
590
|
-
assert_equal(a.at(-5), ha.at(-5))
|
591
|
-
end
|
592
|
-
def test_collect
|
593
|
-
a, ha = aha [4,5,6,6]
|
594
|
-
assert_equal(a.collect{|e|e}, ha.collect{|e|e}.to_a)
|
595
|
-
assert_equal(a.collect!{|e|e}, ha.collect!{|e|e}.to_a)
|
596
|
-
assert_equal(a,ha.to_a)
|
597
|
-
end
|
598
|
-
def test_compact
|
599
|
-
a, ha = aha [4,nil,5,nil,6]
|
600
|
-
assert_equal(a.compact, ha.compact.to_a)
|
601
|
-
end
|
602
|
-
def test_concat
|
603
|
-
a, ha = aha [1,3,5,8,9]
|
604
|
-
b, hb = aha [2,3,6,8,9]
|
605
|
-
assert_equal(a.concat(b),ha.concat(hb).to_a)
|
606
|
-
end
|
607
|
-
def test_count
|
608
|
-
ha = HArray[9,3,9,5,nil,nil,9,3]
|
609
|
-
assert_equal(2,ha.count)
|
610
|
-
assert_equal(2,ha.count(3))
|
611
|
-
assert_equal(3,ha.count{|e|e==9})
|
612
|
-
end
|
613
|
-
def test_delete
|
614
|
-
a, ha = aha [1,3,5,8,9,'a','b','c','c','d']
|
615
|
-
# test delete
|
616
|
-
assert_equal(a.delete(1),ha.delete(1))
|
617
|
-
assert_equal(a,ha.to_a)
|
618
|
-
assert_equal(a.delete('a'),ha.delete('a'))
|
619
|
-
assert_equal(a,ha.to_a)
|
620
|
-
# test delete_at
|
621
|
-
assert_equal(a.delete_at(0),ha.delete_at(0))
|
622
|
-
assert_equal(a,ha.to_a)
|
623
|
-
# test delete_if
|
624
|
-
assert_equal(a.delete_if{|v|v=='c'},ha.delete_if{|v|v=='c'}.to_a)
|
625
|
-
assert_equal(a,ha.to_a)
|
626
|
-
end
|
627
|
-
def test_each
|
628
|
-
a, ha = aha [4,'a',nil,'b']
|
629
|
-
# test each
|
630
|
-
ca, cha = '', ''
|
631
|
-
a.each{|e| ca += e.to_s}
|
632
|
-
ha.each{|e| cha += e.to_s}
|
633
|
-
assert_equal(ca,cha)
|
634
|
-
assert_equal(a,ha.to_a)
|
635
|
-
# test each_index
|
636
|
-
ca, cha = '', ''
|
637
|
-
a.each_index{|i| ca += i.to_s}
|
638
|
-
ha.each_index{|i| cha += i.to_s}
|
639
|
-
assert_equal(ca,cha)
|
640
|
-
assert_equal(a,ha.to_a)
|
641
|
-
end
|
642
|
-
def test_eql?
|
643
|
-
a, ha = aha [4,'a',nil,'b']
|
644
|
-
b, hb = aha [4,'a',nil,'b']
|
645
|
-
assert_equal(a,b)
|
646
|
-
assert_equal(ha,hb)
|
647
|
-
assert_equal(a.eql?(b),ha.eql?(hb))
|
648
|
-
assert_equal(b.eql?(a),hb.eql?(ha))
|
649
|
-
assert(ha.eql?(hb))
|
650
|
-
assert(hb.eql?(ha))
|
651
|
-
end
|
652
|
-
def test_empty?
|
653
|
-
a, ha = aha []
|
654
|
-
assert_equal(a.empty?,ha.empty?)
|
655
|
-
a, ha = aha [1,2,3]
|
656
|
-
assert_equal(a.empty?,ha.empty?)
|
657
|
-
end
|
658
|
-
def test_fill
|
659
|
-
a, ha = aha ['a','b','c','d']
|
660
|
-
assert_equal(a.fill('x'),ha.fill('x').to_a)
|
661
|
-
assert_equal(a,ha.to_a)
|
662
|
-
assert_equal(a.fill('y',2,2),ha.fill('y',2,2).to_a)
|
663
|
-
assert_equal(a,ha.to_a)
|
664
|
-
assert_equal(a.fill('z',0..1),ha.fill('z',0..1).to_a)
|
665
|
-
assert_equal(a,ha.to_a)
|
666
|
-
end
|
667
|
-
def test_first
|
668
|
-
a, ha = aha [2,3,4]
|
669
|
-
assert_equal(a.first,ha.first)
|
670
|
-
end
|
671
|
-
def test_flatten
|
672
|
-
a, ha = aha [2,[3],'a',[[1,2],4],nil,5]
|
673
|
-
assert_equal(a.flatten,ha.flatten.to_a)
|
674
|
-
a, ha = aha [2,[3],'a',[[1,2],4],nil,5]
|
675
|
-
assert_equal(a.flatten!,ha.flatten!.to_a)
|
676
|
-
assert_equal(a,ha.to_a)
|
677
|
-
a, ha = aha [2,3,'a',nil,5]
|
678
|
-
assert_equal(a.flatten!,ha.flatten!)
|
679
|
-
end
|
680
|
-
def test_include?
|
681
|
-
a, ha = aha ['a','b','c','d']
|
682
|
-
assert_equal(a.include?('b'),ha.include?('b'))
|
683
|
-
assert_equal(a.include?('x'),ha.include?('x'))
|
684
|
-
end
|
685
|
-
def test_index
|
686
|
-
a, ha = aha ['a','b','b','c','d']
|
687
|
-
assert_equal(a.index('b'),ha.index('b'))
|
688
|
-
assert_equal(a.index('x'),ha.index('x'))
|
689
|
-
end
|
690
|
-
def test_join
|
691
|
-
a, ha = aha [2,3,4]
|
692
|
-
assert_equal(a.join,ha.join)
|
693
|
-
assert_equal(a.join(','),ha.join(','))
|
694
|
-
end
|
695
|
-
def test_last
|
696
|
-
a, ha = aha [2,3,4]
|
697
|
-
assert_equal(a.last,ha.last)
|
698
|
-
end
|
699
|
-
def test_length
|
700
|
-
a, ha = aha [2,3,4]
|
701
|
-
assert_equal(a.length,ha.length)
|
702
|
-
end
|
703
|
-
def test_map!
|
704
|
-
a, ha = aha [4,5,6,6]
|
705
|
-
assert_equal(a.map!{|e|e}, ha.map!{|e|e}.to_a)
|
706
|
-
assert_equal(a,ha.to_a)
|
707
|
-
end
|
708
|
-
def test_nitems
|
709
|
-
a, ha = aha [4,5,nil,6,nil]
|
710
|
-
assert_equal(a.nitems, ha.nitems)
|
711
|
-
end
|
712
|
-
def test_pop
|
713
|
-
a, ha = aha [4,5,nil,6,nil]
|
714
|
-
assert_equal(a.pop, ha.pop)
|
715
|
-
assert_equal(a, ha.to_a)
|
716
|
-
assert_equal(a.pop, ha.pop)
|
717
|
-
assert_equal(a, ha.to_a)
|
718
|
-
end
|
719
|
-
def test_push
|
720
|
-
a, ha = aha [4,5,nil,6,nil]
|
721
|
-
args = [1,2,3]
|
722
|
-
assert_equal(a.push(*args), ha.push(*args).to_a)
|
723
|
-
assert_equal(a, ha.to_a)
|
724
|
-
end
|
725
|
-
def test_rassoc
|
726
|
-
a, ha = aha [[1,2],[1,3],[1,3]]
|
727
|
-
assert_equal(a.rassoc(3), ha.rassoc(3).to_a)
|
728
|
-
end
|
729
|
-
def test_reject!
|
730
|
-
a, ha = aha ['a','b','c','c','d']
|
731
|
-
assert_equal(a.reject!{|v|v=='c'},ha.reject!{|v|v=='c'}.to_a)
|
732
|
-
assert_equal(a,ha.to_a)
|
733
|
-
assert_equal(a.reject!{|v|v=='x'},ha.reject!{|v|v=='x'})
|
734
|
-
assert_equal(a,ha.to_a)
|
735
|
-
end
|
736
|
-
def test_reverse
|
737
|
-
a, ha = aha ['a','b','c','c','d']
|
738
|
-
assert_equal(a.reverse,ha.reverse.to_a)
|
739
|
-
assert_equal(a.reverse!,ha.reverse!.to_a)
|
740
|
-
assert_equal(a,ha.to_a)
|
741
|
-
a, ha = aha [1,2,3,'a','b','c']
|
742
|
-
assert_equal(a.reverse!,ha.reverse!.to_a)
|
743
|
-
assert_equal(a,ha.to_a)
|
744
|
-
end
|
745
|
-
def test_reverse_each
|
746
|
-
a, ha = aha [4,'a',nil,'b']
|
747
|
-
# test each
|
748
|
-
ca, cha = '', ''
|
749
|
-
a.reverse_each{|e| ca += e.to_s}
|
750
|
-
ha.reverse_each{|e| cha += e.to_s}
|
751
|
-
assert_equal(ca,cha)
|
752
|
-
assert_equal(a,ha.to_a)
|
753
|
-
end
|
754
|
-
def test_rindex
|
755
|
-
a, ha = aha ['a','b','c','c','d']
|
756
|
-
assert_equal(a.rindex('c'),ha.rindex('c'))
|
757
|
-
assert_equal(a.rindex('x'),ha.rindex('x'))
|
758
|
-
end
|
759
|
-
def test_shift
|
760
|
-
a, ha = aha ['a','b','c','c','d']
|
761
|
-
assert_equal(a.shift,ha.shift)
|
762
|
-
assert_equal(a,ha.to_a)
|
763
|
-
end
|
764
|
-
|
765
|
-
def test_slice
|
766
|
-
a, ha = aha [1,2,3,4]
|
767
|
-
# test []
|
768
|
-
assert_equal(a[1], ha[1])
|
769
|
-
assert_equal(a[1..2], ha[1..2].to_a)
|
770
|
-
assert_equal(a[1...2], ha[1...2].to_a)
|
771
|
-
assert_equal(a[1..7], ha[1..7].to_a)
|
772
|
-
assert_equal(a[1,2], ha[1,2].to_a)
|
773
|
-
# test slice
|
774
|
-
assert_equal(a.slice(1), ha.slice(1))
|
775
|
-
assert_equal(a.slice(1..2), ha.slice(1..2).to_a)
|
776
|
-
assert_equal(a.slice(1...2), ha.slice(1...2).to_a)
|
777
|
-
assert_equal(a.slice(1...2), ha.slice(1...2).to_a)
|
778
|
-
assert_equal(a.slice(1,2), ha.slice(1,2).to_a)
|
779
|
-
# test slice!
|
780
|
-
assert_equal(a.slice!(1..2), ha.slice!(1..2).to_a)
|
781
|
-
assert_equal(a, ha.to_a)
|
782
|
-
end
|
783
|
-
|
784
|
-
def test_sort
|
785
|
-
a, ha = aha [1,2,3,4]
|
786
|
-
# test sort
|
787
|
-
assert_equal(a.sort, ha.sort.to_a)
|
788
|
-
#assert_equal(a.sort{|x,y| y<=>x}, ha.sort{|x,y| y<=>x}.to_a)
|
789
|
-
# test sort!
|
790
|
-
assert_equal(a.sort!, ha.sort!.to_a)
|
791
|
-
assert_equal(a, ha.to_a)
|
792
|
-
end
|
793
|
-
|
794
|
-
def test_uniq
|
795
|
-
a, ha = aha [1,1,2,3,3,4,5,6,6]
|
796
|
-
assert_equal(a.uniq, ha.uniq.to_a)
|
797
|
-
end
|
798
|
-
|
799
|
-
def test_uniq!
|
800
|
-
a, ha = aha [1,1,2,3,3,4,5,6,6]
|
801
|
-
a.uniq!; ha.uniq!
|
802
|
-
assert_equal(a, ha.to_a)
|
803
|
-
end
|
804
|
-
|
805
|
-
def test_values_at
|
806
|
-
a, ha = aha ['a','b','c','d']
|
807
|
-
assert_equal(a.values_at(1,3),ha.values_at(1,3).to_a)
|
808
|
-
end
|
809
|
-
|
810
|
-
def test_unshift
|
811
|
-
a, ha = aha ['a','b','c','c','d']
|
812
|
-
assert_equal(a.unshift('x'),ha.unshift('x').to_a)
|
813
|
-
assert_equal(a,ha.to_a)
|
814
|
-
end
|
815
|
-
end
|
816
|
-
|
817
|
-
=end
|