sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Hash#compact
Returns a hash with non +nil+ values.
hash = { a: true, b: false, c: nil}
hash.compact # => { a: true, b: false}
hash # => { a: true, b: false, c: nil}
{ c: nil }.compact # => {}Edit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/activesupport/lib/active_support/core_ext/hash/compact.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Hash-compact-for-pr
# Commit to gitgit add app/server/ruby/vendor/activesupport/lib/active_support/core_ext/hash/compact.rbgit commit -m "better docs for Hash#compact"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Hash-compact-for-pr
hub pull-request
# Celebrate!