We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4abe573 + 04125c7 commit 625674eCopy full SHA for 625674e
1 file changed
lib/net/ber.rb
@@ -296,9 +296,11 @@ def to_arr
296
class Net::BER::BerIdentifiedString < String
297
attr_accessor :ber_identifier
298
def initialize args
299
- super args
300
- # LDAP uses UTF-8 encoded strings
301
- self.encode('UTF-8') if self.respond_to?(:encoding) rescue self
+ super begin
+ args.respond_to?(:encode) ? args.encode('UTF-8') : args
+ rescue
302
+ args
303
+ end
304
end
305
306
0 commit comments