rtomayko / posix-spawn

Ruby process spawning library
Other
520 stars 52 forks source link

posix-spawn 0.3.9 is not compatible with ruby 1.8 #62

Closed DaveRobinson closed 9 years ago

DaveRobinson commented 10 years ago

It looks like after the update to 0.3.9 posix-spawn stopped working under ruby 1.8. Running rake test gives the following under ruby 1.8.7

cp lib/posix/spawn.rb tmp/x86_64-linux/stage/lib/posix/spawn.rb install -c tmp/x86_64-linux/posix_spawn_ext/1.8.7/posix_spawn_ext.so lib/posix_spawn_ext.so cp tmp/x86_64-linux/posix_spawn_ext/1.8.7/posix_spawn_ext.so tmp/x86_64-linux/stage/lib/posix_spawn_ext.so ./lib/posix-spawn.rb:1:in require': ./lib/posix/spawn.rb:243: syntax error, unexpected tSYMBEG, expecting tAMPER (SyntaxError) ::Kernel::exec(*argv, :close_others=>false) ^ ./lib/posix/spawn.rb:274: syntax error, unexpected tIDENTIFIER, expecting tAMPER ...(*system_command_prefixes, cmd, :out => w, r => :close) ^ ./lib/posix/spawn.rb:274: syntax error, unexpected tASSOC, expecting tCOLON2 or '[' or '.' ...command_prefixes, cmd, :out => w, r => :close) ^ ./lib/posix/spawn.rb:274: syntax error, unexpected tASSOC, expecting '=' ...prefixes, cmd, :out => w, r => :close) ^ ./lib/posix/spawn.rb:526: syntax error, unexpected ',', expecting ']' [*system_command_prefixes, args[0]] ^ ./lib/posix/spawn.rb:526: syntax error, unexpected ']', expecting kEND from ./lib/posix-spawn.rb:1 from /home/drobinson/posix-spawn/test/test_backtick.rb:2:inrequire' from /home/drobinson/posix-spawn/test/test_backtick.rb:2 from /usr/lib/ruby/gems/1.8/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:15:in require' from /usr/lib/ruby/gems/1.8/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:15 from /usr/lib/ruby/gems/1.8/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:4:inselect' from /usr/lib/ruby/gems/1.8/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:4 rake aborted! Command failed with status (1): [ruby -I"lib" -I"/usr/lib/ruby/gems/1.8/gems/rake-10.3.2/lib" "/usr/lib/ruby/gems/1.8/gems/rake-10.3.2/lib/rake/rake_test_loader.rb" "test/test_backtick.rb" "test/test_child.rb" "test/test_popen.rb" "test/test_spawn.rb" "test/test_system.rb" ]

Tasks: TOP => test (See full trace by running task with --trace)

I don't get any problems under ruby 1.9.3 If removing support for ruby 1.8 is intentional/acceptable then it would be worth at least updating the Gemfile /docs.

david-robinson-practiceweb commented 9 years ago

Can confirm that the v0.3.10 release resolves this for me.