sshkey 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sshkey.rb +2 -2
- data/lib/sshkey/version.rb +1 -1
- data/test/sshkey_test.rb +2 -0
- metadata +1 -1
data/lib/sshkey.rb
CHANGED
@@ -136,7 +136,7 @@ class SSHKey
|
|
136
136
|
def initialize(private_key, options = {})
|
137
137
|
@passphrase = options[:passphrase]
|
138
138
|
@comment = options[:comment] || ""
|
139
|
-
self.directives = options[:directives]
|
139
|
+
self.directives = options[:directives] || []
|
140
140
|
begin
|
141
141
|
@key_object = OpenSSL::PKey::RSA.new(private_key, passphrase)
|
142
142
|
@type = "rsa"
|
@@ -253,7 +253,7 @@ class SSHKey
|
|
253
253
|
end
|
254
254
|
|
255
255
|
def directives=(directives)
|
256
|
-
@directives = Array[directives].flatten
|
256
|
+
@directives = Array[directives].flatten.compact
|
257
257
|
end
|
258
258
|
attr_reader :directives
|
259
259
|
|
data/lib/sshkey/version.rb
CHANGED
data/test/sshkey_test.rb
CHANGED