facets-glimmer 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.index +89 -0
- data/.yardopts +10 -0
- data/CONTRIBUTING.md +112 -0
- data/HISTORY.md +2497 -0
- data/LICENSE.txt +26 -0
- data/NOTICE.rdoc +167 -0
- data/README.md +305 -0
- data/demo/applique/assertion_framework.rb +1 -0
- data/demo/applique/file_helpers.rb +34 -0
- data/demo/core/array/after.md +13 -0
- data/demo/core/array/arrange.md +17 -0
- data/demo/core/array/before.md +14 -0
- data/demo/core/array/collapse.md +15 -0
- data/demo/core/array/collisions.md +30 -0
- data/demo/core/array/commonality.md +31 -0
- data/demo/core/array/conjoin.md +47 -0
- data/demo/core/array/contains.md +9 -0
- data/demo/core/array/delete_unless.md +13 -0
- data/demo/core/array/delete_values.md +10 -0
- data/demo/core/array/delete_values_at.md +15 -0
- data/demo/core/array/divide.md +14 -0
- data/demo/core/array/duplicates.md +14 -0
- data/demo/core/array/each_overlap.md +12 -0
- data/demo/core/array/each_pair.md +13 -0
- data/demo/core/array/each_value.md +12 -0
- data/demo/core/array/entropy.md +13 -0
- data/demo/core/array/extract_options.md +13 -0
- data/demo/core/array/first.md +11 -0
- data/demo/core/array/from.md +11 -0
- data/demo/core/array/ideal_entropy.md +11 -0
- data/demo/core/array/intersection.md +11 -0
- data/demo/core/array/last.md +11 -0
- data/demo/core/array/median.md +23 -0
- data/demo/core/array/merge.md +15 -0
- data/demo/core/array/missing.md +10 -0
- data/demo/core/array/mode.md +9 -0
- data/demo/core/array/nonuniq.md +16 -0
- data/demo/core/array/not_empty.md +8 -0
- data/demo/core/array/occur.md +18 -0
- data/demo/core/array/occurrence.md +13 -0
- data/demo/core/array/only.md +9 -0
- data/demo/core/array/op_pow.md +10 -0
- data/demo/core/array/pad.md +28 -0
- data/demo/core/array/peek.md +10 -0
- data/demo/core/array/poke.md +15 -0
- data/demo/core/array/probability +8 -0
- data/demo/core/array/pull.md +10 -0
- data/demo/core/array/recurse.md +10 -0
- data/demo/core/array/recursively.md +20 -0
- data/demo/core/array/reject_values.md +10 -0
- data/demo/core/array/span.md +16 -0
- data/demo/core/array/splice.md +14 -0
- data/demo/core/array/split.md +13 -0
- data/demo/core/array/split_at.md +12 -0
- data/demo/core/array/squeeze.md +14 -0
- data/demo/core/array/step.md +16 -0
- data/demo/core/array/store.md +9 -0
- data/demo/core/array/thru.md +12 -0
- data/demo/core/array/to_h.md +11 -0
- data/demo/core/array/traverse.md +20 -0
- data/demo/core/array/uniq_by.md +16 -0
- data/demo/core/array/unique_permutation.md +14 -0
- data/demo/core/array/zip.md +8 -0
- data/demo/core/binding/caller.md +57 -0
- data/demo/core/binding/defined.md +10 -0
- data/demo/core/binding/opvars.md +16 -0
- data/demo/core/binding/self.md +6 -0
- data/demo/core/class/descendants.md +13 -0
- data/demo/core/class/to_proc.md +11 -0
- data/demo/core/comparable/at_least.md +11 -0
- data/demo/core/comparable/at_most.md +11 -0
- data/demo/core/comparable/bound.md +13 -0
- data/demo/core/comparable/cap.md +11 -0
- data/demo/core/comparable/clip.md +29 -0
- data/demo/core/comparable/cmp.md +18 -0
- data/demo/core/comparable/op_get.md +32 -0
- data/demo/core/dir/ascend.md +24 -0
- data/demo/core/dir/descend.md +16 -0
- data/demo/core/dir/multiglob.md +41 -0
- data/demo/core/dir/parent.md +6 -0
- data/demo/core/dir/recurse.md +41 -0
- data/demo/core/exception/detail.md +19 -0
- data/demo/core/facets.md +6 -0
- data/demo/core/filetest/root.md +13 -0
- data/demo/core/hash/recursively.md +21 -0
- data/demo/core/indexable.md +95 -0
- data/demo/core/integer/bitmask.md +46 -0
- data/demo/core/integer/factorial.md +10 -0
- data/demo/core/integer/length.md +7 -0
- data/demo/core/integer/multiple.md +12 -0
- data/demo/core/integer/of.md +11 -0
- data/demo/core/integer/ordinal.md +11 -0
- data/demo/core/integer/times_collect.md +9 -0
- data/demo/core/matchdata/match.md +7 -0
- data/demo/core/matchdata/matchset.md +7 -0
- data/demo/core/matchdata/matchtree.md +10 -0
- data/demo/core/module/cattr.md +43 -0
- data/demo/core/module/class_extend.md +64 -0
- data/demo/core/module/class_inheritor.md +126 -0
- data/demo/core/module/copy_inheritor.md +30 -0
- data/demo/core/module/include_as.md +31 -0
- data/demo/core/module/method_space.md +24 -0
- data/demo/core/string/acronym.md +9 -0
- data/demo/core/string/align.md +34 -0
- data/demo/core/string/ascii_only.md +37 -0
- data/demo/core/string/bracket.md +35 -0
- data/demo/core/string/camelcase.md +47 -0
- data/demo/core/string/capitalized.md +27 -0
- data/demo/core/string/cleanlines.md +10 -0
- data/demo/core/string/cleave.md +49 -0
- data/demo/core/string/compress_lines.md +22 -0
- data/demo/core/string/crypt.md +15 -0
- data/demo/core/string/divide.md +9 -0
- data/demo/core/string/each_word.md +11 -0
- data/demo/core/string/edit_distance.md +15 -0
- data/demo/core/string/exclude.md +15 -0
- data/demo/core/string/expand_tabs.md +69 -0
- data/demo/core/string/fold.md +14 -0
- data/demo/core/string/indent.md +65 -0
- data/demo/core/string/index_all.md +14 -0
- data/demo/core/string/interpolate.md +8 -0
- data/demo/core/string/lchomp.md +14 -0
- data/demo/core/string/line_wrap.md +7 -0
- data/demo/core/string/lowercase.md +12 -0
- data/demo/core/string/methodize.md +22 -0
- data/demo/core/string/modulize.md +22 -0
- data/demo/core/string/mscan.md +10 -0
- data/demo/core/string/natcmp.md +10 -0
- data/demo/core/string/nchar.md +9 -0
- data/demo/core/string/newlines.md +9 -0
- data/demo/core/string/number.md +27 -0
- data/demo/core/string/op_div.md +10 -0
- data/demo/core/string/op_sub.md +7 -0
- data/demo/core/string/pathize.md +22 -0
- data/demo/core/string/quote.md +20 -0
- data/demo/core/string/random.md +25 -0
- data/demo/core/string/range.md +19 -0
- data/demo/core/string/remove.md +33 -0
- data/demo/core/string/rewrite.md +9 -0
- data/demo/core/string/shatter.md +9 -0
- data/demo/core/string/similarity.md +12 -0
- data/demo/core/string/snakecase.md +14 -0
- data/demo/core/string/splice.md +28 -0
- data/demo/core/string/squish.md +27 -0
- data/demo/core/string/store.md +10 -0
- data/demo/core/string/subtract.md +8 -0
- data/demo/core/string/titlecase.md +8 -0
- data/demo/core/string/to_re.md +22 -0
- data/demo/core/string/trim.md +92 -0
- data/demo/core/string/unbracket.md +24 -0
- data/demo/core/string/underscore.md +17 -0
- data/demo/core/string/unfold.md +9 -0
- data/demo/core/string/unindent.md +65 -0
- data/demo/core/string/unquote.md +6 -0
- data/demo/core/string/uppercase.md +15 -0
- data/demo/core/string/variablize.md +7 -0
- data/demo/core/string/word_wrap.md +54 -0
- data/demo/core/string/words.md +13 -0
- data/demo/core/string/xor.md +8 -0
- data/demo/standard/02_cloneable.rdoc +46 -0
- data/demo/standard/03_enumargs.rdoc +75 -0
- data/demo/standard/04_equitable.rdoc +35 -0
- data/demo/standard/05_instantiable.rdoc +42 -0
- data/demo/standard/date/comparison.md +33 -0
- data/demo/standard/memoizable.rdoc +134 -0
- data/demo/standard/mulititon.rdoc +156 -0
- data/lib/core/facets/applique/file_helpers.rb +33 -0
- data/lib/core/facets/array/after.rb +1 -0
- data/lib/core/facets/array/arrange.rb +42 -0
- data/lib/core/facets/array/average.rb +15 -0
- data/lib/core/facets/array/before.rb +41 -0
- data/lib/core/facets/array/collapse.rb +18 -0
- data/lib/core/facets/array/collisions.rb +1 -0
- data/lib/core/facets/array/commonality.rb +49 -0
- data/lib/core/facets/array/conjoin.rb +89 -0
- data/lib/core/facets/array/contains.rb +7 -0
- data/lib/core/facets/array/delete.rb +4 -0
- data/lib/core/facets/array/delete_unless.rb +15 -0
- data/lib/core/facets/array/delete_values.rb +50 -0
- data/lib/core/facets/array/delete_values_at.rb +1 -0
- data/lib/core/facets/array/divide.rb +27 -0
- data/lib/core/facets/array/duplicates.rb +24 -0
- data/lib/core/facets/array/each_overlap.rb +25 -0
- data/lib/core/facets/array/each_pair.rb +11 -0
- data/lib/core/facets/array/each_value.rb +6 -0
- data/lib/core/facets/array/entropy.rb +39 -0
- data/lib/core/facets/array/extract_options.rb +31 -0
- data/lib/core/facets/array/first.rb +1 -0
- data/lib/core/facets/array/from.rb +28 -0
- data/lib/core/facets/array/indexable.rb +31 -0
- data/lib/core/facets/array/intersection.rb +25 -0
- data/lib/core/facets/array/last.rb +1 -0
- data/lib/core/facets/array/median.rb +32 -0
- data/lib/core/facets/array/merge.rb +22 -0
- data/lib/core/facets/array/missing.rb +29 -0
- data/lib/core/facets/array/mode.rb +22 -0
- data/lib/core/facets/array/nonuniq.rb +28 -0
- data/lib/core/facets/array/not_empty.rb +13 -0
- data/lib/core/facets/array/occur.rb +38 -0
- data/lib/core/facets/array/occurrence.rb +29 -0
- data/lib/core/facets/array/only.rb +37 -0
- data/lib/core/facets/array/op_pow.rb +12 -0
- data/lib/core/facets/array/pad.rb +41 -0
- data/lib/core/facets/array/peek.rb +1 -0
- data/lib/core/facets/array/poke.rb +1 -0
- data/lib/core/facets/array/probability.rb +39 -0
- data/lib/core/facets/array/pull.rb +30 -0
- data/lib/core/facets/array/recurse.rb +29 -0
- data/lib/core/facets/array/recursively.rb +53 -0
- data/lib/core/facets/array/reject_values.rb +21 -0
- data/lib/core/facets/array/span.rb +24 -0
- data/lib/core/facets/array/splice.rb +31 -0
- data/lib/core/facets/array/split.rb +30 -0
- data/lib/core/facets/array/split_at.rb +25 -0
- data/lib/core/facets/array/squeeze.rb +23 -0
- data/lib/core/facets/array/standard_deviation.rb +23 -0
- data/lib/core/facets/array/step.rb +31 -0
- data/lib/core/facets/array/store.rb +16 -0
- data/lib/core/facets/array/thru.rb +1 -0
- data/lib/core/facets/array/to_h.rb +19 -0
- data/lib/core/facets/array/traverse.rb +50 -0
- data/lib/core/facets/array/uniq_by.rb +24 -0
- data/lib/core/facets/array/unique_permutation.rb +29 -0
- data/lib/core/facets/array/variance.rb +20 -0
- data/lib/core/facets/array/zip.rb +21 -0
- data/lib/core/facets/array.rb +49 -0
- data/lib/core/facets/binding/__callee__.rb +1 -0
- data/lib/core/facets/binding/__method__.rb +1 -0
- data/lib/core/facets/binding/call_stack.rb +1 -0
- data/lib/core/facets/binding/caller.rb +42 -0
- data/lib/core/facets/binding/callstack.rb +1 -0
- data/lib/core/facets/binding/defined.rb +10 -0
- data/lib/core/facets/binding/op.rb +4 -0
- data/lib/core/facets/binding/op_get.rb +25 -0
- data/lib/core/facets/binding/op_set.rb +1 -0
- data/lib/core/facets/binding/self.rb +15 -0
- data/lib/core/facets/binding/with.rb +12 -0
- data/lib/core/facets/binding.rb +12 -0
- data/lib/core/facets/boolean.rb +121 -0
- data/lib/core/facets/cattr.rb +1 -0
- data/lib/core/facets/class/cattr.rb +1 -0
- data/lib/core/facets/class/descendants.rb +36 -0
- data/lib/core/facets/class/hierarchically.rb +12 -0
- data/lib/core/facets/class/methodize.rb +19 -0
- data/lib/core/facets/class/pathize.rb +19 -0
- data/lib/core/facets/class/preallocate.rb +55 -0
- data/lib/core/facets/class/singleton.rb +1 -0
- data/lib/core/facets/class/singleton_class.rb +16 -0
- data/lib/core/facets/class/subclasses.rb +26 -0
- data/lib/core/facets/class/to_proc.rb +25 -0
- data/lib/core/facets/class.rb +9 -0
- data/lib/core/facets/comparable/at_least.rb +1 -0
- data/lib/core/facets/comparable/at_most.rb +1 -0
- data/lib/core/facets/comparable/bound.rb +1 -0
- data/lib/core/facets/comparable/cap.rb +34 -0
- data/lib/core/facets/comparable/clip.rb +38 -0
- data/lib/core/facets/comparable/cmp.rb +41 -0
- data/lib/core/facets/comparable/op_get.rb +45 -0
- data/lib/core/facets/comparable.rb +8 -0
- data/lib/core/facets/denumerable.rb +77 -0
- data/lib/core/facets/dir/ascend.rb +56 -0
- data/lib/core/facets/dir/descend.rb +1 -0
- data/lib/core/facets/dir/each_child.rb +16 -0
- data/lib/core/facets/dir/lookup.rb +20 -0
- data/lib/core/facets/dir/multiglob.rb +78 -0
- data/lib/core/facets/dir/parent.rb +16 -0
- data/lib/core/facets/dir/recurse.rb +35 -0
- data/lib/core/facets/dir.rb +7 -0
- data/lib/core/facets/enumerable/accumulate.rb +67 -0
- data/lib/core/facets/enumerable/apply.rb +20 -0
- data/lib/core/facets/enumerable/associate.rb +6 -0
- data/lib/core/facets/enumerable/cluster.rb +26 -0
- data/lib/core/facets/enumerable/collect_with_index.rb +2 -0
- data/lib/core/facets/enumerable/compact_map.rb +36 -0
- data/lib/core/facets/enumerable/defer.rb +46 -0
- data/lib/core/facets/enumerable/each_by.rb +33 -0
- data/lib/core/facets/enumerable/every.rb +40 -0
- data/lib/core/facets/enumerable/ewise.rb +61 -0
- data/lib/core/facets/enumerable/exclude.rb +16 -0
- data/lib/core/facets/enumerable/expand.rb +15 -0
- data/lib/core/facets/enumerable/filter.rb +33 -0
- data/lib/core/facets/enumerable/find_yield.rb +42 -0
- data/lib/core/facets/enumerable/frequency.rb +24 -0
- data/lib/core/facets/enumerable/graph.rb +34 -0
- data/lib/core/facets/enumerable/hashify.rb +230 -0
- data/lib/core/facets/enumerable/hinge.rb +18 -0
- data/lib/core/facets/enumerable/incase.rb +19 -0
- data/lib/core/facets/enumerable/key_by.rb +27 -0
- data/lib/core/facets/enumerable/map_by.rb +35 -0
- data/lib/core/facets/enumerable/map_detect.rb +1 -0
- data/lib/core/facets/enumerable/map_send.rb +26 -0
- data/lib/core/facets/enumerable/map_to.rb +13 -0
- data/lib/core/facets/enumerable/map_with.rb +21 -0
- data/lib/core/facets/enumerable/map_with_index.rb +23 -0
- data/lib/core/facets/enumerable/mash.rb +34 -0
- data/lib/core/facets/enumerable/modulate.rb +22 -0
- data/lib/core/facets/enumerable/occur.rb +41 -0
- data/lib/core/facets/enumerable/only.rb +56 -0
- data/lib/core/facets/enumerable/organize_by.rb +19 -0
- data/lib/core/facets/enumerable/pair.rb +20 -0
- data/lib/core/facets/enumerable/per.rb +77 -0
- data/lib/core/facets/enumerable/purge.rb +43 -0
- data/lib/core/facets/enumerable/recursively.rb +66 -0
- data/lib/core/facets/enumerable/squeeze.rb +36 -0
- data/lib/core/facets/enumerable/sum.rb +40 -0
- data/lib/core/facets/enumerable/unassociate.rb +23 -0
- data/lib/core/facets/enumerable/uniq_by.rb +13 -0
- data/lib/core/facets/enumerable/value_by.rb +25 -0
- data/lib/core/facets/enumerable/visit.rb +30 -0
- data/lib/core/facets/enumerable/with_position.rb +58 -0
- data/lib/core/facets/enumerable/zip_map.rb +1 -0
- data/lib/core/facets/enumerable.rb +40 -0
- data/lib/core/facets/enumerator/fx.rb +27 -0
- data/lib/core/facets/enumerator/lazy/squeeze.rb +33 -0
- data/lib/core/facets/enumerator.rb +75 -0
- data/lib/core/facets/essentials.rb +65 -0
- data/lib/core/facets/exception/detail.rb +17 -0
- data/lib/core/facets/exception/error_print.rb +80 -0
- data/lib/core/facets/exception/raised.rb +14 -0
- data/lib/core/facets/exception/set_message.rb +10 -0
- data/lib/core/facets/exception/suppress.rb +22 -0
- data/lib/core/facets/exception.rb +4 -0
- data/lib/core/facets/file/append.rb +14 -0
- data/lib/core/facets/file/atomic_id.rb +9 -0
- data/lib/core/facets/file/atomic_open.rb +26 -0
- data/lib/core/facets/file/atomic_write.rb +58 -0
- data/lib/core/facets/file/common_path.rb +17 -0
- data/lib/core/facets/file/create.rb +21 -0
- data/lib/core/facets/file/ext.rb +36 -0
- data/lib/core/facets/file/null.rb +21 -0
- data/lib/core/facets/file/read_binary.rb +18 -0
- data/lib/core/facets/file/read_list.rb +34 -0
- data/lib/core/facets/file/rewrite.rb +90 -0
- data/lib/core/facets/file/rootname.rb +23 -0
- data/lib/core/facets/file/sanitize.rb +18 -0
- data/lib/core/facets/file/split_all.rb +19 -0
- data/lib/core/facets/file/split_root.rb +13 -0
- data/lib/core/facets/file/write.rb +24 -0
- data/lib/core/facets/file/writelines.rb +27 -0
- data/lib/core/facets/file.rb +16 -0
- data/lib/core/facets/filetest/absolute.rb +1 -0
- data/lib/core/facets/filetest/contains.rb +12 -0
- data/lib/core/facets/filetest/relative.rb +38 -0
- data/lib/core/facets/filetest/root.rb +17 -0
- data/lib/core/facets/filetest/safe.rb +24 -0
- data/lib/core/facets/filetest/separator_pattern.rb +19 -0
- data/lib/core/facets/filetest.rb +7 -0
- data/lib/core/facets/float/round_to.rb +1 -0
- data/lib/core/facets/float.rb +2 -0
- data/lib/core/facets/functor.rb +92 -0
- data/lib/core/facets/hash/alias.rb +31 -0
- data/lib/core/facets/hash/argumentize.rb +28 -0
- data/lib/core/facets/hash/at.rb +8 -0
- data/lib/core/facets/hash/autonew.rb +24 -0
- data/lib/core/facets/hash/collate.rb +49 -0
- data/lib/core/facets/hash/count.rb +16 -0
- data/lib/core/facets/hash/data.rb +44 -0
- data/lib/core/facets/hash/dearray_values.rb +46 -0
- data/lib/core/facets/hash/deep_merge.rb +33 -0
- data/lib/core/facets/hash/deep_rekey.rb +54 -0
- data/lib/core/facets/hash/delete.rb +4 -0
- data/lib/core/facets/hash/delete_at.rb +7 -0
- data/lib/core/facets/hash/delete_unless.rb +17 -0
- data/lib/core/facets/hash/delete_values.rb +41 -0
- data/lib/core/facets/hash/diff.rb +17 -0
- data/lib/core/facets/hash/each_with_key.rb +12 -0
- data/lib/core/facets/hash/except.rb +37 -0
- data/lib/core/facets/hash/fetch_nested.rb +20 -0
- data/lib/core/facets/hash/graph.rb +18 -0
- data/lib/core/facets/hash/insert.rb +19 -0
- data/lib/core/facets/hash/inverse.rb +30 -0
- data/lib/core/facets/hash/join.rb +17 -0
- data/lib/core/facets/hash/keys.rb +36 -0
- data/lib/core/facets/hash/mash.rb +1 -0
- data/lib/core/facets/hash/new_with.rb +15 -0
- data/lib/core/facets/hash/only_keys.rb +1 -0
- data/lib/core/facets/hash/op.rb +7 -0
- data/lib/core/facets/hash/op_add.rb +12 -0
- data/lib/core/facets/hash/op_and.rb +33 -0
- data/lib/core/facets/hash/op_mul.rb +18 -0
- data/lib/core/facets/hash/op_or.rb +12 -0
- data/lib/core/facets/hash/op_push.rb +25 -0
- data/lib/core/facets/hash/op_sub.rb +27 -0
- data/lib/core/facets/hash/recurse.rb +29 -0
- data/lib/core/facets/hash/recursively.rb +61 -0
- data/lib/core/facets/hash/rekey.rb +81 -0
- data/lib/core/facets/hash/replace_each.rb +16 -0
- data/lib/core/facets/hash/revalue.rb +61 -0
- data/lib/core/facets/hash/reverse_merge.rb +30 -0
- data/lib/core/facets/hash/slice.rb +49 -0
- data/lib/core/facets/hash/stringify_keys.rb +1 -0
- data/lib/core/facets/hash/subset.rb +27 -0
- data/lib/core/facets/hash/swap.rb +17 -0
- data/lib/core/facets/hash/symbolize_keys.rb +92 -0
- data/lib/core/facets/hash/to_mod.rb +33 -0
- data/lib/core/facets/hash/to_options.rb +1 -0
- data/lib/core/facets/hash/to_proc.rb +39 -0
- data/lib/core/facets/hash/to_struct.rb +17 -0
- data/lib/core/facets/hash/traverse.rb +47 -0
- data/lib/core/facets/hash/update.rb +6 -0
- data/lib/core/facets/hash/update_each.rb +18 -0
- data/lib/core/facets/hash/update_keys.rb +21 -0
- data/lib/core/facets/hash/update_values.rb +20 -0
- data/lib/core/facets/hash/weave.rb +76 -0
- data/lib/core/facets/hash/zip.rb +18 -0
- data/lib/core/facets/hash.rb +53 -0
- data/lib/core/facets/indexable.rb +270 -0
- data/lib/core/facets/integer/bit.rb +1 -0
- data/lib/core/facets/integer/bitmask.rb +99 -0
- data/lib/core/facets/integer/factorial.rb +21 -0
- data/lib/core/facets/integer/multiple.rb +19 -0
- data/lib/core/facets/integer/of.rb +18 -0
- data/lib/core/facets/integer/ordinal.rb +24 -0
- data/lib/core/facets/integer/roman.rb +1 -0
- data/lib/core/facets/integer.rb +8 -0
- data/lib/core/facets/kernel/__class__.rb +9 -0
- data/lib/core/facets/kernel/__dir__.rb +28 -0
- data/lib/core/facets/kernel/__get__.rb +15 -0
- data/lib/core/facets/kernel/__set__.rb +1 -0
- data/lib/core/facets/kernel/as.rb +116 -0
- data/lib/core/facets/kernel/ask.rb +28 -0
- data/lib/core/facets/kernel/assign.rb +74 -0
- data/lib/core/facets/kernel/assign_from.rb +1 -0
- data/lib/core/facets/kernel/attr_singleton.rb +59 -0
- data/lib/core/facets/kernel/blank.rb +84 -0
- data/lib/core/facets/kernel/call_stack.rb +1 -0
- data/lib/core/facets/kernel/callstack.rb +56 -0
- data/lib/core/facets/kernel/case.rb +8 -0
- data/lib/core/facets/kernel/complete.rb +26 -0
- data/lib/core/facets/kernel/d.rb +27 -0
- data/lib/core/facets/kernel/deep_clone.rb +27 -0
- data/lib/core/facets/kernel/deep_copy.rb +14 -0
- data/lib/core/facets/kernel/demo.rb +30 -0
- data/lib/core/facets/kernel/disable_warnings.rb +26 -0
- data/lib/core/facets/kernel/eigen.rb +2 -0
- data/lib/core/facets/kernel/eigenclass.rb +24 -0
- data/lib/core/facets/kernel/enable_warnings.rb +1 -0
- data/lib/core/facets/kernel/ergo.rb +43 -0
- data/lib/core/facets/kernel/extend.rb +28 -0
- data/lib/core/facets/kernel/extension.rb +12 -0
- data/lib/core/facets/kernel/false.rb +2 -0
- data/lib/core/facets/kernel/here.rb +11 -0
- data/lib/core/facets/kernel/hierarchical_send.rb +44 -0
- data/lib/core/facets/kernel/identical.rb +4 -0
- data/lib/core/facets/kernel/in.rb +13 -0
- data/lib/core/facets/kernel/instance_assign.rb +22 -0
- data/lib/core/facets/kernel/instance_class.rb +26 -0
- data/lib/core/facets/kernel/instance_exec.rb +47 -0
- data/lib/core/facets/kernel/instance_extract.rb +22 -0
- data/lib/core/facets/kernel/instance_replace.rb +40 -0
- data/lib/core/facets/kernel/instance_send.rb +7 -0
- data/lib/core/facets/kernel/like.rb +19 -0
- data/lib/core/facets/kernel/load_all.rb +1 -0
- data/lib/core/facets/kernel/load_relative.rb +25 -0
- data/lib/core/facets/kernel/maybe.rb +19 -0
- data/lib/core/facets/kernel/memo.rb +44 -0
- data/lib/core/facets/kernel/meta.rb +35 -0
- data/lib/core/facets/kernel/meta_alias.rb +23 -0
- data/lib/core/facets/kernel/meta_class.rb +17 -0
- data/lib/core/facets/kernel/meta_def.rb +24 -0
- data/lib/core/facets/kernel/meta_eval.rb +20 -0
- data/lib/core/facets/kernel/method.rb +50 -0
- data/lib/core/facets/kernel/no.rb +1 -0
- data/lib/core/facets/kernel/not.rb +37 -0
- data/lib/core/facets/kernel/not_nil.rb +18 -0
- data/lib/core/facets/kernel/object_class.rb +10 -0
- data/lib/core/facets/kernel/object_hexid.rb +33 -0
- data/lib/core/facets/kernel/object_send.rb +30 -0
- data/lib/core/facets/kernel/p.rb +24 -0
- data/lib/core/facets/kernel/presence.rb +1 -0
- data/lib/core/facets/kernel/present.rb +1 -0
- data/lib/core/facets/kernel/qua_class.rb +31 -0
- data/lib/core/facets/kernel/require_all.rb +42 -0
- data/lib/core/facets/kernel/respond.rb +32 -0
- data/lib/core/facets/kernel/returning.rb +27 -0
- data/lib/core/facets/kernel/silence.rb +73 -0
- data/lib/core/facets/kernel/silence_warnings.rb +1 -0
- data/lib/core/facets/kernel/singleton_class.rb +10 -0
- data/lib/core/facets/kernel/super_method.rb +11 -0
- data/lib/core/facets/kernel/tap.rb +36 -0
- data/lib/core/facets/kernel/temporarily.rb +23 -0
- data/lib/core/facets/kernel/trap_chain.rb +28 -0
- data/lib/core/facets/kernel/true.rb +26 -0
- data/lib/core/facets/kernel/try.rb +58 -0
- data/lib/core/facets/kernel/val.rb +19 -0
- data/lib/core/facets/kernel/with.rb +20 -0
- data/lib/core/facets/kernel/writers.rb +91 -0
- data/lib/core/facets/kernel/y.rb +23 -0
- data/lib/core/facets/kernel/yes.rb +25 -0
- data/lib/core/facets/kernel.rb +75 -0
- data/lib/core/facets/lazy.rb +237 -0
- data/lib/core/facets/load_path/search.rb +16 -0
- data/lib/core/facets/load_path.rb +1 -0
- data/lib/core/facets/matchdata/match.rb +15 -0
- data/lib/core/facets/matchdata/matchset.rb +44 -0
- data/lib/core/facets/matchdata/matchtree.rb +2 -0
- data/lib/core/facets/matchdata.rb +3 -0
- data/lib/core/facets/metaid.rb +7 -0
- data/lib/core/facets/method/composition.rb +96 -0
- data/lib/core/facets/method/curry.rb +13 -0
- data/lib/core/facets/method/memoize.rb +17 -0
- data/lib/core/facets/method/op_mul.rb +1 -0
- data/lib/core/facets/method/op_pow.rb +1 -0
- data/lib/core/facets/method/partial.rb +10 -0
- data/lib/core/facets/method/public.rb +33 -0
- data/lib/core/facets/method.rb +5 -0
- data/lib/core/facets/module/abstract.rb +24 -0
- data/lib/core/facets/module/alias_accessor.rb +45 -0
- data/lib/core/facets/module/alias_class_method.rb +11 -0
- data/lib/core/facets/module/alias_method_chain.rb +67 -0
- data/lib/core/facets/module/alias_module_function.rb +30 -0
- data/lib/core/facets/module/all_instance_methods.rb +19 -0
- data/lib/core/facets/module/ancestor.rb +16 -0
- data/lib/core/facets/module/anonymous.rb +25 -0
- data/lib/core/facets/module/attr_class_accessor.rb +51 -0
- data/lib/core/facets/module/attr_setter.rb +52 -0
- data/lib/core/facets/module/attr_tester.rb +56 -0
- data/lib/core/facets/module/attr_validator.rb +46 -0
- data/lib/core/facets/module/basename.rb +1 -0
- data/lib/core/facets/module/can.rb +20 -0
- data/lib/core/facets/module/cattr.rb +1 -0
- data/lib/core/facets/module/class.rb +12 -0
- data/lib/core/facets/module/class_accessor.rb +46 -0
- data/lib/core/facets/module/class_def.rb +2 -0
- data/lib/core/facets/module/class_extend.rb +92 -0
- data/lib/core/facets/module/class_inheritor.rb +80 -0
- data/lib/core/facets/module/class_method_defined.rb +1 -0
- data/lib/core/facets/module/copy_inheritor.rb +45 -0
- data/lib/core/facets/module/enclosure.rb +94 -0
- data/lib/core/facets/module/enclosures.rb +1 -0
- data/lib/core/facets/module/extend.rb +1 -0
- data/lib/core/facets/module/home.rb +90 -0
- data/lib/core/facets/module/homename.rb +1 -0
- data/lib/core/facets/module/housing.rb +1 -0
- data/lib/core/facets/module/include_as.rb +1 -0
- data/lib/core/facets/module/include_function_module.rb +25 -0
- data/lib/core/facets/module/instance_function.rb +94 -0
- data/lib/core/facets/module/instance_method.rb +25 -0
- data/lib/core/facets/module/instance_method_defined.rb +23 -0
- data/lib/core/facets/module/integrate.rb +49 -0
- data/lib/core/facets/module/is.rb +57 -0
- data/lib/core/facets/module/lastname.rb +30 -0
- data/lib/core/facets/module/let.rb +31 -0
- data/lib/core/facets/module/mattr.rb +296 -0
- data/lib/core/facets/module/memoize.rb +16 -0
- data/lib/core/facets/module/method_clash.rb +66 -0
- data/lib/core/facets/module/method_space.rb +107 -0
- data/lib/core/facets/module/methodize.rb +20 -0
- data/lib/core/facets/module/modname.rb +1 -0
- data/lib/core/facets/module/module_def.rb +31 -0
- data/lib/core/facets/module/module_load.rb +83 -0
- data/lib/core/facets/module/nodef.rb +13 -0
- data/lib/core/facets/module/op.rb +107 -0
- data/lib/core/facets/module/op_add.rb +1 -0
- data/lib/core/facets/module/op_mul.rb +1 -0
- data/lib/core/facets/module/op_sub.rb +1 -0
- data/lib/core/facets/module/pathize.rb +20 -0
- data/lib/core/facets/module/preextend.rb +32 -0
- data/lib/core/facets/module/redefine_method.rb +37 -0
- data/lib/core/facets/module/redirect_method.rb +46 -0
- data/lib/core/facets/module/remove.rb +1 -0
- data/lib/core/facets/module/rename_method.rb +30 -0
- data/lib/core/facets/module/revise.rb +41 -0
- data/lib/core/facets/module/set.rb +36 -0
- data/lib/core/facets/module/singleton_method_defined.rb +1 -0
- data/lib/core/facets/module/spacename.rb +25 -0
- data/lib/core/facets/module/to_obj.rb +20 -0
- data/lib/core/facets/module/wrap_method.rb +35 -0
- data/lib/core/facets/module.rb +60 -0
- data/lib/core/facets/na.rb +21 -0
- data/lib/core/facets/nilclass/ergo.rb +1 -0
- data/lib/core/facets/nilclass.rb +2 -0
- data/lib/core/facets/numeric/approx.rb +39 -0
- data/lib/core/facets/numeric/close.rb +1 -0
- data/lib/core/facets/numeric/delimit.rb +20 -0
- data/lib/core/facets/numeric/distance.rb +14 -0
- data/lib/core/facets/numeric/length.rb +10 -0
- data/lib/core/facets/numeric/negative.rb +1 -0
- data/lib/core/facets/numeric/positive.rb +15 -0
- data/lib/core/facets/numeric/range.rb +12 -0
- data/lib/core/facets/numeric/round_to.rb +32 -0
- data/lib/core/facets/numeric/spacing.rb +20 -0
- data/lib/core/facets/numeric.rb +8 -0
- data/lib/core/facets/object/clone.rb +1 -0
- data/lib/core/facets/object/dup.rb +79 -0
- data/lib/core/facets/object/itself.rb +16 -0
- data/lib/core/facets/object/object_state.rb +77 -0
- data/lib/core/facets/object/try_dup.rb +1 -0
- data/lib/core/facets/object.rb +7 -0
- data/lib/core/facets/objectspace/classes.rb +11 -0
- data/lib/core/facets/objectspace/op_fetch.rb +3 -0
- data/lib/core/facets/objectspace.rb +3 -0
- data/lib/core/facets/proc/bind.rb +24 -0
- data/lib/core/facets/proc/bind_to.rb +17 -0
- data/lib/core/facets/proc/compose.rb +42 -0
- data/lib/core/facets/proc/partial.rb +33 -0
- data/lib/core/facets/proc/to_method.rb +38 -0
- data/lib/core/facets/proc/update.rb +9 -0
- data/lib/core/facets/proc/wrap.rb +17 -0
- data/lib/core/facets/proc.rb +7 -0
- data/lib/core/facets/process/daemon.rb +32 -0
- data/lib/core/facets/process.rb +2 -0
- data/lib/core/facets/range/combine.rb +47 -0
- data/lib/core/facets/range/nudge.rb +27 -0
- data/lib/core/facets/range/op_add.rb +15 -0
- data/lib/core/facets/range/op_sub.rb +45 -0
- data/lib/core/facets/range/overlap.rb +12 -0
- data/lib/core/facets/range/quantile.rb +18 -0
- data/lib/core/facets/range/to_rng.rb +26 -0
- data/lib/core/facets/range/umbrella.rb +1 -0
- data/lib/core/facets/range/within.rb +64 -0
- data/lib/core/facets/range.rb +9 -0
- data/lib/core/facets/regexp/arity.rb +17 -0
- data/lib/core/facets/regexp/multiline.rb +13 -0
- data/lib/core/facets/regexp/op_add.rb +18 -0
- data/lib/core/facets/regexp/op_or.rb +15 -0
- data/lib/core/facets/regexp/to_proc.rb +13 -0
- data/lib/core/facets/regexp/to_re.rb +28 -0
- data/lib/core/facets/regexp.rb +6 -0
- data/lib/core/facets/roman.rb +89 -0
- data/lib/core/facets/string/acronym.rb +11 -0
- data/lib/core/facets/string/align.rb +125 -0
- data/lib/core/facets/string/ascii_only.rb +52 -0
- data/lib/core/facets/string/bracket.rb +64 -0
- data/lib/core/facets/string/briefcase.rb +1 -0
- data/lib/core/facets/string/camelcase.rb +73 -0
- data/lib/core/facets/string/capitalized.rb +49 -0
- data/lib/core/facets/string/cleanlines.rb +27 -0
- data/lib/core/facets/string/cleave.rb +36 -0
- data/lib/core/facets/string/cmp.rb +1 -0
- data/lib/core/facets/string/compress_lines.rb +17 -0
- data/lib/core/facets/string/crypt.rb +22 -0
- data/lib/core/facets/string/divide.rb +18 -0
- data/lib/core/facets/string/each_match.rb +1 -0
- data/lib/core/facets/string/each_word.rb +17 -0
- data/lib/core/facets/string/edit_distance.rb +124 -0
- data/lib/core/facets/string/ends_with.rb +1 -0
- data/lib/core/facets/string/exclude.rb +10 -0
- data/lib/core/facets/string/expand_tab.rb +35 -0
- data/lib/core/facets/string/file.rb +21 -0
- data/lib/core/facets/string/fold.rb +39 -0
- data/lib/core/facets/string/indent.rb +76 -0
- data/lib/core/facets/string/index_all.rb +24 -0
- data/lib/core/facets/string/indexable.rb +7 -0
- data/lib/core/facets/string/interpolate.rb +23 -0
- data/lib/core/facets/string/lchomp.rb +33 -0
- data/lib/core/facets/string/line_wrap.rb +18 -0
- data/lib/core/facets/string/linear.rb +19 -0
- data/lib/core/facets/string/lowercase.rb +1 -0
- data/lib/core/facets/string/margin.rb +55 -0
- data/lib/core/facets/string/methodize.rb +26 -0
- data/lib/core/facets/string/modulize.rb +31 -0
- data/lib/core/facets/string/mscan.rb +22 -0
- data/lib/core/facets/string/natcmp.rb +88 -0
- data/lib/core/facets/string/nchar.rb +32 -0
- data/lib/core/facets/string/newlines.rb +32 -0
- data/lib/core/facets/string/number.rb +14 -0
- data/lib/core/facets/string/op_div.rb +14 -0
- data/lib/core/facets/string/op_sub.rb +1 -0
- data/lib/core/facets/string/outdent.rb +1 -0
- data/lib/core/facets/string/pathize.rb +32 -0
- data/lib/core/facets/string/quote.rb +93 -0
- data/lib/core/facets/string/random.rb +44 -0
- data/lib/core/facets/string/range.rb +60 -0
- data/lib/core/facets/string/range_all.rb +1 -0
- data/lib/core/facets/string/range_of_line.rb +1 -0
- data/lib/core/facets/string/remove.rb +30 -0
- data/lib/core/facets/string/rewrite.rb +24 -0
- data/lib/core/facets/string/roman.rb +1 -0
- data/lib/core/facets/string/rotate.rb +24 -0
- data/lib/core/facets/string/shatter.rb +22 -0
- data/lib/core/facets/string/similarity.rb +90 -0
- data/lib/core/facets/string/snakecase.rb +31 -0
- data/lib/core/facets/string/splice.rb +33 -0
- data/lib/core/facets/string/squish.rb +22 -0
- data/lib/core/facets/string/starts_with.rb +5 -0
- data/lib/core/facets/string/store.rb +7 -0
- data/lib/core/facets/string/subtract.rb +4 -0
- data/lib/core/facets/string/titlecase.rb +27 -0
- data/lib/core/facets/string/to_re.rb +26 -0
- data/lib/core/facets/string/to_rx.rb +1 -0
- data/lib/core/facets/string/trim.rb +45 -0
- data/lib/core/facets/string/unbracket.rb +1 -0
- data/lib/core/facets/string/underscore.rb +1 -0
- data/lib/core/facets/string/unfold.rb +32 -0
- data/lib/core/facets/string/unindent.rb +1 -0
- data/lib/core/facets/string/unquote.rb +1 -0
- data/lib/core/facets/string/uppercase.rb +23 -0
- data/lib/core/facets/string/variablize.rb +13 -0
- data/lib/core/facets/string/word_wrap.rb +32 -0
- data/lib/core/facets/string/words.rb +24 -0
- data/lib/core/facets/string/xor.rb +26 -0
- data/lib/core/facets/string.rb +67 -0
- data/lib/core/facets/struct/attributes.rb +15 -0
- data/lib/core/facets/struct/replace.rb +8 -0
- data/lib/core/facets/struct.rb +3 -0
- data/lib/core/facets/symbol/as_s.rb +19 -0
- data/lib/core/facets/symbol/bang.rb +1 -0
- data/lib/core/facets/symbol/call.rb +29 -0
- data/lib/core/facets/symbol/chomp.rb +24 -0
- data/lib/core/facets/symbol/generate.rb +24 -0
- data/lib/core/facets/symbol/not.rb +29 -0
- data/lib/core/facets/symbol/op_div.rb +21 -0
- data/lib/core/facets/symbol/plain.rb +51 -0
- data/lib/core/facets/symbol/query.rb +1 -0
- data/lib/core/facets/symbol/reader.rb +1 -0
- data/lib/core/facets/symbol/setter.rb +1 -0
- data/lib/core/facets/symbol/succ.rb +23 -0
- data/lib/core/facets/symbol/thrown.rb +22 -0
- data/lib/core/facets/symbol/variablize.rb +14 -0
- data/lib/core/facets/symbol/writer.rb +1 -0
- data/lib/core/facets/symbol.rb +14 -0
- data/lib/core/facets/time/ago.rb +1 -0
- data/lib/core/facets/time/change.rb +46 -0
- data/lib/core/facets/time/dst_adjustment.rb +24 -0
- data/lib/core/facets/time/elapse.rb +18 -0
- data/lib/core/facets/time/future.rb +16 -0
- data/lib/core/facets/time/hence.rb +1 -0
- data/lib/core/facets/time/in.rb +1 -0
- data/lib/core/facets/time/less.rb +1 -0
- data/lib/core/facets/time/past.rb +1 -0
- data/lib/core/facets/time/round_to.rb +21 -0
- data/lib/core/facets/time/set.rb +27 -0
- data/lib/core/facets/time/shift.rb +97 -0
- data/lib/core/facets/time/stamp.rb +47 -0
- data/lib/core/facets/time/to_time.rb +21 -0
- data/lib/core/facets/time/trunc.rb +15 -0
- data/lib/core/facets/time.rb +16 -0
- data/lib/core/facets/unboundmethod/arguments.rb +44 -0
- data/lib/core/facets/unboundmethod.rb +2 -0
- data/lib/core/facets/version.rb +18 -0
- data/lib/core/facets.rb +40 -0
- data/lib/core/facets.yml +80 -0
- data/lib/facets-glimmer/ext/kernel.rb +8 -0
- data/lib/facets-glimmer.rb +33 -0
- data/lib/standard/facets/against.rb +53 -0
- data/lib/standard/facets/argvector.rb +343 -0
- data/lib/standard/facets/binding/block_exec.rb +44 -0
- data/lib/standard/facets/cgi/esc.rb +11 -0
- data/lib/standard/facets/cgi/escape_html.rb +63 -0
- data/lib/standard/facets/cgi/marshal.rb +20 -0
- data/lib/standard/facets/cgi.rb +6 -0
- data/lib/standard/facets/cli.rb +54 -0
- data/lib/standard/facets/cloneable.rb +67 -0
- data/lib/standard/facets/continuation.rb +56 -0
- data/lib/standard/facets/date/cmp.rb +32 -0
- data/lib/standard/facets/date.rb +434 -0
- data/lib/standard/facets/digest/base64digest.rb +45 -0
- data/lib/standard/facets/digest/salted_digest.rb +44 -0
- data/lib/standard/facets/digest.rb +2 -0
- data/lib/standard/facets/enumargs.rb +191 -0
- data/lib/standard/facets/equitable.rb +76 -0
- data/lib/standard/facets/erb.rb +66 -0
- data/lib/standard/facets/fileutils/amass.rb +34 -0
- data/lib/standard/facets/fileutils/cp_rx.rb +42 -0
- data/lib/standard/facets/fileutils/head.rb +1 -0
- data/lib/standard/facets/fileutils/ln_r.rb +98 -0
- data/lib/standard/facets/fileutils/outofdate.rb +38 -0
- data/lib/standard/facets/fileutils/safe_ln.rb +27 -0
- data/lib/standard/facets/fileutils/slice.rb +55 -0
- data/lib/standard/facets/fileutils/stage.rb +66 -0
- data/lib/standard/facets/fileutils/tail.rb +1 -0
- data/lib/standard/facets/fileutils/wc.rb +63 -0
- data/lib/standard/facets/fileutils/whereis.rb +66 -0
- data/lib/standard/facets/fileutils/which.rb +60 -0
- data/lib/standard/facets/fileutils.rb +13 -0
- data/lib/standard/facets/find/select.rb +16 -0
- data/lib/standard/facets/find.rb +2 -0
- data/lib/standard/facets/gem/search.rb +18 -0
- data/lib/standard/facets/gem/specification/current_specs.rb +21 -0
- data/lib/standard/facets/gem/specification/find_requireable_file.rb +21 -0
- data/lib/standard/facets/getoptlong.rb +59 -0
- data/lib/standard/facets/hash_builder.rb +46 -0
- data/lib/standard/facets/instantiable.rb +25 -0
- data/lib/standard/facets/interval.rb +277 -0
- data/lib/standard/facets/load_monitor.rb +26 -0
- data/lib/standard/facets/math/abs.rb +8 -0
- data/lib/standard/facets/math/acosec.rb +1 -0
- data/lib/standard/facets/math/acot.rb +8 -0
- data/lib/standard/facets/math/acoth.rb +8 -0
- data/lib/standard/facets/math/acsc.rb +13 -0
- data/lib/standard/facets/math/acsch.rb +8 -0
- data/lib/standard/facets/math/amd.rb +17 -0
- data/lib/standard/facets/math/approx_equal.rb +15 -0
- data/lib/standard/facets/math/asec.rb +8 -0
- data/lib/standard/facets/math/asech.rb +8 -0
- data/lib/standard/facets/math/atkinson_index.rb +16 -0
- data/lib/standard/facets/math/beta.rb +14 -0
- data/lib/standard/facets/math/cdf.rb +10 -0
- data/lib/standard/facets/math/ceil.rb +8 -0
- data/lib/standard/facets/math/cosec.rb +1 -0
- data/lib/standard/facets/math/cosech.rb +1 -0
- data/lib/standard/facets/math/cot.rb +8 -0
- data/lib/standard/facets/math/coth.rb +8 -0
- data/lib/standard/facets/math/csc.rb +13 -0
- data/lib/standard/facets/math/csch.rb +13 -0
- data/lib/standard/facets/math/delta.rb +9 -0
- data/lib/standard/facets/math/distance.rb +19 -0
- data/lib/standard/facets/math/ec.rb +5 -0
- data/lib/standard/facets/math/epsilon.rb +21 -0
- data/lib/standard/facets/math/exp10.rb +8 -0
- data/lib/standard/facets/math/exp2.rb +8 -0
- data/lib/standard/facets/math/factorial.rb +37 -0
- data/lib/standard/facets/math/floor.rb +8 -0
- data/lib/standard/facets/math/gcd.rb +23 -0
- data/lib/standard/facets/math/gini_coefficient.rb +33 -0
- data/lib/standard/facets/math/kldivergence.rb +19 -0
- data/lib/standard/facets/math/lcm.rb +15 -0
- data/lib/standard/facets/math/lgamma.rb +23 -0
- data/lib/standard/facets/math/linsolve.rb +12 -0
- data/lib/standard/facets/math/lngamma.rb +18 -0
- data/lib/standard/facets/math/log2.rb +14 -0
- data/lib/standard/facets/math/max.rb +1 -0
- data/lib/standard/facets/math/mean.rb +16 -0
- data/lib/standard/facets/math/median.rb +30 -0
- data/lib/standard/facets/math/min.rb +35 -0
- data/lib/standard/facets/math/percentile.rb +40 -0
- data/lib/standard/facets/math/pow.rb +13 -0
- data/lib/standard/facets/math/pstd.rb +1 -0
- data/lib/standard/facets/math/pvariance.rb +1 -0
- data/lib/standard/facets/math/rmd.rb +16 -0
- data/lib/standard/facets/math/root.rb +8 -0
- data/lib/standard/facets/math/round.rb +9 -0
- data/lib/standard/facets/math/sec.rb +8 -0
- data/lib/standard/facets/math/sech.rb +8 -0
- data/lib/standard/facets/math/sign.rb +20 -0
- data/lib/standard/facets/math/sinc.rb +8 -0
- data/lib/standard/facets/math/sqr.rb +8 -0
- data/lib/standard/facets/math/sqsolve.rb +55 -0
- data/lib/standard/facets/math/std.rb +27 -0
- data/lib/standard/facets/math/stderr.rb +1 -0
- data/lib/standard/facets/math/sum.rb +16 -0
- data/lib/standard/facets/math/summed_sqdevs.rb +14 -0
- data/lib/standard/facets/math/tau.rb +5 -0
- data/lib/standard/facets/math/tgamma.rb +10 -0
- data/lib/standard/facets/math/theil_index.rb +24 -0
- data/lib/standard/facets/math/variance.rb +31 -0
- data/lib/standard/facets/math.rb +58 -0
- data/lib/standard/facets/memoizable.rb +141 -0
- data/lib/standard/facets/memoizer.rb +63 -0
- data/lib/standard/facets/multipliers.rb +65 -0
- data/lib/standard/facets/multiton.rb +387 -0
- data/lib/standard/facets/net/http.rb +51 -0
- data/lib/standard/facets/nullclass.rb +38 -0
- data/lib/standard/facets/opesc.rb +79 -0
- data/lib/standard/facets/ostruct/each.rb +11 -0
- data/lib/standard/facets/ostruct/initialize.rb +48 -0
- data/lib/standard/facets/ostruct/merge.rb +21 -0
- data/lib/standard/facets/ostruct/op_fetch.rb +29 -0
- data/lib/standard/facets/ostruct/op_store.rb +1 -0
- data/lib/standard/facets/ostruct/to_h.rb +10 -0
- data/lib/standard/facets/ostruct/to_ostruct.rb +65 -0
- data/lib/standard/facets/ostruct.rb +89 -0
- data/lib/standard/facets/pathname/chdir.rb +15 -0
- data/lib/standard/facets/pathname/empty.rb +10 -0
- data/lib/standard/facets/pathname/exists.rb +6 -0
- data/lib/standard/facets/pathname/glob.rb +57 -0
- data/lib/standard/facets/pathname/home.rb +12 -0
- data/lib/standard/facets/pathname/null.rb +20 -0
- data/lib/standard/facets/pathname/op_div.rb +15 -0
- data/lib/standard/facets/pathname/op_fetch.rb +13 -0
- data/lib/standard/facets/pathname/outofdate.rb +13 -0
- data/lib/standard/facets/pathname/readline.rb +13 -0
- data/lib/standard/facets/pathname/root.rb +10 -0
- data/lib/standard/facets/pathname/rootname.rb +10 -0
- data/lib/standard/facets/pathname/safe.rb +15 -0
- data/lib/standard/facets/pathname/split_root.rb +9 -0
- data/lib/standard/facets/pathname/to_path.rb +28 -0
- data/lib/standard/facets/pathname/to_str.rb +8 -0
- data/lib/standard/facets/pathname/uptodate.rb +11 -0
- data/lib/standard/facets/pathname/visit.rb +38 -0
- data/lib/standard/facets/pathname/work.rb +10 -0
- data/lib/standard/facets/pathname.rb +56 -0
- data/lib/standard/facets/platform.rb +377 -0
- data/lib/standard/facets/random.rb +485 -0
- data/lib/standard/facets/rbconfig.rb +78 -0
- data/lib/standard/facets/set.rb +36 -0
- data/lib/standard/facets/shellwords.rb +115 -0
- data/lib/standard/facets/strscan.rb +16 -0
- data/lib/standard/facets/thread.rb +98 -0
- data/lib/standard/facets/timer.rb +217 -0
- data/lib/standard/facets/tuple.rb +280 -0
- data/lib/standard/facets/uri/cgi_escape.rb +46 -0
- data/lib/standard/facets/uri/cgi_parse.rb +1 -0
- data/lib/standard/facets/uri/cgi_unescape.rb +1 -0
- data/lib/standard/facets/uri/decode.rb +32 -0
- data/lib/standard/facets/uri/parameters.rb +63 -0
- data/lib/standard/facets/uri/query.rb +148 -0
- data/lib/standard/facets/uri.rb +40 -0
- data/lib/standard/facets/yaml/file.rb +41 -0
- data/lib/standard/facets/yaml/kernel.rb +29 -0
- data/lib/standard/facets/yaml/read.rb +12 -0
- data/lib/standard/facets/yaml.rb +6 -0
- data/lib/standard/facets/zlib.rb +38 -0
- data/test/core/array/test_arrange.rb +37 -0
- data/test/core/array/test_average.rb +16 -0
- data/test/core/array/test_before.rb +48 -0
- data/test/core/array/test_collapse.rb +23 -0
- data/test/core/array/test_commonality.rb +35 -0
- data/test/core/array/test_conjoin.rb +50 -0
- data/test/core/array/test_contains.rb +14 -0
- data/test/core/array/test_delete.rb +42 -0
- data/test/core/array/test_delete_unless.rb +17 -0
- data/test/core/array/test_delete_values.rb +31 -0
- data/test/core/array/test_divide.rb +24 -0
- data/test/core/array/test_duplicates.rb +29 -0
- data/test/core/array/test_each_overlap.rb +31 -0
- data/test/core/array/test_each_pair.rb +16 -0
- data/test/core/array/test_each_value.rb +16 -0
- data/test/core/array/test_entropy.rb +23 -0
- data/test/core/array/test_extract_options.rb +28 -0
- data/test/core/array/test_first.rb +17 -0
- data/test/core/array/test_from.rb +42 -0
- data/test/core/array/test_intersection.rb +19 -0
- data/test/core/array/test_last.rb +17 -0
- data/test/core/array/test_median.rb +27 -0
- data/test/core/array/test_merge.rb +27 -0
- data/test/core/array/test_missing.rb +12 -0
- data/test/core/array/test_mode.rb +17 -0
- data/test/core/array/test_nonuniq.rb +25 -0
- data/test/core/array/test_not_empty.rb +17 -0
- data/test/core/array/test_occur.rb +52 -0
- data/test/core/array/test_occurrence.rb +20 -0
- data/test/core/array/test_only.rb +17 -0
- data/test/core/array/test_op_pow.rb +13 -0
- data/test/core/array/test_pad.rb +40 -0
- data/test/core/array/test_peek.rb +28 -0
- data/test/core/array/test_poke.rb +21 -0
- data/test/core/array/test_probability.rb +18 -0
- data/test/core/array/test_pull.rb +15 -0
- data/test/core/array/test_recurse.rb +40 -0
- data/test/core/array/test_recursively.rb +33 -0
- data/test/core/array/test_reject_values.rb +17 -0
- data/test/core/array/test_span.rb +18 -0
- data/test/core/array/test_splice.rb +21 -0
- data/test/core/array/test_split.rb +22 -0
- data/test/core/array/test_split_at.rb +26 -0
- data/test/core/array/test_squeeze.rb +22 -0
- data/test/core/array/test_standard_deviation.rb +18 -0
- data/test/core/array/test_step.rb +28 -0
- data/test/core/array/test_store.rb +22 -0
- data/test/core/array/test_to_h.rb +14 -0
- data/test/core/array/test_traverse.rb +26 -0
- data/test/core/array/test_uniq_by.rb +24 -0
- data/test/core/array/test_unique_permutation.rb +23 -0
- data/test/core/array/test_variance.rb +17 -0
- data/test/core/array/test_zip.rb +13 -0
- data/test/core/binding/test_caller.rb +69 -0
- data/test/core/binding/test_defined.rb +18 -0
- data/test/core/binding/test_op.rb +24 -0
- data/test/core/binding/test_self.rb +16 -0
- data/test/core/class/test_descendents.rb +19 -0
- data/test/core/class/test_preallocate.rb +32 -0
- data/test/core/class/test_subclasses.rb +21 -0
- data/test/core/class/test_to_proc.rb +16 -0
- data/test/core/comparable/test_bound.rb +32 -0
- data/test/core/comparable/test_cap.rb +36 -0
- data/test/core/comparable/test_clip.rb +31 -0
- data/test/core/comparable/test_cmp.rb +16 -0
- data/test/core/comparable/test_op_get.rb +61 -0
- data/test/core/denumerable_tc.rb +194 -0
- data/test/core/dir/test_ascend.rb +40 -0
- data/test/core/dir/test_descend.rb +24 -0
- data/test/core/dir/test_each_child.rb +22 -0
- data/test/core/dir/test_multiglob.rb +25 -0
- data/test/core/dir/test_parent.rb +14 -0
- data/test/core/dir/test_recurse.rb +26 -0
- data/test/core/enumerable/test_accumulate.rb +44 -0
- data/test/core/enumerable/test_cluster.rb +36 -0
- data/test/core/enumerable/test_compact_map.rb +32 -0
- data/test/core/enumerable/test_defer.rb +27 -0
- data/test/core/enumerable/test_each_by.rb +49 -0
- data/test/core/enumerable/test_every.rb +33 -0
- data/test/core/enumerable/test_ewise.rb +30 -0
- data/test/core/enumerable/test_exclude.rb +15 -0
- data/test/core/enumerable/test_expand.rb +15 -0
- data/test/core/enumerable/test_filter.rb +19 -0
- data/test/core/enumerable/test_find_yield.rb +96 -0
- data/test/core/enumerable/test_frequency.rb +15 -0
- data/test/core/enumerable/test_graph.rb +42 -0
- data/test/core/enumerable/test_hashify.rb +113 -0
- data/test/core/enumerable/test_key_by.rb +22 -0
- data/test/core/enumerable/test_map_by.rb +27 -0
- data/test/core/enumerable/test_map_send.rb +26 -0
- data/test/core/enumerable/test_map_with_index.rb +23 -0
- data/test/core/enumerable/test_mash.rb +17 -0
- data/test/core/enumerable/test_modulate.rb +17 -0
- data/test/core/enumerable/test_occur.rb +40 -0
- data/test/core/enumerable/test_only.rb +40 -0
- data/test/core/enumerable/test_per.rb +19 -0
- data/test/core/enumerable/test_purge.rb +22 -0
- data/test/core/enumerable/test_recursively.rb +33 -0
- data/test/core/enumerable/test_squeeze.rb +35 -0
- data/test/core/enumerable/test_sum.rb +40 -0
- data/test/core/enumerable/test_uniq_by.rb +25 -0
- data/test/core/enumerable/test_visit.rb +14 -0
- data/test/core/enumerable/test_with_position.rb +42 -0
- data/test/core/enumerator/lazy/test_squeeze.rb +33 -0
- data/test/core/enumerator/test_fx.rb +16 -0
- data/test/core/enumerator/test_new.rb +21 -0
- data/test/core/enumerator_tc.rb +40 -0
- data/test/core/exception/test_detail.rb +15 -0
- data/test/core/exception/test_raised.rb +15 -0
- data/test/core/exception/test_suppress.rb +16 -0
- data/test/core/file/test_append.rb +22 -0
- data/test/core/file/test_create.rb +17 -0
- data/test/core/file/test_ext.rb +31 -0
- data/test/core/file/test_null.rb +14 -0
- data/test/core/file/test_read_binary.rb +19 -0
- data/test/core/file/test_read_list.rb +16 -0
- data/test/core/file/test_rewrite.rb +35 -0
- data/test/core/file/test_rootname.rb +13 -0
- data/test/core/file/test_sanitize.rb +32 -0
- data/test/core/file/test_split_all.rb +14 -0
- data/test/core/file/test_write.rb +22 -0
- data/test/core/file/test_writelines.rb +21 -0
- data/test/core/filetest/test_root.rb +14 -0
- data/test/core/functor_tc.rb +41 -0
- data/test/core/hash/test_alias.rb +25 -0
- data/test/core/hash/test_argumentize.rb +23 -0
- data/test/core/hash/test_at.rb +16 -0
- data/test/core/hash/test_autonew.rb +22 -0
- data/test/core/hash/test_collate.rb +61 -0
- data/test/core/hash/test_count.rb +23 -0
- data/test/core/hash/test_data.rb +35 -0
- data/test/core/hash/test_dearray_values.rb +26 -0
- data/test/core/hash/test_deep_merge.rb +31 -0
- data/test/core/hash/test_deep_rekey.rb +131 -0
- data/test/core/hash/test_delete_at.rb +18 -0
- data/test/core/hash/test_delete_unless.rb +18 -0
- data/test/core/hash/test_delete_values.rb +30 -0
- data/test/core/hash/test_diff.rb +16 -0
- data/test/core/hash/test_each_with_key.rb +16 -0
- data/test/core/hash/test_expect.rb +34 -0
- data/test/core/hash/test_fetch_nested.rb +24 -0
- data/test/core/hash/test_graph.rb +40 -0
- data/test/core/hash/test_insert.rb +20 -0
- data/test/core/hash/test_inverse.rb +20 -0
- data/test/core/hash/test_join.rb +32 -0
- data/test/core/hash/test_keys.rb +41 -0
- data/test/core/hash/test_new_with.rb +17 -0
- data/test/core/hash/test_op_add.rb +17 -0
- data/test/core/hash/test_op_and.rb +31 -0
- data/test/core/hash/test_op_mul.rb +17 -0
- data/test/core/hash/test_op_or.rb +17 -0
- data/test/core/hash/test_op_push.rb +34 -0
- data/test/core/hash/test_op_sub.rb +28 -0
- data/test/core/hash/test_recurse.rb +39 -0
- data/test/core/hash/test_recursively.rb +71 -0
- data/test/core/hash/test_rekey.rb +119 -0
- data/test/core/hash/test_replace_each.rb +17 -0
- data/test/core/hash/test_revalue.rb +98 -0
- data/test/core/hash/test_reverse_merge.rb +39 -0
- data/test/core/hash/test_slice.rb +36 -0
- data/test/core/hash/test_stringify_keys.rb +26 -0
- data/test/core/hash/test_swap.rb +15 -0
- data/test/core/hash/test_symbolize_keys.rb +26 -0
- data/test/core/hash/test_to_mod.rb +24 -0
- data/test/core/hash/test_to_proc.rb +23 -0
- data/test/core/hash/test_to_struct.rb +22 -0
- data/test/core/hash/test_traverse.rb +29 -0
- data/test/core/hash/test_update_each.rb +16 -0
- data/test/core/hash/test_update_keys.rb +21 -0
- data/test/core/hash/test_update_values.rb +15 -0
- data/test/core/hash/test_weave.rb +18 -0
- data/test/core/hash/test_zip.rb +16 -0
- data/test/core/indexable_tc.rb +232 -0
- data/test/core/integer/test_bitmask.rb +73 -0
- data/test/core/integer/test_factorial.rb +30 -0
- data/test/core/integer/test_multiple.rb +16 -0
- data/test/core/integer/test_of.rb +36 -0
- data/test/core/integer/test_ordinal.rb +27 -0
- data/test/core/kernel/test_as.rb +74 -0
- data/test/core/kernel/test_ask.rb +9 -0
- data/test/core/kernel/test_assign.rb +61 -0
- data/test/core/kernel/test_assign_from.rb +48 -0
- data/test/core/kernel/test_attr_singleton.rb +51 -0
- data/test/core/kernel/test_blank.rb +103 -0
- data/test/core/kernel/test_callstack.rb +21 -0
- data/test/core/kernel/test_class.rb +14 -0
- data/test/core/kernel/test_complete.rb +19 -0
- data/test/core/kernel/test_d.rb +10 -0
- data/test/core/kernel/test_deep_clone.rb +31 -0
- data/test/core/kernel/test_deep_copy.rb +15 -0
- data/test/core/kernel/test_dir.rb +24 -0
- data/test/core/kernel/test_disable_warnings.rb +38 -0
- data/test/core/kernel/test_ergo.rb +34 -0
- data/test/core/kernel/test_extension.rb +18 -0
- data/test/core/kernel/test_get.rb +54 -0
- data/test/core/kernel/test_here.rb +13 -0
- data/test/core/kernel/test_hierarchical_send.rb +48 -0
- data/test/core/kernel/test_in.rb +14 -0
- data/test/core/kernel/test_instance_assign.rb +19 -0
- data/test/core/kernel/test_instance_class.rb +15 -0
- data/test/core/kernel/test_instance_extract.rb +28 -0
- data/test/core/kernel/test_instance_replace.rb +47 -0
- data/test/core/kernel/test_instance_send.rb +26 -0
- data/test/core/kernel/test_maybe.rb +13 -0
- data/test/core/kernel/test_meta_alias.rb +18 -0
- data/test/core/kernel/test_meta_class.rb +33 -0
- data/test/core/kernel/test_meta_def.rb +15 -0
- data/test/core/kernel/test_meta_eval.rb +18 -0
- data/test/core/kernel/test_method.rb +20 -0
- data/test/core/kernel/test_not.rb +51 -0
- data/test/core/kernel/test_not_nil.rb +25 -0
- data/test/core/kernel/test_object_class.rb +22 -0
- data/test/core/kernel/test_object_hexid.rb +20 -0
- data/test/core/kernel/test_object_send.rb +25 -0
- data/test/core/kernel/test_presence.rb +37 -0
- data/test/core/kernel/test_qua_class.rb +25 -0
- data/test/core/kernel/test_require_all.rb +11 -0
- data/test/core/kernel/test_respond.rb +38 -0
- data/test/core/kernel/test_returning.rb +17 -0
- data/test/core/kernel/test_silence.rb +24 -0
- data/test/core/kernel/test_singleton_class.rb +15 -0
- data/test/core/kernel/test_super_method.rb +23 -0
- data/test/core/kernel/test_tap.rb +38 -0
- data/test/core/kernel/test_temporarily.rb +25 -0
- data/test/core/kernel/test_true.rb +31 -0
- data/test/core/kernel/test_try.rb +35 -0
- data/test/core/kernel/test_val.rb +30 -0
- data/test/core/kernel/test_with.rb +18 -0
- data/test/core/kernel/test_writers.rb +53 -0
- data/test/core/matchdata/test_match.rb +14 -0
- data/test/core/matchdata/test_matchset.rb +29 -0
- data/test/core/method/test_composition.rb +42 -0
- data/test/core/module/test_abstract.rb +24 -0
- data/test/core/module/test_alias_accessor.rb +27 -0
- data/test/core/module/test_alias_method_chain.rb +34 -0
- data/test/core/module/test_alias_module_function.rb +24 -0
- data/test/core/module/test_all_instance_methods.rb +27 -0
- data/test/core/module/test_ancestor.rb +16 -0
- data/test/core/module/test_anonymous.rb +18 -0
- data/test/core/module/test_attr_setter.rb +28 -0
- data/test/core/module/test_basename.rb +14 -0
- data/test/core/module/test_can.rb +22 -0
- data/test/core/module/test_class.rb +22 -0
- data/test/core/module/test_class_def.rb +22 -0
- data/test/core/module/test_class_extend.rb +73 -0
- data/test/core/module/test_class_inheritor.rb +135 -0
- data/test/core/module/test_copy_inheritor.rb +35 -0
- data/test/core/module/test_enclosure.rb +24 -0
- data/test/core/module/test_instance_function.rb +30 -0
- data/test/core/module/test_instance_method.rb +20 -0
- data/test/core/module/test_instance_method_defined.rb +38 -0
- data/test/core/module/test_integrate.rb +28 -0
- data/test/core/module/test_is.rb +50 -0
- data/test/core/module/test_memoize.rb +33 -0
- data/test/core/module/test_method_clash.rb +59 -0
- data/test/core/module/test_method_space.rb +72 -0
- data/test/core/module/test_methodize.rb +26 -0
- data/test/core/module/test_modname.rb +13 -0
- data/test/core/module/test_module_def.rb +22 -0
- data/test/core/module/test_module_load.rb +23 -0
- data/test/core/module/test_nodef.rb +19 -0
- data/test/core/module/test_op.rb +56 -0
- data/test/core/module/test_pathize.rb +25 -0
- data/test/core/module/test_preextend.rb +26 -0
- data/test/core/module/test_redefine_method.rb +30 -0
- data/test/core/module/test_redirect_method.rb +32 -0
- data/test/core/module/test_remove.rb +18 -0
- data/test/core/module/test_rename_method.rb +34 -0
- data/test/core/module/test_revise.rb +61 -0
- data/test/core/module/test_set.rb +30 -0
- data/test/core/module/test_spacename.rb +15 -0
- data/test/core/module/test_to_obj.rb +20 -0
- data/test/core/module/test_wrap_method.rb +32 -0
- data/test/core/numeric/test_approx.rb +26 -0
- data/test/core/numeric/test_delimit.rb +68 -0
- data/test/core/numeric/test_distance.rb +16 -0
- data/test/core/numeric/test_length.rb +16 -0
- data/test/core/numeric/test_round_to.rb +76 -0
- data/test/core/numeric/test_spacing.rb +17 -0
- data/test/core/object/test_dup.rb +115 -0
- data/test/core/object/test_object_state.rb +75 -0
- data/test/core/object/test_try_dup.rb +59 -0
- data/test/core/proc/test_bind.rb +29 -0
- data/test/core/proc/test_bind_to.rb +17 -0
- data/test/core/proc/test_compose.rb +27 -0
- data/test/core/proc/test_partial.rb +27 -0
- data/test/core/proc/test_to_method.rb +43 -0
- data/test/core/proc/test_update.rb +15 -0
- data/test/core/range/test_combine.rb +32 -0
- data/test/core/range/test_nudge.rb +32 -0
- data/test/core/range/test_op_add.rb +24 -0
- data/test/core/range/test_op_sub.rb +34 -0
- data/test/core/range/test_overlap.rb +15 -0
- data/test/core/range/test_to_rng.rb +20 -0
- data/test/core/range/test_umbrella.rb +32 -0
- data/test/core/range/test_within.rb +25 -0
- data/test/core/regexp/test_arity.rb +30 -0
- data/test/core/regexp/test_multiline.rb +19 -0
- data/test/core/regexp/test_op_add.rb +15 -0
- data/test/core/regexp/test_op_or.rb +16 -0
- data/test/core/regexp/test_to_re.rb +24 -0
- data/test/core/string/test_acronym.rb +14 -0
- data/test/core/string/test_align.rb +32 -0
- data/test/core/string/test_ascii_only.rb +51 -0
- data/test/core/string/test_bracket.rb +37 -0
- data/test/core/string/test_camelcase.rb +59 -0
- data/test/core/string/test_capitalized.rb +36 -0
- data/test/core/string/test_cleanlines.rb +12 -0
- data/test/core/string/test_cleave.rb +27 -0
- data/test/core/string/test_cmp.rb +18 -0
- data/test/core/string/test_compress_lines.rb +27 -0
- data/test/core/string/test_crypt.rb +17 -0
- data/test/core/string/test_divide.rb +17 -0
- data/test/core/string/test_each_word.rb +17 -0
- data/test/core/string/test_edit_distance.rb +20 -0
- data/test/core/string/test_exclude.rb +23 -0
- data/test/core/string/test_expand_tabs.rb +83 -0
- data/test/core/string/test_file.rb +15 -0
- data/test/core/string/test_fold.rb +21 -0
- data/test/core/string/test_indent.rb +90 -0
- data/test/core/string/test_index_all.rb +22 -0
- data/test/core/string/test_interpolate.rb +16 -0
- data/test/core/string/test_lchomp.rb +25 -0
- data/test/core/string/test_line_wrap.rb +15 -0
- data/test/core/string/test_lowercase.rb +18 -0
- data/test/core/string/test_margin.rb +16 -0
- data/test/core/string/test_methodize.rb +28 -0
- data/test/core/string/test_modulize.rb +28 -0
- data/test/core/string/test_mscan.rb +18 -0
- data/test/core/string/test_natcmp.rb +17 -0
- data/test/core/string/test_nchar.rb +17 -0
- data/test/core/string/test_newlines.rb +14 -0
- data/test/core/string/test_number.rb +44 -0
- data/test/core/string/test_op_div.rb +15 -0
- data/test/core/string/test_op_sub.rb +15 -0
- data/test/core/string/test_pathize.rb +31 -0
- data/test/core/string/test_quote.rb +41 -0
- data/test/core/string/test_random.rb +25 -0
- data/test/core/string/test_range.rb +35 -0
- data/test/core/string/test_remove.rb +50 -0
- data/test/core/string/test_rewrite.rb +17 -0
- data/test/core/string/test_rotate.rb +31 -0
- data/test/core/string/test_shatter.rb +17 -0
- data/test/core/string/test_similarity.rb +22 -0
- data/test/core/string/test_snakecase.rb +22 -0
- data/test/core/string/test_splice.rb +37 -0
- data/test/core/string/test_squish.rb +31 -0
- data/test/core/string/test_store.rb +16 -0
- data/test/core/string/test_subtract.rb +16 -0
- data/test/core/string/test_titlecase.rb +16 -0
- data/test/core/string/test_to_re.rb +35 -0
- data/test/core/string/test_trim.rb +116 -0
- data/test/core/string/test_unbracket.rb +38 -0
- data/test/core/string/test_underscore.rb +21 -0
- data/test/core/string/test_unfold.rb +17 -0
- data/test/core/string/test_unindent.rb +105 -0
- data/test/core/string/test_unquote.rb +13 -0
- data/test/core/string/test_uppercase.rb +22 -0
- data/test/core/string/test_variablize.rb +15 -0
- data/test/core/string/test_word_wrap.rb +80 -0
- data/test/core/string/test_words.rb +65 -0
- data/test/core/string/test_xor.rb +16 -0
- data/test/core/struct/test_replace.rb +18 -0
- data/test/core/symbol/test_as_s.rb +15 -0
- data/test/core/symbol/test_bang.rb +15 -0
- data/test/core/symbol/test_chomp.rb +22 -0
- data/test/core/symbol/test_generate.rb +20 -0
- data/test/core/symbol/test_not.rb +19 -0
- data/test/core/symbol/test_op_div.rb +15 -0
- data/test/core/symbol/test_plain.rb +19 -0
- data/test/core/symbol/test_query.rb +19 -0
- data/test/core/symbol/test_setter.rb +17 -0
- data/test/core/symbol/test_succ.rb +16 -0
- data/test/core/symbol/test_thrown.rb +22 -0
- data/test/core/symbol/test_variablize.rb +14 -0
- data/test/core/time/test_ago.rb +18 -0
- data/test/core/time/test_change.rb +17 -0
- data/test/core/time/test_dst_adjustment.rb +19 -0
- data/test/core/time/test_elapse.rb +15 -0
- data/test/core/time/test_future.rb +32 -0
- data/test/core/time/test_hence.rb +18 -0
- data/test/core/time/test_in.rb +18 -0
- data/test/core/time/test_less.rb +139 -0
- data/test/core/time/test_past.rb +32 -0
- data/test/core/time/test_round_to.rb +34 -0
- data/test/core/time/test_set.rb +43 -0
- data/test/core/time/test_shift.rb +135 -0
- data/test/core/time/test_stamp.rb +42 -0
- data/test/core/time/test_to_time.rb +15 -0
- data/test/core/time/test_trunc.rb +34 -0
- data/test/core/unboundmethod/test_arguments.rb +25 -0
- data/test/standard/binding/test_block_exec.rb +21 -0
- data/test/standard/date/test_cmp.rb +38 -0
- data/test/standard/math/test_abs.rb +13 -0
- data/test/standard/math/test_acot.rb +23 -0
- data/test/standard/math/test_acoth.rb +22 -0
- data/test/standard/math/test_beta.rb +19 -0
- data/test/standard/math/test_ceil.rb +22 -0
- data/test/standard/math/test_cosec.rb +19 -0
- data/test/standard/math/test_cosech.rb +19 -0
- data/test/standard/math/test_cot.rb +13 -0
- data/test/standard/math/test_coth.rb +13 -0
- data/test/standard/math/test_distance.rb +16 -0
- data/test/standard/math/test_exp10.rb +14 -0
- data/test/standard/math/test_exp2.rb +14 -0
- data/test/standard/math/test_factorial.rb +13 -0
- data/test/standard/math/test_floor.rb +23 -0
- data/test/standard/math/test_gcd.rb +18 -0
- data/test/standard/math/test_lcm.rb +13 -0
- data/test/standard/math/test_median.rb +17 -0
- data/test/standard/math/test_percentile.rb +13 -0
- data/test/standard/math/test_pow.rb +30 -0
- data/test/standard/math/test_root.rb +15 -0
- data/test/standard/math/test_sec.rb +19 -0
- data/test/standard/math/test_sech.rb +19 -0
- data/test/standard/math/test_sign.rb +20 -0
- data/test/standard/math/test_sinc.rb +15 -0
- data/test/standard/math/test_srq.rb +20 -0
- data/test/standard/pathname/test_chdir.rb +16 -0
- data/test/standard/pathname/test_readline.rb +23 -0
- data/test/standard/test_argvector.rb +64 -0
- data/test/standard/test_cloneable.rb +60 -0
- data/test/standard/test_date.rb +82 -0
- data/test/standard/test_enumargs.rb +105 -0
- data/test/standard/test_equitable.rb +46 -0
- data/test/standard/test_instantiable.rb +40 -0
- data/test/standard/test_math.rb +3 -0
- data/test/standard/test_memoizable.rb +42 -0
- data/test/standard/test_multipliers.rb +141 -0
- data/test/standard/test_ostruct.rb +191 -0
- data/test/standard/test_random.rb +241 -0
- data/test/standard/test_shellwords.rb +74 -0
- data/test/standard/test_thread.rb +24 -0
- data/test/standard/test_timer.rb +62 -0
- data/test/standard/test_tuple.rb +68 -0
- data/test/standard/test_uri.rb +50 -0
- metadata +1932 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'facets/math/beta'
|
2
|
+
|
3
|
+
test_case Math do
|
4
|
+
|
5
|
+
class_method :beta do
|
6
|
+
test do
|
7
|
+
Math.beta(1.0, 1.0).range(1.0e-6).assert === 1.0
|
8
|
+
Math.beta(1.0, 2.0).range(1.0e-6).assert === 0.5
|
9
|
+
Math.beta(1.0, 3.0).range(1.0e-6).assert === 1.0 / 3.0
|
10
|
+
Math.beta(2.0, 1.0).range(1.0e-6).assert === 0.5
|
11
|
+
Math.beta(2.0, 2.0).range(1.0e-6).assert === 1.0 / 6.0
|
12
|
+
Math.beta(2.0, 3.0).range(1.0e-6).assert === 1.0 / 12.0
|
13
|
+
Math.beta(3.0, 1.0).range(1.0e-6).assert === 1.0 / 3.0
|
14
|
+
Math.beta(3.0, 2.0).range(1.0e-6).assert === 1.0 / 12.0
|
15
|
+
Math.beta(3.0, 3.0).range(1.0e-6).assert === 1.0 / 30.0
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'facets/math/ceil'
|
2
|
+
|
3
|
+
test_case Math do
|
4
|
+
|
5
|
+
class_method :ceil do
|
6
|
+
test do
|
7
|
+
Math.ceil( 1.99999).assert == 2
|
8
|
+
Math.ceil( 1.5 ).assert == 2
|
9
|
+
Math.ceil( 1.00001).assert == 2
|
10
|
+
Math.ceil( 0.99999).assert == 1
|
11
|
+
Math.ceil( 0.5 ).assert == 1
|
12
|
+
Math.ceil( 0.00001).assert == 1
|
13
|
+
Math.ceil(-0.00001).assert == 0
|
14
|
+
Math.ceil(-0.5 ).assert == 0
|
15
|
+
Math.ceil(-0.99999).assert == 0
|
16
|
+
Math.ceil(-1.00001).assert == -1
|
17
|
+
Math.ceil(-1.5 ).assert == -1
|
18
|
+
Math.ceil(-1.99999).assert == -1
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'facets/math/cosec'
|
2
|
+
|
3
|
+
test_case Math do
|
4
|
+
|
5
|
+
class_method :cosec do
|
6
|
+
test do
|
7
|
+
Math.cosec(-1.0).assert == 1.0 / Math.sin(-1.0)
|
8
|
+
Math.cosec( 1.0).assert == 1.0 / Math.sin( 1.0)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# TODO: Check complementarity of cosec and sin
|
13
|
+
#assert_equal_float(1.0, Math.cosec(-2.0) * Math.sin(-2.0), 1.0e-6)
|
14
|
+
#assert_equal_float(1.0, Math.cosec(-1.0) * Math.sin(-1.0), 1.0e-6)
|
15
|
+
#assert_equal_float(1.0, Math.cosec( 1.0) * Math.sin( 1.0), 1.0e-6)
|
16
|
+
#assert_equal_float(1.0, Math.cosec( 2.0) * Math.sin( 2.0), 1.0e-6)
|
17
|
+
|
18
|
+
end
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'facets/math/cosech'
|
2
|
+
|
3
|
+
test_case Math do
|
4
|
+
|
5
|
+
class_method :cosech do
|
6
|
+
test do
|
7
|
+
Math.cosech(-1.0).assert == 1.0 / Math.sinh(-1.0)
|
8
|
+
Math.cosech( 1.0).assert == 1.0 / Math.sinh( 1.0)
|
9
|
+
end
|
10
|
+
|
11
|
+
test "check complementarity of cosech and sinh" do
|
12
|
+
(Math.cosech(-2.0) * Math.sinh(-2.0)).assert == 1.0
|
13
|
+
(Math.cosech(-1.0) * Math.sinh(-1.0)).assert == 1.0
|
14
|
+
(Math.cosech( 1.0) * Math.sinh( 1.0)).assert == 1.0
|
15
|
+
(Math.cosech( 2.0) * Math.sinh( 2.0)).assert == 1
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'facets/math/cot'
|
2
|
+
require 'facets/numeric/range' # used to test within a precision
|
3
|
+
|
4
|
+
test_case Math do
|
5
|
+
|
6
|
+
class_method :cot do
|
7
|
+
test do
|
8
|
+
Math.cot(1.0).range(1.0e-6).assert === 1.0 / Math.tan(1.0)
|
9
|
+
Math.cot(2.0).range(1.0e-6).assert === 1.0 / Math.tan(2.0)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'facets/math/coth'
|
2
|
+
require 'facets/numeric/range' # used to test within a precision
|
3
|
+
|
4
|
+
test_case Math do
|
5
|
+
|
6
|
+
class_method :coth do
|
7
|
+
test do
|
8
|
+
Math.coth(1.0).range(1.0e-6).assert === 1.0 / Math.tanh(1.0)
|
9
|
+
Math.coth(2.0).range(1.0e-6).assert === 1.0 / Math.tanh(2.0)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'facets/math/distance'
|
2
|
+
|
3
|
+
test_case Math do
|
4
|
+
|
5
|
+
class_method :distance do
|
6
|
+
test do
|
7
|
+
Math.distance(1, 2).assert == 1.0
|
8
|
+
Math.distance([1,2], [3,4]).assert >= 2.828427
|
9
|
+
Math.distance([1,2], [3,4]).assert <= 2.8284271247461903
|
10
|
+
Math.distance([1,2,3], [4,5,6]).assert >= 5.196152
|
11
|
+
Math.distance([1,2,3], [4,5,6]).assert <= 5.196152422706632
|
12
|
+
Math.distance([1,2,3,4], [5,6,7,8]).assert == 8.0
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'facets/math/exp10'
|
2
|
+
require 'facets/numeric/range' # used to test within a precision
|
3
|
+
|
4
|
+
test_case Math do
|
5
|
+
|
6
|
+
class_method :exp10 do
|
7
|
+
test do
|
8
|
+
Math.exp10(0.0).range(1.0e-6).assert === 1.0
|
9
|
+
Math.exp10(0.5).range(1.0e-6).assert === Math.sqrt(10.0)
|
10
|
+
Math.exp10(1.0).range(1.0e-6).assert === 10.0
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'facets/math/exp2'
|
2
|
+
require 'facets/numeric/range' # used to test within a precision
|
3
|
+
|
4
|
+
test_case Math do
|
5
|
+
|
6
|
+
class_method :exp2 do
|
7
|
+
test do
|
8
|
+
Math.exp2(0.0).range(1.0e-6).assert === 1.0
|
9
|
+
Math.exp2(0.5).range(1.0e-6).assert === Math.sqrt(2.0)
|
10
|
+
Math.exp2(1.0).range(1.0e-6).assert === 2.0
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'facets/math/floor'
|
2
|
+
|
3
|
+
test_case Math do
|
4
|
+
|
5
|
+
class_method :floor do
|
6
|
+
test do
|
7
|
+
Math.floor( 1.99999).assert == 1
|
8
|
+
Math.floor( 1.5 ).assert == 1
|
9
|
+
Math.floor( 1.00001).assert == 1
|
10
|
+
Math.floor( 0.99999).assert == 0
|
11
|
+
Math.floor( 0.5 ).assert == 0
|
12
|
+
Math.floor( 0.00001).assert == 0
|
13
|
+
Math.floor(-0.00001).assert == -1
|
14
|
+
Math.floor(-0.5 ).assert == -1
|
15
|
+
Math.floor(-0.99999).assert == -1
|
16
|
+
Math.floor(-1.00001).assert == -2
|
17
|
+
Math.floor(-1.5 ).assert == -2
|
18
|
+
Math.floor(-1.99999).assert == -2
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'facets/math/gcd'
|
2
|
+
require 'facets/math/factorial'
|
3
|
+
|
4
|
+
test_case Math do
|
5
|
+
|
6
|
+
class_method :gcd do
|
7
|
+
test do
|
8
|
+
Math.gcd(4732, 4700).assert == 4
|
9
|
+
Math.gcd(3651, 5023).assert == 1
|
10
|
+
Math.gcd(612221610, 67461255771).assert == 5565651
|
11
|
+
end
|
12
|
+
|
13
|
+
test "on a factorial" do
|
14
|
+
Math.factorial(47).assert == Math.gcd(Math.factorial(90), Math.factorial(47))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
covers 'facets/math/median'
|
2
|
+
|
3
|
+
test_case Math do
|
4
|
+
|
5
|
+
class_method :median do
|
6
|
+
test "fractional" do
|
7
|
+
r = Math.median [1, 2, 3, 3, 6, 11, 20, 20]
|
8
|
+
r.assert == 4.5
|
9
|
+
end
|
10
|
+
|
11
|
+
test "whole value" do
|
12
|
+
r = Math.median [1, 2, 4, 6, 8]
|
13
|
+
r.assert == 4
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'facets/math/pow'
|
2
|
+
require 'facets/numeric/range'
|
3
|
+
|
4
|
+
test_case Math do
|
5
|
+
|
6
|
+
class_method :pow do
|
7
|
+
test do
|
8
|
+
Math.pow( 4.0, 3.0).range(1.0e-6).assert === 64.0
|
9
|
+
Math.pow( 0.9, 3.0).range(1.0e-6).assert === 0.729
|
10
|
+
Math.pow( 0.25, -0.5).range(1.0e-6).assert === 2.0
|
11
|
+
Math.pow( 64.0, -1.0/3).range(1.0e-6).assert === 0.25
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class_method :pwr do
|
16
|
+
test do
|
17
|
+
Math.pwr( 4.0, 3.0).range(1.0e-6).assert === 64.0
|
18
|
+
Math.pwr( 0.9, 3.0).range(1.0e-6).assert === 0.729
|
19
|
+
Math.pwr( 0.25, -0.5).range(1.0e-6).assert === 2.0
|
20
|
+
Math.pwr( 64.0, -1.0/3).range(1.0e-6).assert === 0.25
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# TODO: Check complementarity of pwr and root
|
25
|
+
# assert_equal_float( 4.0, Math.root(Math.pwr(2.0, 6.0), 3.0), 1.0e-6)
|
26
|
+
# assert_equal_float( 2.0, Math.root(Math.pwr(4.0, 4.0), 8.0), 1.0e-6)
|
27
|
+
# assert_equal_float(Math.sqrt(2.0), Math.pwr(Math.root(2.0, 6.0), 3.0), 1.0e-6)
|
28
|
+
# assert_equal_float( 16.0, Math.pwr(Math.root(4.0, 4.0), 8.0), 1.0e-6)
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'facets/math/root'
|
2
|
+
require 'facets/numeric/range'
|
3
|
+
|
4
|
+
test_case Math do
|
5
|
+
|
6
|
+
class_method :root do
|
7
|
+
test do
|
8
|
+
Math.root( 64.0, 3.0).range(1.0e-6).assert === 4.0
|
9
|
+
Math.root( 0.729, 3.0).range(1.0e-6).assert === 0.9
|
10
|
+
Math.root( 2.0, -0.5).range(1.0e-6).assert === 0.25
|
11
|
+
Math.root( 0.25, -1.0/3).range(1.0e-6).assert === 64.0
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'facets/math/sec'
|
2
|
+
require 'facets/numeric/range' # used to test within a precision
|
3
|
+
|
4
|
+
test_case Math do
|
5
|
+
|
6
|
+
class_method :sec do
|
7
|
+
test do
|
8
|
+
Math.sec(1.0).range(1.0e-6).assert === 1.0 / Math.cos(1.0)
|
9
|
+
Math.sec(2.0).range(1.0e-6).assert === 1.0 / Math.cos(2.0)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
# TODO: Check complementarity of cos and sec
|
14
|
+
#assert_equal_float(1.0, Math.sec(-2.0) * Math.cos(-2.0), 1.0e-6)
|
15
|
+
#assert_equal_float(1.0, Math.sec(-1.0) * Math.cos(-1.0), 1.0e-6)
|
16
|
+
#assert_equal_float(1.0, Math.sec( 1.0) * Math.cos( 1.0), 1.0e-6)
|
17
|
+
#assert_equal_float(1.0, Math.sec( 2.0) * Math.cos( 2.0), 1.0e-6)
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'facets/math/sech'
|
2
|
+
require 'facets/numeric/range' # used to test within a precision
|
3
|
+
|
4
|
+
test_case Math do
|
5
|
+
|
6
|
+
class_method :sech do
|
7
|
+
test do
|
8
|
+
Math.sech(1.0).range(1.0e-6).assert === 1.0 / Math.cosh(1.0)
|
9
|
+
Math.sech(2.0).range(1.0e-6).assert === 1.0 / Math.cosh(2.0)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
# TODO: Check complementarity of cosh and sech
|
14
|
+
#assert_equal_float(1.0, Math.sech(-2.0) * Math.cosh(-2.0), 1.0e-6)
|
15
|
+
#assert_equal_float(1.0, Math.sech(-1.0) * Math.cosh(-1.0), 1.0e-6)
|
16
|
+
#assert_equal_float(1.0, Math.sech( 1.0) * Math.cosh( 1.0), 1.0e-6)
|
17
|
+
#assert_equal_float(1.0, Math.sech( 2.0) * Math.cosh( 2.0), 1.0e-6)
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'facets/math/sign'
|
2
|
+
|
3
|
+
test_case Math do
|
4
|
+
|
5
|
+
class_method :sign do
|
6
|
+
test do
|
7
|
+
Math.sign(-3.1).assert == -1.0
|
8
|
+
Math.sign( 0.0).assert == 0.0
|
9
|
+
Math.sign( 3.1).assert == 1.0
|
10
|
+
end
|
11
|
+
|
12
|
+
# Check complementarity of abs and sign
|
13
|
+
#assert_equal_float(-2.0, Math.abs(-2.0) * Math.sign(-2.0), 1e-6)
|
14
|
+
#assert_equal_float( 0.0, Math.abs( 0.0) * Math.sign( 0.0), 1e-6)
|
15
|
+
#assert_equal_float( 3.0, Math.abs( 3.0) * Math.sign( 3.0), 1e-6)
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'facets/math/sinc'
|
2
|
+
|
3
|
+
test_case Math do
|
4
|
+
|
5
|
+
class_method :sinc do
|
6
|
+
test do
|
7
|
+
Math.sinc( 0.0).assert == 1.0
|
8
|
+
Math.sinc( 1.0).assert == Math.sin(1.0)
|
9
|
+
Math.sinc(-1.0).assert == Math.sin(1.0)
|
10
|
+
Math.sinc( 2.0).assert == 0.5 * Math.sin(2.0)
|
11
|
+
Math.sinc(-2.0).assert == 0.5 * Math.sin(2.0)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'facets/math/sqr'
|
2
|
+
require 'facets/numeric/range'
|
3
|
+
|
4
|
+
test_case Math do
|
5
|
+
|
6
|
+
class_method :sqr do
|
7
|
+
test do
|
8
|
+
Math.sqr(-0.9).range(1.0e-6).assert === 0.81
|
9
|
+
Math.sqr(-0.7).range(1.0e-6).assert === 0.49
|
10
|
+
Math.sqr(-0.7).range(1.0e-6).assert === 0.49
|
11
|
+
Math.sqr( 0.9).range(1.0e-6).assert === 0.81
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# TODO: Check complementarity of sqrt and sqr
|
16
|
+
# assert_equal_float(0.3, Math.sqrt(Math.sqr( 0.3)), 1.0e-6)
|
17
|
+
# assert_equal_float(0.3, Math.sqrt(Math.sqr(-0.3)), 1.0e-6)
|
18
|
+
# assert_equal_float(0.3, Math.sqr(Math.sqrt( 0.3)), 1.0e-6)
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
|
3
|
+
covers 'facets/pathname/readline'
|
4
|
+
|
5
|
+
test_case Pathname do
|
6
|
+
|
7
|
+
method :readline do
|
8
|
+
|
9
|
+
setup do
|
10
|
+
@test_file = Pathname.new('tmp/test_file')
|
11
|
+
File.open(@test_file, "w") { |f| f << "line1\nline2" }
|
12
|
+
end
|
13
|
+
|
14
|
+
test do
|
15
|
+
@test_file.readline.assert == "line1\n"
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
covers 'facets/argvector'
|
2
|
+
|
3
|
+
test_case Argvector do
|
4
|
+
|
5
|
+
method :parameters do
|
6
|
+
|
7
|
+
test do
|
8
|
+
line = "-x baz --foo=8 bar"
|
9
|
+
cargs = Argvector.new(line)
|
10
|
+
args, keys = cargs.parameters
|
11
|
+
args.assert == ['baz','bar']
|
12
|
+
keys.assert == {'foo'=>'8','x'=>true}
|
13
|
+
end
|
14
|
+
|
15
|
+
test "with arity" do
|
16
|
+
line = "-g a -x b -x c"
|
17
|
+
cargs = Argvector.new(line, :g=>1, :x=>1)
|
18
|
+
args, keys = cargs.parameters
|
19
|
+
keys.assert == {'g'=>'a','x'=>['b','c']}
|
20
|
+
args.assert == []
|
21
|
+
end
|
22
|
+
|
23
|
+
test "repeated option" do
|
24
|
+
line = "-x baz --foo=1 --foo=2 bar"
|
25
|
+
cargs = Argvector.new(line)
|
26
|
+
args, keys = cargs.parameters
|
27
|
+
args.assert == ['baz','bar']
|
28
|
+
keys.assert == {'x'=>true,'foo'=>['1','2']}
|
29
|
+
end
|
30
|
+
|
31
|
+
test do
|
32
|
+
line = "-q baz --aq 5 bar"
|
33
|
+
cargs = Argvector.new(line,'aq'=>1)
|
34
|
+
words, flags = cargs.parameters
|
35
|
+
words.assert == ['baz','bar']
|
36
|
+
flags.assert == {'q'=>true,'aq'=>'5'}
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
method :preoptions do
|
42
|
+
|
43
|
+
test do
|
44
|
+
line = "-x --foo=7 baz -y bar"
|
45
|
+
cargs = Argvector.new(line)
|
46
|
+
flags = cargs.preoptions
|
47
|
+
flags.assert == {'x'=>true,'foo'=>'7'}
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
method :flags do
|
53
|
+
|
54
|
+
test do
|
55
|
+
line = "-x baz --foo=8 bar"
|
56
|
+
cargs = Argvector.new(line)
|
57
|
+
flags = cargs.flags
|
58
|
+
flags.assert == ['x']
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'facets/cloneable'
|
2
|
+
|
3
|
+
test_case Cloneable do
|
4
|
+
|
5
|
+
foo = Class.new do
|
6
|
+
include Cloneable
|
7
|
+
def initialize
|
8
|
+
@bar=[]
|
9
|
+
end
|
10
|
+
def bar_id
|
11
|
+
@bar.object_id
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
method :dup do
|
16
|
+
test do
|
17
|
+
a = foo.new
|
18
|
+
b = a.dup
|
19
|
+
a.bar_id.refute == b.bar_id
|
20
|
+
end
|
21
|
+
|
22
|
+
test "tainted" do
|
23
|
+
a = foo.new
|
24
|
+
a.taint
|
25
|
+
b = a.dup
|
26
|
+
b.assert.tainted?
|
27
|
+
end
|
28
|
+
|
29
|
+
test "frozen" do
|
30
|
+
a = foo.new
|
31
|
+
a.freeze
|
32
|
+
b = a.dup
|
33
|
+
b.refute.frozen?
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
method :clone do
|
38
|
+
test do
|
39
|
+
a = foo.new
|
40
|
+
b = a.clone
|
41
|
+
assert(a.bar_id != b.bar_id, "should not be equal")
|
42
|
+
end
|
43
|
+
|
44
|
+
test "tainted" do
|
45
|
+
a = foo.new
|
46
|
+
a.taint
|
47
|
+
b = a.clone
|
48
|
+
assert b.tainted?, "b should be tainted"
|
49
|
+
end
|
50
|
+
|
51
|
+
test "frozen" do
|
52
|
+
a = foo.new
|
53
|
+
a.freeze
|
54
|
+
b = a.clone
|
55
|
+
assert b.frozen?, "b should be frozen"
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
covers 'facets/date'
|
2
|
+
|
3
|
+
test_case Date do
|
4
|
+
|
5
|
+
setup "Date 2005-05-20" do
|
6
|
+
@d = Date.civil(2005, 04, 20)
|
7
|
+
end
|
8
|
+
|
9
|
+
method :to_date do
|
10
|
+
test do
|
11
|
+
@d.to_date.assert.instance_of?(::Date)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
method :to_time do
|
16
|
+
test do
|
17
|
+
@d.to_time.assert.instance_of?(::Time)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
method :to_s do
|
22
|
+
test do
|
23
|
+
@d.to_s.assert == "2005-04-20"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
method :stamp do
|
28
|
+
test do
|
29
|
+
@d.stamp.assert == "2005-04-20"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
method :stamp do
|
34
|
+
test do
|
35
|
+
@d.stamp(:short).assert == "20 Apr"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
method :stamp do
|
40
|
+
test do
|
41
|
+
@d.stamp(:long).assert == "April 20, 2005"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
method :days_in_month do
|
46
|
+
test do
|
47
|
+
@d.days_in_month.assert == 30
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
method :days_of_month do
|
52
|
+
test do
|
53
|
+
@d.days_of_month.assert == (1..(@d.days_in_month)).to_a
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
test_case String do
|
60
|
+
|
61
|
+
method :to_date do
|
62
|
+
test do
|
63
|
+
s = "2005-10-31"
|
64
|
+
d = s.to_date
|
65
|
+
d.day.assert == 31
|
66
|
+
d.month.assert == 10
|
67
|
+
d.year.assert == 2005
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
test_case Time do
|
74
|
+
|
75
|
+
method :to_date do
|
76
|
+
test do
|
77
|
+
t = Time.now #parse('4/20/2005 15:37')
|
78
|
+
t.to_date.assert.instance_of?(::Date)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|