Skip to content

Instantly share code, notes, and snippets.

@bmatheny
Last active December 14, 2015 08:49
Show Gist options
  • Select an option

  • Save bmatheny/5060642 to your computer and use it in GitHub Desktop.

Select an option

Save bmatheny/5060642 to your computer and use it in GitHub Desktop.

Revisions

  1. bmatheny renamed this gist Feb 28, 2013. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion gistfile1.rb → gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -22,4 +22,8 @@
    9: /Users/bmatheny/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/pry-0.9.10/lib/pry/pry_instance.rb:228:in `catch'
    [5] pry(main)> puts "Hello, #{name}"
    Hello, Cecilia
    => nil
    => nil
    [6] pry(main)> puts "Hello" + name
    HelloCecilia
    => nil
    [7] pry(main)>
  2. bmatheny created this gist Feb 28, 2013.
    25 changes: 25 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    % pry
    [1] pry(main)> puts "Hello, world!"
    Hello, world!
    => nil
    [2] pry(main)> name = "Cecilia"
    => "Cecilia"
    [3] pry(main)> puts "Hello, #{names}"
    NameError: undefined local variable or method `names' for main:Object
    from (pry):3:in `__pry__'
    [4] pry(main)> wtf?
    Exception: NameError: undefined local variable or method `names' for main:Object
    --
    0: (pry):3:in `__pry__'
    1: /Users/bmatheny/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/pry-0.9.10/lib/pry/pry_instance.rb:275:in `eval'
    2: /Users/bmatheny/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/pry-0.9.10/lib/pry/pry_instance.rb:275:in `re'
    3: /Users/bmatheny/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/pry-0.9.10/lib/pry/pry_instance.rb:251:in `rep'
    4: /Users/bmatheny/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/pry-0.9.10/lib/pry/pry_instance.rb:231:in `block (3 levels) in repl'
    5: /Users/bmatheny/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/pry-0.9.10/lib/pry/pry_instance.rb:230:in `loop'
    6: /Users/bmatheny/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/pry-0.9.10/lib/pry/pry_instance.rb:230:in `block (2 levels) in repl'
    7: /Users/bmatheny/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/pry-0.9.10/lib/pry/pry_instance.rb:229:in `catch'
    8: /Users/bmatheny/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/pry-0.9.10/lib/pry/pry_instance.rb:229:in `block in repl'
    9: /Users/bmatheny/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/pry-0.9.10/lib/pry/pry_instance.rb:228:in `catch'
    [5] pry(main)> puts "Hello, #{name}"
    Hello, Cecilia
    => nil