sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Rouge::Lexer#debug
Instead of `debug { "foo" }`, simply `puts "foo" if @debug`.
Leave a debug message if the `:debug` option is set. The message
is given as a block because some debug messages contain calculated
information that is unnecessary for lexing in the real world.
Calls to this method should be guarded with "if @debug" for best
performance when debugging is turned off.Edit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/rouge/lib/rouge/lexer.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Rouge--Lexer-debug-for-pr
# Commit to gitgit add app/server/ruby/vendor/rouge/lib/rouge/lexer.rbgit commit -m "better docs for Rouge::Lexer#debug"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Rouge--Lexer-debug-for-pr
hub pull-request
# Celebrate!