Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions opal/corelib/number.rb
Original file line number Diff line number Diff line change
@@ -309,9 +309,9 @@ def bit_length
var result = 0,
value = self < 0 ? ~self : self;
while (value > 0) {
result += 1;
value >>= 1;
while (value != 0) {
result += 1;
value >>>= 1;
}
return result;

0 comments on commit 19d4325

Please sign in to comment.