Skip to content

Commit

Permalink
[js] Enable use of nqp::encoderepconf op
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Mar 22, 2018
1 parent 4b6b68d commit 0d77f32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/core/Encoding/Encoder/Builtin.pm6
Expand Up @@ -12,22 +12,22 @@ my class Encoding::Encoder::Builtin does Encoding::Encoder {
$!type := nqp::can($type.HOW, 'pun') ?? $type.^pun !! $type.WHAT;
$!replacement = $replacement.defined ?? $replacement !! nqp::null_s();
$!config = $strict ?? 0 !! 1;
#?if !moar
#?if jvm
X::NYI.new(feature => 'encoding with replacement').throw if $replacement.defined;
X::NYI.new(feature => 'encoding with strict').throw if $strict;
#?endif
self
}

method encode-chars(str $str --> Blob:D) {
#?if moar
#?if !jvm
nqp::encoderepconf($str,
$!encoding,
$!replacement,
nqp::create($!type),
$!config)
#?endif
#?if !moar
#?if jvm
nqp::encode($str, $!encoding, nqp::create($!type));

#?endif
Expand Down
2 changes: 1 addition & 1 deletion tools/build/NQP_REVISION
@@ -1 +1 @@
2018.03-10-gb5f9716df
2018.03-14-g02a2378f3

0 comments on commit 0d77f32

Please sign in to comment.