From 776c4a2d66e3d2220b2151d1eb278746cf6e10e1 Mon Sep 17 00:00:00 2001 From: Alejandro Huertas Herrero Date: Thu, 30 Apr 2020 11:07:33 +0200 Subject: [PATCH] M #-: fix minor bug (#4631) --- src/onedb/onedb.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/onedb/onedb.rb b/src/onedb/onedb.rb index 910e7b62cd..174fb355ab 100644 --- a/src/onedb/onedb.rb +++ b/src/onedb/onedb.rb @@ -27,7 +27,7 @@ class OneDB def initialize(ops) if ops[:backend].nil? && CONNECTION_PARAMETERS.all? {|s| ops[s].nil? } ops = read_credentials(ops) - elsif ops[:backend].nil? && CONNECTION_PARAMETERS.one? {|s| !ops[s].nil? } + elsif ops[:backend].nil? && CONNECTION_PARAMETERS.any? {|s| !ops[s].nil? } # Set MySQL backend as default if any connection option is provided and --type is not ops[:backend] = :mysql end @@ -141,7 +141,7 @@ class OneDB ops.each {|_, v| v.gsub!("\\", '') if v } - ops[:backend] = ops[:backend].to_sym + ops[:backend] = ops[:backend].to_sym unless ops[:backend].nil? ops[:port] = ops[:port].to_i ops