Skip to content

Instantly share code, notes, and snippets.

Created June 22, 2010 19:35
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 anonymous/448948 to your computer and use it in GitHub Desktop.
Save anonymous/448948 to your computer and use it in GitHub Desktop.
index 21ab9e6..3f89ccb 100644
--- a/src/lib/Plumage/NQPUtil.nqp
+++ b/src/lib/Plumage/NQPUtil.nqp
@@ -409,7 +409,7 @@ sub subst($original, $regex, $replacement) {
$I1 = $P2
$P3 = find_lex '$replace_string'
$S1 = $P3
- substr $S0, $I0, $I1, $S1
+ replace $S0, $S0, $I0, $I1, $S1
$P0 = $S0
};
@@ -878,6 +878,8 @@ INIT {
my $interp := pir::getinterp__P();
my @argv := $interp[2]; # IGLOBALS_ARGV_LIST
my $config := $interp[6]; # IGLOBALS_CONFIG_HASH
+ my $os := pir::loadlib__PS('os');
+ my $bitwise := pir::loadlib__PS('bit_ops');
# Only fill the config portion of %*VM for now
my %vm;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment