Skip to content

Commit 7836183

Browse files
committed
Disable core_bool_support if builtin is_bool is not defineed
1 parent 4d7048b commit 7836183

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

t/e02_bool.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ my $not_not_a_number_is_a_number = (
2020

2121
my $core_bool_support = JSON->backend->can("CORE_BOOL") && JSON->backend->CORE_BOOL ? 1 : 0;
2222
$core_bool_support = 1 if $json->backend->isa('Cpanel::JSON::XS') && $json->backend->VERSION >= version->parse(4.38);
23+
$core_bool_support = 0 unless defined &builtin::is_bool;
2324

2425
is($json->encode([!1]), $core_bool_support ? '[false]' : '[""]');
2526
if ($not_not_a_number_is_a_number) {

0 commit comments

Comments
 (0)