Skip to content

Commit

Permalink
give trace a default block if none provided
Browse files Browse the repository at this point in the history
  • Loading branch information
coatl committed Jun 18, 2009
1 parent 998fa76 commit 1149611
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions regbind.rb
Expand Up @@ -109,6 +109,10 @@ class Trace
include Reg,Composite

def initialize(reg,&block)
block||=proc{|reg,other,result|
print "not " unless result
print reg.inspect, " === ", other.inspect, "\n"
}
@reg,@block=reg,block
super
# extend( HasCmatch===@reg ? HasCmatch : HasBmatch )
Expand Down

0 comments on commit 1149611

Please sign in to comment.