# Facets 1.8

**URL:** <https://www.ruby-forum.com/t/facets-1-8/86245>\
**Category:** Ruby\
**Created:** [February 20, 2007, 9:57pm UTC](https://www.ruby-forum.com/t/facets-1-8/86245 "2007-02-20T21:57:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 20, 2007, 9:57pm UTC](https://www.ruby-forum.com/t/facets-1-8/86245/1 "2007-02-20T21:57:02Z")

</div>

Facets 1.8

Facets is a large collection of core extension methods and module  
additions for the Ruby programming language. The core extensions are  
unique by virtue of their atomicity. Methods are stored in their own  
files, allowing for highly granular control of requirements. The  
modules include a variety of useful classes, mixins and  
microframeworks, from the Functor to a complete SI Units system.

[http://facets.rubyforge.org](http://facets.rubyforge.org)

* * *

It’s been a long time since the last release of Facets. Too long  
really. 1.7’s tiny number made it all the way up to 191 before I  
tagged it 1.8, plus 51 subsequent changes before official release! So  
Facets continues to mature: new methods have been added, as well as a  
few classes. And 2.0 promises to be even more exciting. As always  
thanks to everyone who has contributed, both directly and indirectly.

Here’s a (fairly raw) summary of the ChangeLog.

- significant improvements to command.rb thanks to Tyler Rick
- added tests to elementwise and tap
- fixed test for elementwise and op\_tilde\_self
- added enumerable/map\_send
- added thread\_map and thread\_map\_send thanks to greg
- added operator “~@” for enumerable/elementwise
- added more/consoleutils.rb
- added string/cleave
- added capitalize\_all thanks to Richard Laugesen
- cartesian\_product is an alias of enumerable/cart
- added array pad thanks to Richard Laugesen
- added kernel/tap
- converted facet/ requires to facets/core or facets/more as needed
- further improvements to arguments.rb (looking good!)
- improved symbol/self/generate
- bug fix kernel/autoreload arguments needed to be in opposite order
- add to\_xoxo
- removed bad character codes in multiplier.rb
- used yaml to allow json.rb to work for all objects in general
- improvements to functor (note: is to\_a and to\_proc okay?)
- add test to string/bytes.rb
- bug fix to nilclass/op\_cmp
- fixed enumerable/op\_pow to use enumerable/cart
- added array/op\_div
- adjustments to xmlbuilder and htmlbuilder dur to buildingblock  
changes
- improved buildingblock.rb
- simplified interface of arguments.rb (still a little more to do)
- improvements/simplifications to Dir.multiglob
- fixed misspelling of behavior.rb (was bahvior.rb)
- removed #own from base list in facets.rb (really need a standard  
for “singleton class”)
- fixed bug in aspects.rb that would not handle args of wrapped  
method
- Symbol#to\_s optimization, had to remove freeze
- updates to fileutils/stage (stage worth keeping?)
- fix bug in kernel/ask, returns more than one character
- cleanup of enumerbale/graph (no effective change)
- new super fast enumerable/cart by Thomas H. (replaces #cross)
- improved multiglob rountines (accept ‘+’ and ‘-’ prefixes)
- fixed bug in attr\_tester, thanks Dov!
- added weekdays to times.rb thanks to Ryan P. and Dave Hoover
- improvements to dictionary.rb (no longer a subclass of Hash)  
thanks Jan!
- improvements to ann.rb and ann\_attr.rb. works, yea!
- fixed bug in string/singular.rb
- changed enumerable/cross into enumerable/cart and  
cartesian\_product
- moved enumerable/cross to enumerable/cart (cartesian\_product)
- added buildingblock.rb, replaced builderobject.rb
- adjust require for “yored” files
- HtmlBuilder and XMLBuilder are now based on BuildingBlock
- ostuct adjustment, use #instance\_delegate to get underneth the  
open access
- module/include\_as is now based on module/namespace (thanks Pit!)
- fixed enumerable/partition\_by
- further updates to project info file (need to stop versioning  
this)
- deprecated (yored) builderobject.rb (poor implementation)
- added hash/insert; like store but only if key isn’t already  
present
- added module/include\_and\_extend
- facets.rb now references facets/sys.rb
- added facets/automatic – very cool, albiet expiremental way to  
load core methods automatically!
- added module/module\_method; like module\_function but makes method  
public
- added module/include\_function\_module; attempts to properly include  
one function\_module into another
- kernel/yaml convenience method for YAML::load
- added kernel/supress; supress errors while executing a block (nice  
DHH!)
- added symbol/chomp, like string#chomp
- added proc/to\_h; converts an assignment proc into a hash
- proc/bind; bind a proc to an object, returning a method
- added module/prepend; provides dyanamic method wraps for modules,  
and static wraps for classes
- added module/new; use a module as if it were a class
- added module/alias\_accessor
- renamed #superior to #super\_at
- kernel/instance\_class; yet anouther meta\_class name, but a more  
sensicle name this one
- added kernel/populate; populates an object’s inst. vars from a  
hash or assingment block
- added kernel/daemonize; yet another thanks to DHH!
- added enumerable/injecting; like inject but automatically returns  
the memo from the block
- added kernel/object\_send, a true public-only send method
- added kernel/silence\_stream; output to null device; thanks DHH!
- added kernel/instance\_values, thanks DHH!
- added Config::inspect for rbconfig
- added hash/pairs\_at (aking to values\_at)
- added \_why’s metaid methods (meta\_class, meta\_eval, etc.)
- added kernel/enable\_warnings to complement silence\_warinings
- added integer/to\_roman
- added logical operators for hash (and/or)
- array/to\_path convert ans array to a path string
- array/index takes a block
- added fileutils/compress; very simple convenience methods for  
archiving folders
- added fileutils/stage adn staged, a means of transfering files  
accoring to preset rules
- had to remove taskable.rb for now (implementation won’t work as  
toplevel include)
- added kernel/ask, simply command to get console input
- moved deprecated #facet\_require to yore lib
- deprecated (yored) kernel/own, yet another term for the singleton  
class
- renamed quaclass to qua\_class
- added populate.rb, mixin for classes that need on a basic  
initializer
- added version\_number.rb (a specialized tuple)
- added uploadutils.rb
- added Joel VanderWerf’s great script.rb script
- added Austin’s minitar.rb --it’s just too damn useful! (not in  
rdocs though)
- added htmlfilter.rb very nice html escape class
- added dependency.rb, allows methods to have dependent execution  
(like rake tasks)
- added arguments.rb this is for parsing console command arguments
- add new version of annotations: ann.rb and ann\_attr.rb
- memoize should now work at toplevel
- removed dataobject.rb (was never used)
- doc change to methodfilter.rb (maybe deprecat in future)
- deprecated (yored!) module/inject; what a silly method
- added File::yaml? to roughly detect if a file is a yaml file
- deprecated kernel/require\_facet (no longer needed)
- moved old module/namespace implementation to yore
- moved plugin.rb to ratchets/library project
- proper credit for multiton goes to Ara T. Howard!!! Also  
improvements.
- remove library.rb (move to ratchets/library project)
- improved time/stamp
- reimplemented proc/to\_method for more sensible behavior
- reimplemented module/namespace, very clever thanks to pit captain
- added module\_load and module\_require, e.g. load into and require  
into
- reimplemented instance\_exec, should be much improved
- doc updates to inflect.rb
- updates to Hash op\_add, reverse\_merge, and rekey
- each\_slice is now just an alias via enumerator & fixes to  
partition\_by
- modified all.rb (not recommended!) to require facets/sys
- modifications to project information file (should this be  
versioned?)
- created yore lib to store deprecated features (good idea!)
- modified PROJECT info file
- added module class/module\_load and \_require
- remove facet/ redirect lib from darcs repository
- kernel/returning is a stub for kernel/with
- added proc/update as alias for #call per Tim P. use of Proc as  
Observable
- added behavior.rb by Nobuyoshi N. (plan to improve)
- rewrote taskable.rb using classes to represent tasks; it is much  
improved
- openobject.rb doc updates
- major update to functor which is now a subclass of Proc (should be  
faster)
- improvements to dictionary.rb to go along with additions of first  
and last
- small improvements to command.rb
- removed uses of **class** for object\_class and solidified usaged  
of #as in basicobject.rb
- deprecated ostruct shadow methods (i.e **table** ) in favor of  
#instance methods
- added test to module/alias\_method\_chain
- imporvements to instance\_exec thanks to Mauricio F.
- improvements to kernel/send\_as
- improvements to kernel/as
- fixed syntax in hash/op\_add.rb
- imporvements to hash/partition\_by thanks to Gregory of Laurel
- added Mauricio F. to authors
- added addtional work library lore
- moved a number of “in the works” libs to ToadCode project
- removed predicate.rb, an expiremental logic system, and moved to  
ToadCode
- Added plugin.rb, an indirect require mechinism, ie. a plugin  
system
- remove one.rb and moved to ToadCode project, this was just silly/  
fun library
- Added library.rb which is a library ledger system (used to be  
roll.rb)
- added kernel/with which instance\_eval’s a block on with’s subject
- rekey is an improved version of normalize\_keys (ie. the basis of  
symbolize\_keys)
- multiglob is like glob but handles a list of patterns
- proper access to openstruct’s underlying table
- doc fixes and losening toplevel constraint to Object in taskable
- made OpenObject #update and #merge public; added to\_hash
- removed unorder\_store and store\_only; added first/last to  
dictionary
- continued improvements to command.rb  
added some new callbacks such as option\_missing;  
also handles method\_missing properly now
- added string/rewrite
- test fixes to module/include\_as
- documentation fix for class\_extension
- minor edit to supermethod (also finish #superior removal)
- cleanup kernel/set\_with code
- update kernel/metaclass can now take a block
- added hash#+ and hash#- (op\_add and op\_sub)
- added cache to enumerable/every
- removed kernel/superior (silly name)
- add more/autovivify.rb expiremental lib.
- update/fix to command.rb to not use Kernel methods as subcommands.
- update Work on annotation.rb to improve support for :self.
- deprecate enumerable/permute.rb (replaced by permutation) and  
minor test fix to linkedlist.rb
- added linkedlist.rb (thanks Kirk H.!)
- added enumerable/sum (thanks to Gavin K.)
- added array/each\_combo and combos (Eunumerable.combinations will  
be deprecated eventually)
- rename changed enumerable/permute to permutation
- update annotation.rb, fixed :self key
- added pathname/op\_div
- deprecated hash/each.rb
- removed hash/each.rb, this variation of Hash#each is too  
“dangerous” in practice
- update module/self/op\_add.rb: fixed inclusion order
- deprecated annotation.rb, replaced with ann.rb
- added module/self/op\_add.rb and op\_sub.rb - traits like features
- minor improvemtns to module/clone\_using and integrate
- openobject.rb (added NilClass#to\_openobject)
- replaced enumerable/each\_slice.rb w/ redirect to enumerator.rb.  
Ruby already has #each\_slice if you require ‘enumerator’. For 1.9,  
I believe this will be present automatically. So Facets’  
each\_slice  
has been replaced with a simple redirection to require  
‘enumerator’.  
Ruby’s version is slightly different in that it won’t check arity  
if  
a slice count is not given. For this, use enumerable/each\_by.
- removed array/delete\_at.rb (Use #delete\_values\_at instead)
- moved File.bitbucket to File.null (but bitbucket was so “fun”! 😉
- added nilclass/to\_path
- added kernel/load\_local
- added kernel/callee
- added enumerable/eachn, integer/each and integer/of
- re-added array/delete\_values\_at
- added filetest/self/root
- added cache.rb
- moved Dir.bitbucket to File.bitbucket
- removed task file in favor of sake based util/
- added main\_as\_module
- added doublemetaphone thanks to Lawrence Philps.
- added symbol/to\_s which caches the result for speed up
- additions and adjusments related to hash/delete\_at
- added Dir.bitbucket
- update to array/op\_fetch to include op\_store
- added filesystem.rb
- updates to enumerable each\_slice
- updated names of meta files
- added trace to command.rb

ALL YOUR BASE ARE BELONG TO RUBY!

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 20, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/facets-1-8/86245/2 "2007-02-20T23:06:14Z")

</div>

Trans wrote:

> - added array pad thanks to Richard Laugesen
> - bug fix to nilclass/op\_cmp
> - fixed bug in aspects.rb that would not handle args of wrapped  
> thanks Jan!
> - module/include\_as is now based on module/namespace (thanks Pit!)
> - added module/module\_method; like module\_function but makes method  
> and static wraps for classes
> - added kernel/object\_send, a true public-only send method
> - added fileutils/compress; very simple convenience methods for
> - added populate.rb, mixin for classes that need on a basic
> - add new version of annotations: ann.rb and ann\_attr.rb
> - remove library.rb (move to ratchets/library project)
> - modified all.rb (not recommended!) to require facets/sys
> - rewrote taskable.rb using classes to represent tasks; it is much  
> #instance methods  
> ToadCode
> - proper access to openstruct’s underlying table
> - minor edit to supermethod (also finish #superior removal)
> - added linkedlist.rb (thanks Kirk H.!)
> - deprecated annotation.rb, replaced with ann.rb  
> if
> - moved Dir.bitbucket to File.bitbucket
> - added trace to command.rb
> 
> ALL YOUR BASE ARE BELONG TO RUBY!

Trans - just tried to install facets via gem and am getting the  
following error:

(root) 2-\> gem install facets  
ERROR: While executing gem … (NoMethodError)  
undefined method `refresh’ for #Hash:0xb7cbe49c

Installing it from the tar ball works fine. My gems seems to be in  
working order as I just install another gem and upgraded my rails to  
1.2. Just thought I’d mention this in case these a problem no one’s  
run into as yet. (FYI, running ruby 1.8.5 p2.)

Thanks for Facets!

Ken

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 20, 2007, 11:13pm UTC](https://www.ruby-forum.com/t/facets-1-8/86245/3 "2007-02-20T23:13:16Z")

</div>

On 2/20/07, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> (root) 2-\> gem install facets  
> ERROR: While executing gem … (NoMethodError)  
> undefined method `refresh’ for #Hash:0xb7cbe49c

Your gem source\_cache may be corrupt. There is a known issue, but the  
cause is not yet understood.

-austin

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 20, 2007, 11:37pm UTC](https://www.ruby-forum.com/t/facets-1-8/86245/4 "2007-02-20T23:37:20Z")

</div>

On 2/20/07, Trans [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Would it have anything to do with this?

Haven’t a clue. I haven’t seen those; you may want to forward that to  
the RubyGems development list to see if they have anything to say  
about it.

> I take it the current cure is to delete the source\_cache?

That’s my understanding.

To be clear: this is not a Facets bug; it is a RubyGems bug. The  
RubyGems developers know about it, but haven’t yet been able to  
reproduce it in order to isolate it. Any assistance that people can  
provide in reproducing it is appreciated.

-austin

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 20, 2007, 11:31pm UTC](https://www.ruby-forum.com/t/facets-1-8/86245/5 "2007-02-20T23:31:19Z")

</div>

On Feb 20, 5:12 pm, “Austin Z.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –  
> Austin Z. \* removed\_email\_address@domain.invalid \*[http://www.halostatue.ca/](http://www.halostatue.ca/)  
> \* removed\_email\_address@domain.invalid \*[You are in a maze of twisty little passages, all alike. // halo • statue](http://www.halostatue.ca/feed/)  
> \* removed\_email\_address@domain.invalid

Would it have anything to do with this?

hook /usr/lib/ruby/gems/1.8/gems/rubygems-update-0.9.2/./post-  
install.rb failed:  
undefined method `post\_install\_message’ for #\<Gem::Specification:  
0xb7ae957c\>  
Try ‘ruby setup.rb --help’ for detailed usage.

I take it the current cure is to delete the source\_cache?

T.
