Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Ruby 1.9.3 compatibility #2

Open
semaperepelitsa opened this Issue · 5 comments

2 participants

@semaperepelitsa

It stopped working under Ruby 1.9.3-p0. Here is the backtrace:

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.+
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/colorific-1.0.1/lib/colorific.rb:75:in `block in increment'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/colorific-1.0.1/lib/colorific.rb:69:in `with_color'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/colorific-1.0.1/lib/colorific.rb:74:in `increment'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/colorific-1.0.1/lib/colorific.rb:39:in `print'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.6.2/lib/minitest/unit.rb:816:in `block in _run_suite'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.6.2/lib/minitest/unit.rb:805:in `map'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.6.2/lib/minitest/unit.rb:805:in `_run_suite'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:565:in `block in _run_suites'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:563:in `each'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:563:in `_run_suites'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.6.2/lib/minitest/unit.rb:771:in `_run_anything'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.6.2/lib/minitest/unit.rb:934:in `run_tests'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.6.2/lib/minitest/unit.rb:921:in `block in _run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.6.2/lib/minitest/unit.rb:920:in `each'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.6.2/lib/minitest/unit.rb:920:in `_run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.6.2/lib/minitest/unit.rb:909:in `run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:21:in `run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:630:in `run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/bundler/gems/spork-testunit-a60efbe60bb9/lib/spork/test_framework/test_unit.rb:44:in `run_tests'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/run_strategy/forking.rb:13:in `block in run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/forker.rb:21:in `block in initialize'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/forker.rb:18:in `fork'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/forker.rb:18:in `initialize'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/run_strategy/forking.rb:9:in `new'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/run_strategy/forking.rb:9:in `run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/server.rb:48:in `run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'
@carlosbrando
Owner

Could you make a try with the new version (1.0.2)?

@semaperepelitsa

The same error, unfortunately.

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.+
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/colorific-1.0.2/lib/colorific.rb:75:in `block in increment'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/colorific-1.0.2/lib/colorific.rb:69:in `with_color'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/colorific-1.0.2/lib/colorific.rb:74:in `increment'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/colorific-1.0.2/lib/colorific.rb:39:in `print'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:800:in `block in _run_suite'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:789:in `map'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:789:in `_run_suite'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:565:in `block in _run_suites'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:563:in `each'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:563:in `_run_suites'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:755:in `_run_anything'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:918:in `run_tests'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:905:in `block in _run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:904:in `each'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:904:in `_run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:893:in `run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:21:in `run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:630:in `run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/bundler/gems/spork-testunit-92495b3fa3ee/lib/spork/test_framework/test_unit.rb:59:in `run_tests'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/run_strategy/forking.rb:13:in `block in run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/forker.rb:21:in `block in initialize'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/forker.rb:18:in `fork'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/forker.rb:18:in `initialize'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/run_strategy/forking.rb:9:in `new'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/run_strategy/forking.rb:9:in `run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/server.rb:48:in `run'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'
@carlosbrando
Owner

Here everything are working well.. Could you clone the repo, run the tests files and send me the results?

@semaperepelitsa

I'm not sure that I run them properly but here is the result:

bundle exec testrb test/test_error.rb test/test_fail.rb test/test_nothing.rb test/test_pass.rb test/test_skip.rb
Run options: 

# Running tests:

/Users/sema/Code/colorific/lib/colorific.rb:75:in `block in increment': undefined method `+' for nil:NilClass (NoMethodError)
    from /Users/sema/Code/colorific/lib/colorific.rb:69:in `with_color'
    from /Users/sema/Code/colorific/lib/colorific.rb:74:in `increment'
    from /Users/sema/Code/colorific/lib/colorific.rb:39:in `print'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:800:in `block in _run_suite'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:789:in `map'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:789:in `_run_suite'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:565:in `block in _run_suites'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:563:in `each'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:563:in `_run_suites'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:755:in `_run_anything'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:918:in `run_tests'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:905:in `block in _run'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:904:in `each'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:904:in `_run'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/minitest-2.8.0/lib/minitest/unit.rb:893:in `run'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:21:in `run'
    from /Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:630:in `run'
    from /Users/sema/.rbenv/versions/1.9.3-p0/bin/testrb:10:in `<main>'

The whole text also is in different color each time I run the tests.

@carlosbrando
Owner

Try to run each one individually. And run it inside the /test directory too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.