Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use the features of .clone
  • Loading branch information
lizmat committed Sep 28, 2015
1 parent 59b5a4b commit e503dfc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/core/Range.pm
Expand Up @@ -286,10 +286,7 @@ my class Range is Cool does Iterable does Positional {
}

method clone-with-op(&op, $value) {
my \SELF = self.clone;
nqp::bindattr(SELF, Range, '$!min', $!min [&op] $value);
nqp::bindattr(SELF, Range, '$!max', $!max [&op] $value);
SELF;
self.clone( :min($!min [&op] $value), :max($!max [&op] $value) );
}
}

Expand Down

0 comments on commit e503dfc

Please sign in to comment.