server/executionhandlers/ruby/connection.rb in cpee-2.1.48 vs server/executionhandlers/ruby/connection.rb in cpee-2.1.49
- old
+ new
@@ -271,16 +271,18 @@
result = result.to_i if result == result.to_i.to_s
else
result = result[0]
end
end
+ else
+ Riddl::Parameter::Array[*result]
end
if result.is_a? String
enc = detect_encoding(result)
enc == 'OTHER' ? result : (result.encode('UTF-8',enc) rescue convert_to_base64(result))
else
- Riddl::Parameter::Array[*result]
+ result
end
end
def detect_encoding(text)
if text.is_a? String
@@ -377,10 +379,10 @@
p.value.close
end
end
end #}}}
- def test_condition(mr,code)
+ def test_condition(mr,code,args)
res = mr.instance_eval(code,'Condition',1)
@controller.notify("gateway/decide", :instance_uuid => @controller.uuid, :code => code, :condition => (res ? "true" : "false"))
res
end