Skip to content

Instantly share code, notes, and snippets.

@donaldh
Created March 31, 2016 16:09
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 donaldh/90687a8ecd757ecb68f9b46c0fbf357d to your computer and use it in GitHub Desktop.
Save donaldh/90687a8ecd757ecb68f9b46c0fbf357d to your computer and use it in GitHub Desktop.
diff --git a/src/core/REPL.pm b/src/core/REPL.pm
index eb10f0b..376be3a 100644
--- a/src/core/REPL.pm
+++ b/src/core/REPL.pm
@@ -174,7 +174,7 @@ do {
also does Completions;
has Mu $.compiler;
- has Bool $!multi-line-enabled;
+ has Bool $.multi-line-enabled;
has IO::Path $!history-file;
sub mixin-line-editor($self is copy) {
@@ -232,18 +232,12 @@ do {
method new(Mu \compiler, Mu \adverbs) {
my $multi-line-enabled = !%*ENV<RAKUDO_DISABLE_MULTILINE>;
- my $self = self.bless();
- $self.init(compiler, $multi-line-enabled);
+ my $self = self.bless(:compiler, :$multi-line-enabled);
$self = mixin-line-editor($self);
$self
}
- method init(Mu \compiler, $multi-line-enabled) {
- $!compiler = compiler;
- $!multi-line-enabled = $multi-line-enabled;
- }
-
method teardown {
self.?teardown-line-editor;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment