Skip to content

Commit 65b446c

Browse files
author
blackhedd
committed
fixed Fixnum#to_ber when the value is zero
1 parent 11d8152 commit 65b446c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/net/ber.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def to_ber
366366

367367
# PLEASE optimize this code path. It's awfully ugly and probably slow.
368368
# It also doesn't understand negative numbers yet.
369-
raise Net::BER::BerError.new( "range error in fixnum" ) unless self > 0
369+
raise Net::BER::BerError.new( "range error in fixnum" ) unless self >= 0
370370
z = [self].pack("N")
371371
zlen = if self < 0x80
372372
1

0 commit comments

Comments
 (0)