changeset 3181:72af533a3bd3

Tidied up code and fixed rescue block to catch SyntaxError in eval
author unexist
date Wed, 01 Feb 2012 16:45:28 +0100
parents f43f91fbdce1
children 6a0cf3b69bb0
files data/subtler/runner.rb data/sur/specification.rb
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/data/subtler/runner.rb	Wed Feb 01 13:53:40 2012 +0100
+++ b/data/subtler/runner.rb	Wed Feb 01 16:45:28 2012 +0100
@@ -155,7 +155,7 @@
         arg2 = Integer(arg2) rescue arg2
 
         # Pipes?
-        arg1 = ARGF.read.chop if('-' == arg1)
+        arg1 = ARGF.read.chop if '-' == arg1
 
         if '-' == arg2
           # Read pipe until EOF
--- a/data/sur/specification.rb	Wed Feb 01 13:53:40 2012 +0100
+++ b/data/sur/specification.rb	Wed Feb 01 16:45:28 2012 +0100
@@ -112,7 +112,7 @@
           # Create spec
           spec      = eval(File.open(file).read)
           spec.path = File.dirname(file)
-        rescue
+        rescue Exception => e
           spec = nil
         end