We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a83fb32 commit 04125c7Copy full SHA for 04125c7
lib/net/ber.rb
@@ -296,8 +296,11 @@ def to_arr
296
class Net::BER::BerIdentifiedString < String
297
attr_accessor :ber_identifier
298
def initialize args
299
- args.force_encoding('UTF-8') if args.respond_to(:force_encoding)
300
- super args
+ super begin
+ args.respond_to?(:encode) ? args.encode('UTF-8') : args
301
+ rescue
302
+ args
303
+ end
304
end
305
306
0 commit comments