File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -440,6 +440,12 @@ def session_new_cb
440
440
def session_get_cb
441
441
@context . session_get_cb
442
442
end
443
+
444
+ class << self
445
+ ##
446
+ # open is an alias to ::new
447
+ alias open new
448
+ end
443
449
end
444
450
445
451
##
Original file line number Diff line number Diff line change @@ -1592,6 +1592,17 @@ def test_fileno
1592
1592
sock2 . close
1593
1593
end
1594
1594
1595
+ def test_ssl_socket_new_alias
1596
+ mn = OpenSSL ::SSL ::SSLSocket . method ( :new )
1597
+ mo = OpenSSL ::SSL ::SSLSocket . method ( :open )
1598
+
1599
+ if mn . inspect == "#<Method: Class#new>"
1600
+ assert_equal mn . hash , mo . hash
1601
+ else
1602
+ assert_equal mn , mo
1603
+ end
1604
+ end
1605
+
1595
1606
private
1596
1607
1597
1608
def start_server_version ( version , ctx_proc = nil ,
You can’t perform that action at this time.
0 commit comments