The project is in a healthy, maintained state
This gem contans extensions to the Ruby core and standard libraries which have been used in many Pixar projects over the years.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

Pixar's Ruby Extensions

This gem defines extensions to modules and classes in Ruby's Core and Standard Library. We've put them here because we've found ourselves performing these tasks repeatedly in our code over the years and we like to stay DRY.

They are also used in our open-source projects, and those will be migrating to use this gem - also in pursuit of DRYness.

To ease troubleshooting and prevent name collisions:

  • Methods are not directly monkey-patched into the Core or StdLib classes/modules.

    • Instead they are defined in modules under PixarRubyExtensions with obvious namespaces, and mixed-in to the Core or StdLib classes/modules.

      This provides much easier debugging when there are exceptions, since the error and backtrace will indicate exactly where these methods are defined.

  • With only a couple of exceptions, all new method names are prefixed with pix_

    • See PixarRubyExtensions::IPAddr::Predicates for examples and explanation about the exceptions.

Usage

To load all the extensions: require 'pixar_ruby_extensions'

To load only one: require 'pixar_ruby_extensions/integer'

Credits

ToDo

  • Investigate re-doing all this using refinements rather than monkey-patching