Skip to content

Instantly share code, notes, and snippets.

@syohex
Created November 23, 2011 02:04
Show Gist options
  • Select an option

  • Save syohex/1387719 to your computer and use it in GitHub Desktop.

Select an option

Save syohex/1387719 to your computer and use it in GitHub Desktop.
Crypt-SSLeay-0.58_01のパッチ
diff --git a/t/01-connect.t b/t/01-connect.t
index cf6b335..d0b79fc 100644
--- a/t/01-connect.t
+++ b/t/01-connect.t
@@ -2,6 +2,7 @@ use strict;
use Test::More tests => 8;
use Net::SSL;
+use Errno ();
# ensure no proxification takes place
$ENV{NO_PROXY} = '127.0.0.1';
@@ -18,7 +19,7 @@ eval {
my $test_name = 'Net::SSL->new';
if ($@) {
my $fail = $@;
- if ($fail =~ /\AConnect failed: connect: \b/i) {
+ if ($! == Errno::ECONNREFUSED) {
pass( "$test_name - expected failure" );
}
elsif ($fail =~ /\ASSL negotiation failed:/i) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment