summaryrefslogtreecommitdiff
path: root/lib/net/ssh/authentication/pageant.rb
diff options
context:
space:
mode:
authorJan Segre <jan@segre.in>2013-03-02 00:29:53 -0300
committerJan Segre <jan@segre.in>2013-03-02 00:29:53 -0300
commite6b864bfaebb88ea3e7eee6b1ada1ec8572b6294 (patch)
tree2daea82456c904510abce778c25117a5077ace77 /lib/net/ssh/authentication/pageant.rb
parent0de7bfdc21d17e2a53e994a94b05307445e16a27 (diff)
downloadnet-ssh-e6b864bfaebb88ea3e7eee6b1ada1ec8572b6294.tar.gz
This should fix #85.
It's prefered to fallback to the newer api instead of checking for versions before 1.9 and 1.9 and leaving others open to breakage.
Diffstat (limited to 'lib/net/ssh/authentication/pageant.rb')
-rw-r--r--lib/net/ssh/authentication/pageant.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/net/ssh/authentication/pageant.rb b/lib/net/ssh/authentication/pageant.rb
index 0c6a4f4..bbeb6a3 100644
--- a/lib/net/ssh/authentication/pageant.rb
+++ b/lib/net/ssh/authentication/pageant.rb
@@ -2,9 +2,7 @@ require 'dl/import'
if RUBY_VERSION < "1.9"
require 'dl/struct'
-end
-
-if RUBY_VERSION =~ /^1.9/
+else
require 'dl/types'
require 'dl'
end
@@ -34,9 +32,7 @@ module Net; module SSH; module Authentication
dlload 'user32'
dlload 'kernel32'
- end
-
- if RUBY_VERSION =~ /^1.9/
+ else
extend DL::Importer
dlload 'user32','kernel32'
include DL::Win32Types