Changelog History
Page 1
-
v3.1.0 Changes
May 10, 2016๐ More or less a minor release, but there are some backward incompatabilites such as
Hash#except!
which no longer returns the rejected entries (use ๐Hash#remove!
for old behavior).Special thanks to Scott Parrish for all his help getting Facets in tip-top shape.
๐ Changes:
๐ New Features
- Add
Hash#remove!
for oldexcept!
behavior. - Add
Array#standard_deviation
. - Add
Array#variance
. - Add
Array#average
. - Add
Numeric#delimit
.
- Add
๐ Improved Features
- Change
Hash#except!
to not return rejected entries. - Improve definition of Character Set in
String.random
. - Add one to denominator of
String#similarity
score. - Enhanced download methods.
- Improvements on compatability with ActiveSupport.
- Enumerable#from and #thru return empty set when index is out of bounds.
- Change
๐ Bug Fixes
- Fix
Enumerable#key_by
. - Fix
Enumerable#sum
to take initial value.
- Fix
-
v3.0.0 Changes
November 11, 2014๐ This major release has been a long time in coming --too long in fact. As with ๐ any "Point Oh" release, please expect a few hiccups and report them so we can ๐ get a solid 3.1 release out as soon as possible.
๐ This release is tailored for Ruby 2.0 and above. Ruby 1.9.x and older is no ๐ longer supported. If you still need to use Facets with Ruby 1.9.x or older then the excellent Backports project can be used to fill in the gaps.
๐ Changes:
๐ New Features
- Add Array#arrange
- Add Array#intersection
- Add Array#missing
- Add Array#uniqe_permutation
- Add Dir.lookup method
- Add Enumerator::Lazy#squeeze
- Add Hash#fetch_nested
- Add Hash#deep_rekey and Hash#deep_rekey!
- Add Kernel#instance_extract
- Add Math#EC for Euler's constant
- Add Module#alias_class_method
- Add Pathname#chdir
- Add Pathname#readline
- Add Proc.wrap (may become
Kernel#Proc()
) - Add Range#- and Range#+
- Add Regexp#to_proc
- Add String#each_match as alias for #mscan
- Add Time.current
๐ Improved Features
- Enumerable#sum argument is initial value.
- Generalize Enumerable#sum to duck-type on
#+
. - Hash#collate can take multiple arguments.
- Hash#collate no longer flattens automatically.
- Time#past? and #future? use Time.current.
- Better ActiveSupport compatibility.
๐ Renamed Features
- Rename Object#replace to Object#instance_replace.
- Rename Range#to_r to Range#to_rng, since #to_r is now for Rational.
- Rename Kernel#eigen to #meta.
๐ Bug Fixes
- Fix Platform#inspect.
๐ Deprecated Features Now in Ruby
- Deprecate Array#combination (now in Ruby).
- Deprecate Array#index (now in Ruby).
- Deprecate Array#permutation (now in Ruby).
- Deprecate Array#product (now in Ruby).
- Deprecate Array#rotate (now in Ruby).
- Deprecate Array#rotate! (now in Ruby).
- Deprecate Array#select! (now in Ruby).
- Deprecate Binding#eval (now in Ruby).
- Deprecate Float#round_at (now in Ruby as #round).
- Deprecate Hash#select! (now in Ruby).
- Deprecate Integer#even? (now in Ruby).
- Deprecate Integer#odd? (now in Ruby).
- Deprecate Kernel#callee (now in Ruby).
- Deprecate Kernel#method (now in Ruby).
- Deprecate Kernel#source_location (now in Ruby).
- Deprecate NilClass#to_f (now in Ruby).
- Deprecate NilClass#to_h (now in Ruby).
- Deprecate Numeric#round_at (now in Ruby as #round).
- Deprecate Proc#curry (now in Ruby).
- Deprecate String#bytes (now in Ruby).
- Deprecate String#each_char (now in Ruby).
- Deprecate String#end_with (now in Ruby).
- Deprecate String#lines (now in Ruby).
- Deprecate String#start_with (now in Ruby).
- Deprecate Symbol#to_proc (now in Ruby).
- Deprecate UnboundMethod#name (now in Ruby).
-
v2.9.3 Changes
December 31, 2011๐ Happy New Year! Ruby Facets kicks off the year with a 2.9.x release. ๐ This release adds a number of new methods, a few general improvements ๐ and bug fixes, a couple of deprecations and finally settles the project down to a two-part core/standard project organization.
๐ Changes:
๐ New Features
- Add Hash#url_params. (Matt Kirk)
- Add Enumerable#hashify. (Ronen Barzel)
- Add String#briefcase, similar to #titlecase.
- Add Kernel#hierarchical_send (better replacement for preinitialize.rb).
- Add Class#hierarchically, which supports #hierarchical_send.
- Add Array#median, to get the sorted middle of an array.
- Add Math#percentile and Math#median.
- Add Instantiable mixin (returns from Mixers spin-off project).
- Add Equitable mixin (returns from Mixers spin-off project).
- Add Cloneable mixin (returns from Mixers spin-off project).
- Add Array#each_pair and #each_value.
- Add Numeric#positive? and #numeric?.
- Add Method#* and #^ composition methods. (Mike Burns)
- Add back Fixnum::MAX and MIN constants.
- Add Binding#with.
๐ Improved Features
- Improve FileUtils#amass to be more robust.
- Improve String#snakecase to convert spaces to underscores.
- Improve String#camelcase to convert spaces to "camels".
- Improve String#snakecase to not handle path names (use #pathize).
- Improve String#camelcase to not handle module names (ise #modulize).
- Improve Numeric#approx? bu using ratio.
๐ Renamed Features
- Rename Enumerable#has? to #incase?.
๐ Bug Fixes
- Fix Hash#rekey to keep default_proc.
- Fix Binding#self to not be defined for Rubinius.
๐ Deprecations
- Deprecate Preinitializable mixin.
- Deprecate main.rb, spun-off to
main_like_module
gem.
Implementation Details
- Reconsolidated library into just two parts,
core
andstandard
. - The term "more" is just a synonym for "standard" now.
- Relative requires are being used more extensively.
- Collection scripts, e.g.
require 'facets'
, are static.
- Reconsolidated library into just two parts,
-
v2.9.2 Changes
August 23, 2011๐ The main purpose of this release is a fix for Module#redefine_method, ๐ so it will not conflict with ActiveSupport. Beyond that a handful of new ๐ methods have been added. This release also marks the start of using a src/ directory to generate the lib/ directory.
๐ Changes:
๐ New Features
- Add Enumerable#map_with and alias #zip_map.
- Hash#delete_values returns removed keys (#12).
- Add clap-like command-line parser to Shellwords.
- Add Module#let, akin to RSpec's method.
- Add uncommon Module#method_clash method.
- Add uncommon Class#singleton? method.
๐ Bug Fixes
- Fix Module#redefine_method to use #remove_method.
- Fix Kernel#object_hexid, or at least try to do so again.
- Fix Exception#detail to not return backtrace if nil.
-
v2.9.1 Changes
January 30, 2011๐ Primarily this release fixes a couple of small issues. But also a handful of ๐ new methods have been added.
๐ Changes:
๐ New Features:
- Add FileTest#absolute? and #relative?
- Add FileTest#contains?
- Add FileTest#safe?
- Add FileUtils#amass
- Add FileUtils#outofdate
- Add FileUtils#stage
- Add Kernel#yes? and Kernel#no?
- Add Enumerable#has? (TOUR library)
- Add Digest#salted_digest, etc.
- Add Digest#base64digest (1.9.2 method)
- Add String#random_binary
๐ Improved Features
- Better OS detection in Platform class and RBConfig module
- Moved CPU byte order methods from RBConfig to Platform class
- General improvements to Platform class API
๐ Bug Fixes
- Module#redefine_method need not check pre-existence of method
- Fix string/unquote.rb recursive require
- Kernel#object_hexid varies on CPU arch, not Ruby version.
-
v2.9.0 Changes
September 01, 2010๐ This release is fairly extensive as it was originally intended to be v3.0. After further consideration it was decided to reserve v3.0 for the ๐ polish of real world feedback and more progressive changes. The primary ๐ focus of this release has been the completion of migrating Facets into a true ๐ extensions library. With this release almost all add-on classes and mixins have now been spun-off to other projects. Only the most general purposes โ add-on classes and mixins remain.
A new TOUR library division has also been added to complement CORE and MORE. This division houses purely optional extensions. The new division serves a couple of useful purposes. In particular, it helps separates the standard library extensions from optional core extension in the RDocs and thus makes the perfect place to vet new extension ideas.
One important change that will effect anyone using Facets along side ๐ ActiveSupport is that Facets no longer tries to conditionally avoid ๐ method overlaps with ActiveSupport. This is fine for the upcoming ๐ ActiveSupport 3.0 library which extends core classes directly instead of ๐ using mixins. One need only require 'facets' in the Rails config/preinitializer.rb ๐ file and ActiveSupport will take precedence over Facets. For older versions ๐ of ActiveSupport, the best approach is to cherry pick from Facets just the extensions you want, thus avoiding any conflicts. There are actually only a dozen or so overlaps and all are intended to compatible, but it doesn't hurt to be sure.
๐ Lastly, it is worth mentioning that this release has been more thuroughly ๐ tested than any version of Facets to date. Thanks to RVM this release runs ๐ green on Ruby 1.8.6, 1.8.7 and 1.9.2.
๐ Changes:
๐ New Features
- Add Kernel#temporarily, set variables temporarily and eval block
- Add Kernel#deep_clone, a better alternative to #deep_copy
- Add Kernel#present? and Kernel#presence
- Add Kernel#not and #not?
- Add Array#extract_options!, for pulling options off argument list
- Add Regexp#|, operator for Regexp#union
- Add Array#percentile and Array#median
- Add Module#memo, for instance level memoization
- Add YAML.read method
- Add Pathname#include?
- Add Module#anonymous?
- Add Module#copy_inheritor
- Add Indexable#from and Indexable#upto
- Add Array#from and Array#thru
- Add NA class via na.rb
- Add Memoizable in memoizable.rb for a more robust memoization system
- Add Module#safe_memo in thread.rb for thread safe memoization
- Add Kernel#sandbox in thread.rb for threaded $SAFE=4 evaluation
- Add Hash#subset
- Add Kernel#Y to tour library
- Add numerous Math extensions
๐ Deprecations
- Deprecate Module#attr_toggler as a YAGNI
- Deprecate Kernel#class_eval b/c of it's confusing behavior
- Deprecate Module#once is no longer an alias for #memoize
- Deprecate Integer#succ(n) (for compatibility reasons)
- Deprecate Stackable, it's method were moved to CORE
- Deprecate Kernel#populate and #set_from (use #assign and #assign_from)
- Deprecate Kernel#non_nil? since #not_nil? is enough
- Deprecate #HERE b/c implementation was unreliable
- Deprecate Time#since, use #less instead
- Deprecate Time#advance, use #shift instead
- Deprecate Kernel#super_as (no good way to get callers method name)
- Deprecate Integer#clear_bit, use #bit_clear instead
- Deprecate Kernel#resc, use String#to_re or #to_rx instead
- Deprecate Module#modspace
- Deprecate Kernel#__ and class X for Proc#partial, use NA instead
- Deprecate autoreload.rb has been spun-off to a separate project
- Deprecate Module#nesting, b/c redundant and overlap with Module.nesting
๐ Renamed Features
- Rename Module#parent to Module#enclosure
- Rename Module#parents to Module#enclosures
- Rename Module#parent_name to Module#modname
- Rename Array#recurisvely to Array#recurse
- Rename Hash#recurisvely to Hash#recurse
- Rename Enumerable#recursive to Enumerable#recursively
- Rename Array#recursive to Array#recursively
- Rename Hash#recursive to Hash#recursively
- Rename Kernel#silence_warnings to Kernel#disable_warnings
- Rename Hash#recursive_merge to Hash#deep_merge
- Rename Class#prepend to Class#preallocate
- Rename File#atomic_write to FileUtils#atomic_write
- Rename Module#conflict to Module#method_clash
- Rename Class#inheritor to Module#class_inheritor
- Rename Symbol#re_s to Symbol#as_s
- Rename String#chars to String#characters
- Rename String#outdent to String#unindent
- Rename Time#round to Time#round_to
- Rename Time#hence to Time#shift (but keep aliases)
- Rename Hash#zipnew to Hash#zip
๐ Moved Libraries
- Move roman.rb to integer/roman and string/roman.rb
- Move blank.rb to kernel/blank.rb
- Move facets-live.rb to facets/auto_core.rb
- Move cattr.rb to MORE library
- Move duplicable.rb to kernel/dup.rb
- Move bitmask.rb to integer/bitmask.rb
- Move enumerable/divide.rb to array/divide.rb
- Move enumerable/split.rb to array/split.rb
- Move enumerable/entropy.rb to array/entropy.rb
- Move enumerable/probability.rb to array/probability.rb
- Move enumerable/duplicates.rb array/duplicates.rb
- Move module/enclosure.rb to optional TOUR libs
- Move kernel/instance_exec to option TOUR libs
๐ Bug Fixes
- Fix Fixed Hash#rekey! from clobbering previous keys
- Fix Exception#raised? is a class method
- Fix Enumerator#fx should use #map instead of #each
- Fix String#splice needs String#store
- Fix Kernel#blank? empty condition was faulty
- Fix Comparable#bound needs clip.rb, not cap.rb
- Fix String#file needs to pass block
- Fix String#edit_distance use new encodings for Ruby 1.9
๐ Improved Features
- New lib/tour division of libraries
- Module#class_extend dynamically creates append_features method
- Kernel#require_all is only for relative requires
- DIR can take subdirectory arguments
- Hash#join has more sensible default separator (' ')
- Some OpEsc escapes have been renamed
- Kernel#assign does not accept a block
- Kernel#try is now like ActiveSupport's
- Improved #respond (which is like old #try)
- Remove all
if defined?(ActiveSupport)
conditions - Use #random_range to support specialized Range#at_rand functionality
- Use Comparable.[] instead of Comparable()
- Array#rotate rotates in opposite direction than before (b/c or Ruby 1.9)
-
v2.8.4 Changes
April 27, 2010๐ A minor point release just to get a few improvements out there before ๐ endeavering into more extensive work for the next major release.
๐ New Features
- Added #glob_relative to Pathname
๐ Deprecations
- Deprecated BlankSlate (use BasicObject)
- Deprecate hashbuilder.rb
- Removed casting_hash.rb, moved to new library
- Removed opencollection.rb, moved to new library
- Removed ansicode.rb, use ansi gem
๐ Bug Fixes
- changed Numeric#length to return self, not to_s.self
- Fix mispelling of Class#descendants
Other Improvements
- Range#at_rand has been optimized
- Kernel#singleton_class no longer can take a block
- Hash#to_proc takes response argument replacing #to_proc_with_response
- OpenHash becomes more like OpenObject and OpenObject becomes bare bones
- Range#at_rand optimized for Fixnum/Bignum instead of Integer
-
v2.8.3 Changes
April 10, 2010๐ New release which makes a few adjustments in Kernel core extensions, โ adds a few new extensions and additions, plus other small improvements. The biggest change is the addition of Recusor, which is created via Enumerable#recursive. This class is somewhat like Enumerator and provides a number of recursive methods.
๐ Changes:
9 New Core Extensions
- Enumerable#recursive provides a number of other recursive methods.
- Enumerable#visit can be used to recursively iterate any Enumerable.
- Module#set has been added (from Sinatra).
- Symbol#/ is added to be like String#/.
- Struct#to_h is added and will ultimately replace Struct#attributes.
- ObjectSpace#reflect routes method calls to Kernel context.
- Hash#to_module converts a hash to mixin module (Jay Fields).
- Kernel#dup! is same as #try_dup from extlib.
- Add File#ext which is a useful variation of #extname (Lavir the Whiolet).
3 Core Extensions Renamed
- Renamed #set_from to #assign_from (alias remains until Kernel#set is considerd).
- Renamed #populate to #assign and improve.
- Kernel#instance_vars is now Kernel#instance and also more useful.
๐ 1 Core Deprecation
- Removed #instance_eval hack.
๐ 2 Core Bug Fixes
- #map_with_index now uses #each_with_index.
- #to_proc_with_response spelling correction.
1 Core Adjustment
- Aliased #metadef to #meta_def.
3 New More Libraries
- casting_hash.rb provides CastingHash class, a hash with flexible keys and values.
- prepend.rb allows for AOP-like inclusion of modules.
- roman.rb provides simple roman numeral extensions to String and Integer.
5 More Improvements
- Pathname#visit for iterating all entries beneath a path (chikamichi).
- Pathname#to_str, b/c Pathname is basically a type of String (from extlib).
- Range#at_rand in random.rb handles Float ranges (Lavir the Whiolet).
- FileUtils#cp_rx provides controlled copies.
- Stash class in stash.rb is improved and is now available as a stand-alone library.
- ioredirect.rb has been removed as IORedirect no longer worked.
- plugin_manager.rb has been removed. Use 'plugin' gem instead.
-
v2.8.2 Changes
February 22, 2010๐ This release fixes a bug by removing Numeric#size. Turns out that was a core method already. It includes an "auditing" of the core enumerable method which has led to a few modifications most noteable amoung them renaming #map_detect to #find_yield and #compact_map to #purge.
๐ Changes:
7 New Core Extensions
- Add Enumerable#each_with_object.
- Add #collapse which is a shortcut for flatten.compact.
- Add Numeric#spacing (Mr. Groff)
- Add Array#uniq_by! to complement Enumerable#uniq_by.
- Add String#exclude? as opposite of #include?
- Add Enumerable#exclude? as opposite of #include?
- Add Proc#bind_to
2 Extensions Renamed
- Rename Enumerable#compact_map to #purge.
- Rename Enumerable#map_detect to #find_yield.
๐ 4 Deprecations
- Deprecate #inject!/#injecting in favor of #filter.
- Deprecate Array#** as alias of #product.
- Remove Numeric#size, as it was already used by core.
- Spun tracepoint.rb off as a seprate library.
3 Other Changes
- Integer#multiple? handles zero as an argument.
- facets.rb is now dynamically loaded instead of code generated.
- General imporvements to date.rb.
-
v2.8.1 Changes
December 25, 2009๐ This release simply fixes a few minor issues.
๐ Changes:
1 New Standard Extension
- Added Pathname#glob_relative to pathanme.rb.
3 Adjustments
- Loading string/tab.rb no longer loads margin.rb or expand_tab.rb.
- Fixed FileList method delegations.
- Numeric#length and #size return +self+, not +to_s.length+.