This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crow:play john$ bacon bacon_intercept.rb | |
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/pry-0.9.8pre4/lib/pry/pry_class.rb:207: | |
alpha | |
- should be empty | |
Frame number: 0/16 | |
Frame type: method | |
From: /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/bacon-1.1.0/lib/bacon.rb @ line 331 in Should#satisfy: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails in gdb c/o ryanf: | |
gdb --args ruby `which rails` server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/lib/ruby/gems/1.9.1/gems/pry-stack_explorer-0.2.6pre2/lib/pry-stack_explorer.rb:62: [BUG] Segmentation fault | |
ruby 1.9.3p0 (2011-10-30) [x86_64-darwin11.2.0] | |
-- Control frame information ----------------------------------------------- | |
c:0078 p:---- s:0439 b:0439 l:000438 d:000438 CFUNC :callers | |
c:0077 p:0076 s:0436 b:0436 l:0021e8 d:002190 BLOCK /usr/local/lib/ruby/gems/1.9.1/gems/pry-stack_explorer-0.2.6pre2/lib/pry-stack_explorer.rb:62 | |
c:0076 p:---- s:0429 b:0429 l:000428 d:000428 FINISH | |
c:0075 p:---- s:0427 b:0427 l:000426 d:000426 CFUNC :call | |
c:0074 p:0017 s:0422 b:0422 l:000406 d:000421 BLOCK /Users/leepfrog/.bundler/ruby/1.9.1/pry-36d685f71fd6/lib/pry/hooks.rb:40 | |
c:0073 p:---- s:0418 b:0418 l:000417 d:000417 FINISH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pry.commands.command "alias" do |name, action| | |
Pry.commands.command name do |*args| | |
run action, *args | |
end | |
end | |
# => #<struct Pry::CommandSet::Command | |
# name="alias", | |
# description="No description.", | |
# options= | |
# {:requires_gem=>[], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original Benchmark used to consider whether to keep define_method or switch | |
# to instance_exec for Sinatra 1.3.0. | |
# | |
# == Ruby 1.8.7 | |
# instan_exec 0.650000 0.000000 0.650000 ( 0.650820) | |
# instan_eval 0.620000 0.000000 0.620000 ( 0.621846) | |
# bind.call 0.140000 0.010000 0.150000 ( 0.141961) | |
# | |
# == Ruby 1.9.2 | |
# user system total real |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'coolline' | |
Pry.config.input = Coolline.new do |cool| | |
cool.word_boundaries = [" ", "\t", ",", ";", ".", '"', "'", "`", "<", ">", | |
"=", ";", "|", "{", "}", "(", ")", "-"] | |
cool.history_file = Coolline::NullFile | |
cool.transform_proc = proc do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SmallInt => # self becomes SmallInt | |
define multiply_by: n and_add: stuff | |
self * n + stuff | |
Foo := Object subclass => # (=> has a very low precedence) | |
define love # love is an odd, little thing. | |
3 | |
Block => | |
define call |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SmallInt => | |
define multiply_by: n and_add: stuff | |
self * n + stuff | |
Foo := Object subclass => | |
define love | |
3 | |
Block => | |
define call |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def valid_ruby?(str) | |
catch(:valid) { | |
eval("BEGIN{throw :valid,true};#{str}") | |
} | |
rescue SyntaxError | |
false | |
end | |
p valid_ruby?("123") | |
p valid_ruby?("'") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changes in HEAD | |
Modified lib/pry/pry_instance.rb | |
diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb | |
index 7510525..7f42f9c 100644 | |
--- a/lib/pry/pry_instance.rb | |
+++ b/lib/pry/pry_instance.rb | |
@@ -208,9 +208,16 @@ class Pry | |
def re(target=TOPLEVEL_BINDING) | |
target = Pry.binding_for(target) | |