[Rubygems-developers] 1.3.2?

Daniel Berger djberg96 at gmail.com
Sun Mar 15 00:18:50 EDT 2009


Berger, Daniel wrote:

<snip>

>   2) Error:
> test_equals_tilde_escape(TestGemDependency):
> TypeError: can't convert Regexp into String
>     C:/Documents and Settings/djberge/workspace/rubygems/lib/rubygems/dependency.rb:124:in `=~'
>     C:/Documents and Settings/djberge/workspace/rubygems/lib/rubygems/dependency.rb:124:in `=~'
>     C:/ruby/lib/ruby/gems/1.8/gems/minitest-1.3.0/lib/minitest/unit.rb:116:in `assert_match'
>     ./test/test_gem_dependency.rb:128:in `test_equals_tilde_escape'
>     C:/ruby/lib/ruby/gems/1.8/gems/minitest-1.3.0/lib/minitest/unit.rb:421:in `__send__'
>     C:/ruby/lib/ruby/gems/1.8/gems/minitest-1.3.0/lib/minitest/unit.rb:421:in `run'
>     C:/ruby/lib/ruby/gems/1.8/gems/minitest-1.3.0/lib/minitest/unit.rb:400:in `run_test_suites'
>     C:/ruby/lib/ruby/gems/1.8/gems/minitest-1.3.0/lib/minitest/unit.rb:394:in `each'
>     C:/ruby/lib/ruby/gems/1.8/gems/minitest-1.3.0/lib/minitest/unit.rb:394:in `run_test_suites'
>     C:/ruby/lib/ruby/gems/1.8/gems/minitest-1.3.0/lib/minitest/unit.rb:393:in `each'
>     C:/ruby/lib/ruby/gems/1.8/gems/minitest-1.3.0/lib/minitest/unit.rb:393:in `run_test_suites'
>     C:/ruby/lib/ruby/gems/1.8/gems/minitest-1.3.0/lib/minitest/unit.rb:373:in `run'
>     C:/ruby/lib/ruby/gems/1.8/gems/minitest-1.3.0/lib/minitest/unit.rb:317:in `autorun'
>     C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb:5

I traced this one down (and it's not Windows specific). It looks like 
it's trying to compare a Regexp to a Regexp with the =~ method, which is 
illegal. This is what that particular test to doing:

irb(main):001:0> /\Aa\Z/ =~ /a|b/
TypeError: can't convert Regexp into String
         from (irb):1

I'm not sure what the proper behavior is for Gem::Dependency because it 
is poorly documented. So, I don't know if the behavior is wrong or the 
test itself is bad.

Regards,

Dan


More information about the Rubygems-developers mailing list