Skip to content

Commit

Permalink
these two checks belong together
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 6, 2015
1 parent 1fecf69 commit 5b97a12
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Mojo/JSON.pm
Expand Up @@ -251,8 +251,7 @@ sub _encode_value {
# Number (bitwise operators change behavior based on the internal value type)
my $check = (my $dummy = "0") & $value;
return $value
if !($check ^ $check)
&& length $check
if (!($check ^ $check) && length $check)
&& 0 + $value eq $value
&& $value * 0 == 0;

Expand Down

0 comments on commit 5b97a12

Please sign in to comment.