From 1149611d495991d5682e9d3218ba1a213755e36c Mon Sep 17 00:00:00 2001 From: Caleb Clausen Date: Thu, 18 Jun 2009 13:20:22 -0700 Subject: [PATCH] give trace a default block if none provided --- regbind.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/regbind.rb b/regbind.rb index fac9ea5..3c02ef9 100755 --- a/regbind.rb +++ b/regbind.rb @@ -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 )