Skip to content

Commit 5c36ffb

Browse files
committed
Merge branch 'master' into support-version-in-dataset
2 parents 2e0f0fe + 4d01a2e commit 5c36ffb

File tree

12 files changed

+525
-223
lines changed

12 files changed

+525
-223
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ rvm:
44
- 2.0.0
55
- jruby-19mode
66
- rbx-19mode
7+
matrix:
8+
allow_failures:
9+
- rvm: jruby-19mode
710
script: bundle exec rake spec

Manifest.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ lib/net/ldap/dataset.rb
2525
lib/net/ldap/dn.rb
2626
lib/net/ldap/entry.rb
2727
lib/net/ldap/filter.rb
28+
lib/net/ldap/instrumentation.rb
2829
lib/net/ldap/password.rb
2930
lib/net/ldap/pdu.rb
3031
lib/net/ldap/version.rb

README.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= Net::LDAP for Ruby {<img src="https://travis-ci.org/ruby-ldap/ruby-net-ldap.png" />}[https://travis-ci.org/ruby-ldap/ruby-net-ldap]
1+
= Net::LDAP for Ruby {<img src="https://travis-ci.org/github/ruby-net-ldap.png" />}[https://travis-ci.org/github/ruby-net-ldap]
22

33
== Description
44

lib/net/ber/ber_parser.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ def read_ber_length
148148
# implemented on the including object and that it returns a Fixnum value.
149149
# Also requires #read(bytes) to work.
150150
#
151+
# Yields the object type `id` and the data `content_length` if a block is
152+
# given. This is namely to support instrumentation.
153+
#
151154
# This does not work with non-blocking I/O.
152155
def read_ber(syntax = nil)
153156
# TODO: clean this up so it works properly with partial packets coming
@@ -157,6 +160,8 @@ def read_ber(syntax = nil)
157160
id = getbyte or return nil # don't trash this value, we'll use it later
158161
content_length = read_ber_length
159162

163+
yield id, content_length if block_given?
164+
160165
if -1 == content_length
161166
raise Net::BER::BerError, "Indeterminite BER content length not implemented."
162167
else

0 commit comments

Comments
 (0)