lib/wab/controller.rb in wabur-0.4.0d1 vs lib/wab/controller.rb in wabur-0.5.0

- old
+ new

@@ -230,12 +230,12 @@ def detect_string(value) # if the string matches a detectable type then don't quote it # ok as is return value if !value.empty? && value.start_with?("'") - if !/^-?\d+$/.match(value).nil? + if /^-?\d+$/ === value value.to_i - elsif !/^-?\d*\.?\d+([eE][-+]?\d+)?$/.match(value).nil? + elsif /^-?\d*\.?\d+([eE][-+]?\d+)?$/ === value value.to_f elsif WAB::Utils.uuid_format?(value) WAB::UUID.new(value) elsif WAB::Utils.wab_time_format?(value) begin