sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Range#include_with_range?
Extends the default Range#include? to support range comparisons.
(1..5).include?(1..5) # => true
(1..5).include?(2..3) # => true
(1..5).include?(2..6) # => false
The native Range#include? behavior is untouched.
('a'..'f').include?('c') # => true
(5..9).include?(11) # => falseEdit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/activesupport/lib/active_support/core_ext/range/include_range.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Range-include_with_range--for-pr
# Commit to gitgit add app/server/ruby/vendor/activesupport/lib/active_support/core_ext/range/include_range.rbgit commit -m "better docs for Range#include_with_range?"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Range-include_with_range--for-pr
hub pull-request
# Celebrate!