Ruby Facets v2.5.1 Release Notes

Release Date: 2009-03-05 // about 15 years ago
  • 🛠 Facets 2.5.1 fixes a few bugs, makes some small but nice additions and improves 1.9 compatibility.

    The most important addition to make note of is Object#extend, which has been overridden to allow a block parameter. This is one of only two or three actual "monkey patches" in all of Facets. The block, when provided, is used to create an annonymous module which then extends the reciever. This is a "good practice" way to extend objects, rather than using class_eval on the singleton class.

    Special thanks to Erik Veenstra, Pit Capitan and especially Sandor Szücs 🚀 for their contributions to this release.

    🔄 Changes:

    • 7 Major Enhancements

      • added Hash#group_by_value (thanks to Erik Veenstra)
      • added String#file
      • added Hash#new_with (Pit Capitan)
      • added module/extend.rb, now can take a block.
      • added hook.rb
      • added to_h_auto
      • overhauled to_hash.rb, now has multiple methods
    • 🛠 10 Bug Fixes

      • corrected ostruct.rb to test for frozen state on updates
      • fixed String#left_align
      • fixed conflict between test_name.rb and test_arguments.rb
      • fixed Enumreable#split when reciever is empty array
      • fixed coruption of reciever by Hash#collate (thanks to Tilo Sloboda)
      • fixed Array#to_h, h={} was not initialized
      • fixed test of Module#conflict according ruby19
      • fixed Hash#dearray_singluar_values
      • association.rb stores reference when using #new
      • changed Array#product to make it compatible to ruby 19, deleted block parameter
    • 5 Minor Enhancements

      • split enumerable/collect into map_with_index and compact_map
      • improved Array#to_h for 1.9 using flatten(1)
      • Dictionary#replace can take regular Hash too
      • move test_to_hash.rb from more to core
      • Doc'd that UnboundMethod#name returns Symbol in 1.9, but String in 1.8