Skip to content

Commit 5d349b4

Browse files
author
blackhedd
committed
Fixed a small edge condition relating to adding values to Net::LDAP::Entry.
1 parent 4d4423e commit 5d349b4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/net/ldap/entry.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ def []= name, value
4646
@myhash[sym] = value
4747
end
4848

49+
50+
#--
51+
# We have to deal with this one as we do []=
52+
# because this one and not the other one gets called
53+
# in formulations like entry["CN"] << cn.
54+
#
4955
def [] name
50-
#unless name.is_a?(Symbol)
51-
# name = name.to_s.downcase.intern
52-
#end
56+
name = name.to_s.downcase.intern unless name.is_a?(Symbol)
5357
@myhash[name]
5458
end
5559

0 commit comments

Comments
 (0)