pygments / pygments.rb

💎 Ruby wrapper for Pygments syntax highlighter
MIT License
572 stars 141 forks source link

Bump posix-spawn dependency to reflect 0.3.8 release? #110

Closed michaelplus closed 10 years ago

michaelplus commented 10 years ago

Why is Pygments listed as dependent on posix-spawn version 0.3.6 <= v < 0.3.7?

I have posix-spawn 0.3.8 installed and so far as I can tell pygments, as depended upon by jekyll, seems to be working fine. However, when using any version of pygments other than 0.5.0, jekyll build throws this error in Windows 8:

Generating... C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/posix-spawn-0.3.8/lib/posix/spawn.rb:162: 
warning: cannot close fd before spawn 'which' is 
not recognized as an internal or external command, operable program or batch file.

I raised this as an issue in jekyll, and it was suggested that the root of this problem was the pygments posix-spawn dependency. It was recommended that I report here (https://github.com/jekyll/jekyll/issues/2052#issuecomment-35209027)

Would there be a problem changing line 18 of pygments.rb.gemspec from s.add_dependency 'posix-spawn', '~> 0.3.6' to s.add_dependency 'posix-spawn', '>= 0.3.6', '< 0.3.9'?

parkr commented 10 years ago

This looks to be fixed based on the declaration in the current gemspec. Close away!

michaelplus commented 10 years ago

It seems like the gemspec still reads s.add_dependency 'posix-spawn', '~> 0.3.6' rather than something like s.add_dependency 'posix-spawn', '>= 0.3.6', '<= 0.3.9'.

However, I have not updated my environment or checked whether this still causes a warning, so perhaps I am missing something.

parkr commented 10 years ago

The pessimistic version operator allows for 0.3.9 to be installed. Try running bundle update