Skip to content

Instantly share code, notes, and snippets.

@swarley
Created January 15, 2013 23:32
Show Gist options
  • Select an option

  • Save swarley/4543154 to your computer and use it in GitHub Desktop.

Select an option

Save swarley/4543154 to your computer and use it in GitHub Desktop.
puts "foo"
### report: Hello <%= "Test" %> world!
puts "bar"
def test_a_method
foo_bar = rand(160)
### Report: The random number recieved in <%= __method__ %> is <%= foo_bar %>
end
5.times { test_a_method }
# swarley@OctaviasViolin ~/Programming/RbDbg % ruby -r ./debugger.rb -e"load './test.rb'"
# foo
# Hello Test world!
# bar
# The random number recieved in test_a_method is 99
# The random number recieved in test_a_method is 36
# The random number recieved in test_a_method is 30
# The random number recieved in test_a_method is 28
# The random number recieved in test_a_method is 129
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment