Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created December 4, 2016 03:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/bb664e9cb7f802c6252e58083cc4abe0 to your computer and use it in GitHub Desktop.
Save zoffixznet/bb664e9cb7f802c6252e58083cc4abe0 to your computer and use it in GitHub Desktop.
diff --git a/src/Perl6/Actions.nqp b/src/Perl6/Actions.nqp
index f241a25..5bcd8f9 100644
--- a/src/Perl6/Actions.nqp
+++ b/src/Perl6/Actions.nqp
@@ -7276,7 +7276,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
$*W.throw($/, 'X::Syntax::Number::InvalidCharacter',
:$radix,
:at($ipart[2]),
- :str($<intpart> ~ ($<fracpart> ?? $<fracpart> !! '')),
+ :str($<intpart> ~ ($<fracpart> || '')),
);
}
if $fpart[2] < nqp::chars($<fracpart>.Str) {
@@ -7287,7 +7287,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
# we return `1` to cover the decimal dot in that case
$ipart[2] + ($fpart[2] == -1 ?? 1 !! $fpart[2])
),
- :str($<intpart> ~ ($<fracpart> ?? $<fracpart> !! '')),
+ :str($<intpart> ~ ($<fracpart> || '')),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment