sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

ActiveSupport::Dependencies#new_constants_in

Run the provided block and detect the new constants that were loaded during
its execution. Constants may only be regarded as 'new' once -- so if the
block calls +new_constants_in+ again, then the constants defined within the
inner call will not be reported in this one.

If the provided block does not run to completion, and instead raises an
exception, any new constants are regarded as being only partially defined
and will be removed immediately.

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/activesupport/lib/active_support/dependencies.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ActiveSupport--Dependencies-new_constants_in-for-pr


# Commit to git

git add app/server/ruby/vendor/activesupport/lib/active_support/dependencies.rbgit commit -m "better docs for ActiveSupport::Dependencies#new_constants_in"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ActiveSupport--Dependencies-new_constants_in-for-pr

hub pull-request


# Celebrate!