sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
String#last
Returns the last character of the string. If a limit is supplied, returns a substring from the end of the string until it reaches the limit value (counting backwards). If the given limit is greater than or equal to the string length, returns self. str = "hello" str.last # => "o" str.last(1) # => "o" str.last(2) # => "lo" str.last(0) # => "" str.last(6) # => "hello"
Edit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/string/access.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-String-last-for-pr
# Commit to gitgit add app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/string/access.rbgit commit -m "better docs for String#last"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-String-last-for-pr
hub pull-request
# Celebrate!