fix subjectid quoting in eval
authorrautenberg <rautenberg@in-silico.ch>
Fri, 23 Mar 2012 16:22:35 +0000 (17:22 +0100)
committerrautenberg <rautenberg@in-silico.ch>
Fri, 23 Mar 2012 16:22:35 +0000 (17:22 +0100)
lib/opentox.rb

index 4b43547..2232063 100644 (file)
@@ -146,7 +146,7 @@ module OpenTox
         internal_server_error "Cannot determine class from URI '#{uri} (Candidate classes are #{result.inspect}) or matadata." unless klass
       end
       # initialize with/without subjectid
-      subjectid ? eval("#{self}.new(\"#{uri}\", #{subjectid})") : eval("#{self}.new(\"#{uri}\")")
+      subjectid ? eval("#{self}.new(\"#{uri}\", \"#{subjectid}\")") : eval("#{self}.new(\"#{uri}\")")
     end
   end