@@ -44,7 +44,7 @@ def open_connection(server)
4444 encryption = server [ :encryption ]
4545
4646 socket_opts = {
47- connect_timeout : server [ :connect_timeout ] || DefaultConnectTimeout
47+ connect_timeout : server [ :connect_timeout ] || DefaultConnectTimeout ,
4848 }
4949
5050 errors = [ ]
@@ -133,7 +133,7 @@ def setup_encryption(args)
133133 when :start_tls
134134 message_id = next_msgid
135135 request = [
136- Net ::LDAP ::StartTlsOid . to_ber_contextspecific ( 0 )
136+ Net ::LDAP ::StartTlsOid . to_ber_contextspecific ( 0 ) ,
137137 ] . to_ber_appsequence ( Net ::LDAP ::PDU ::ExtendedRequest )
138138
139139 write ( request , nil , message_id )
@@ -283,7 +283,7 @@ def encode_sort_controls(sort_definitions)
283283 sort_control = [
284284 Net ::LDAP ::LDAPControls ::SORT_REQUEST . to_ber ,
285285 false . to_ber ,
286- sort_control_values . to_ber_sequence . to_s . to_ber
286+ sort_control_values . to_ber_sequence . to_s . to_ber ,
287287 ] . to_ber_sequence
288288 end
289289
@@ -396,7 +396,7 @@ def search(args = nil)
396396 time . to_ber ,
397397 attrs_only . to_ber ,
398398 filter . to_ber ,
399- ber_attrs . to_ber_sequence
399+ ber_attrs . to_ber_sequence ,
400400 ] . to_ber_appsequence ( Net ::LDAP ::PDU ::SearchRequest )
401401
402402 # rfc2696_cookie sometimes contains binary data from Microsoft Active Directory
@@ -409,7 +409,7 @@ def search(args = nil)
409409 Net ::LDAP ::LDAPControls ::PAGED_RESULTS . to_ber ,
410410 # Criticality MUST be false to interoperate with normal LDAPs.
411411 false . to_ber ,
412- rfc2696_cookie . map { | v | v . to_ber } . to_ber_sequence . to_s . to_ber
412+ rfc2696_cookie . map ( & : to_ber) . to_ber_sequence . to_s . to_ber ,
413413 ] . to_ber_sequence if paged
414414 controls << ber_sort if ber_sort
415415 controls = controls . empty? ? nil : controls . to_ber_contextspecific ( 0 )
@@ -503,7 +503,7 @@ def search(args = nil)
503503 MODIFY_OPERATIONS = { #:nodoc:
504504 :add => 0 ,
505505 :delete => 1 ,
506- :replace => 2
506+ :replace => 2 ,
507507 }
508508
509509 def self . modify_ops ( operations )
@@ -535,7 +535,7 @@ def modify(args)
535535 message_id = next_msgid
536536 request = [
537537 modify_dn . to_ber ,
538- ops . to_ber_sequence
538+ ops . to_ber_sequence ,
539539 ] . to_ber_appsequence ( Net ::LDAP ::PDU ::ModifyRequest )
540540
541541 write ( request , nil , message_id )
@@ -604,7 +604,7 @@ def add(args)
604604 add_dn = args [ :dn ] or raise Net ::LDAP ::EmptyDNError , "Unable to add empty DN"
605605 add_attrs = [ ]
606606 a = args [ :attributes ] and a . each do |k , v |
607- add_attrs << [ k . to_s . to_ber , Array ( v ) . map { | m | m . to_ber } . to_ber_set ] . to_ber_sequence
607+ add_attrs << [ k . to_s . to_ber , Array ( v ) . map ( & : to_ber) . to_ber_set ] . to_ber_sequence
608608 end
609609
610610 message_id = next_msgid
0 commit comments