Permalink
Browse files

fix Kernel#exec failing with a dash and no args

close #1555
  • Loading branch information...
cldwalker authored and brixen committed Mar 9, 2012
1 parent 53c2335 commit c016cdf523b5e0447b56a5db7dd4c08f37b69cbe
Showing with 4 additions and 0 deletions.
  1. +4 −0 core/kernel/exec_spec.rb
View
@@ -10,6 +10,10 @@
lambda { exec "" }.should raise_error(SystemCallError)
end
+ it "raises a SystemCallError if cmd cannot execute and contains '-'" do
+ lambda { exec 'cmd-plugin' }.should raise_error(SystemCallError)
+ end
+
it "raises Errno::ENOENT if the script does not exist" do
lambda { exec "bogus-noent-script.sh" }.should raise_error(Errno::ENOENT)
end

0 comments on commit c016cdf

Please sign in to comment.