Catch invalid comparison errors

I wanted to up merge some changes to catch some invalid comparisons.  Happy to update/change based on any feedback you have.   


Benchmarking with new commits:

    /ruby-1.9.3-p374/bin/ruby ./performance/benchmark.rb
    Rehearsal ------------------------------------------------
    parse:         3.720000   0.000000   3.720000 (  3.723294)
    parse & run:   9.050000   0.010000   9.060000 (  9.086041)
    -------------------------------------- total: 12.780000sec

                       user     system      total        real
    parse:         3.750000   0.000000   3.750000 (  3.763244)
    parse & run:   9.100000   0.010000   9.110000 (  9.138381)

    /ruby-1.9.3-p374/bin/ruby ./performance/benchmark.rb
    Rehearsal ------------------------------------------------
    parse:         3.780000   0.000000   3.780000 (  3.796001)
    parse & run:   9.110000   0.020000   9.130000 (  9.210970)
    -------------------------------------- total: 12.910000sec

                       user     system      total        real
    parse:         3.820000   0.000000   3.820000 (  3.862643)
    parse & run:   9.110000   0.010000   9.120000 (  9.154660)

Previously: 

    /ruby-1.9.3-p374/bin/ruby ./performance/benchmark.rb
    Rehearsal ------------------------------------------------
    parse:         3.820000   0.000000   3.820000 (  3.847666)
    parse & run:   9.080000   0.030000   9.110000 (  9.158944)
    -------------------------------------- total: 12.930000sec

                       user     system      total        real
    parse:         3.770000   0.010000   3.780000 (  3.804065)
    parse & run:   9.020000   0.020000   9.040000 (  9.095371)

    /ruby-1.9.3-p374/bin/ruby ./performance/benchmark.rb
    Rehearsal ------------------------------------------------
    parse:         3.820000   0.000000   3.820000 (  3.837458)
    parse & run:   9.640000   0.030000   9.670000 (  9.735492)
    -------------------------------------- total: 13.490000sec

                       user     system      total        real
    parse:         3.910000   0.010000   3.920000 (  3.933498)
    parse & run:   9.500000   0.030000   9.530000 (  9.594287)


P.S. benchmarking was done in July 2013. I just never got around to pushing this upstream.