diff --git a/lib/train/transports/ssh_connection.rb b/lib/train/transports/ssh_connection.rb index 65e150c1..5e07194c 100644 --- a/lib/train/transports/ssh_connection.rb +++ b/lib/train/transports/ssh_connection.rb @@ -217,7 +217,7 @@ def session(retry_options = {}) # @api private def to_s options_to_print = @options.clone - options_to_print[:password] = "" if options_to_print.has_key?(:password) + options_to_print[:password] = '' if options_to_print.key?(:password) "#{@username}@#{@hostname}<#{options_to_print.inspect}>" end