Skip to content

Commit 04bad5f

Browse files
committed
Can't use keyword args in 1.9
1 parent 8b77189 commit 04bad5f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/test_ldap_connection.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,15 @@ def test_write_increments_msgid
6868
end
6969

7070
class TestLDAPConnectionSocketReads < Test::Unit::TestCase
71-
def make_message(message_id, app_tag: Net::LDAP::PDU::SearchResult, code: Net::LDAP::ResultCodeSuccess, matched_dn: "", error_message: "")
72-
result = Net::BER::BerIdentifiedArray.new([code, matched_dn, error_message])
73-
result.ber_identifier = app_tag
71+
def make_message(message_id, options = {})
72+
options = {
73+
app_tag: Net::LDAP::PDU::SearchResult,
74+
code: Net::LDAP::ResultCodeSuccess,
75+
matched_dn: "",
76+
error_message: ""
77+
}.merge(options)
78+
result = Net::BER::BerIdentifiedArray.new([options[:code], options[:matched_dn], options[:error_message]])
79+
result.ber_identifier = options[:app_tag]
7480
[message_id, result]
7581
end
7682

0 commit comments

Comments
 (0)