Skip to content

Commit c704548

Browse files
committed
refactor At_KEY method
1 parent 71a82ba commit c704548

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
brew install fribidi
3232
brew install freetype
3333
brew reinstall freetype
34+
brew reinstall fontconfig
3435
- name: Install Raku Dependencies
3536
run: |
3637
zef install --/test App::Prove6

lib/HTML/Canvas.rakumod

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,9 @@ multi method AT-KEY(LValue:D $_) is rw { self.can($_)[0](self) }
420420
multi method AT-KEY(Str:D $_) is rw {
421421
with self.can($_) {
422422
my &meth := .[0];
423-
my &curried;
424-
Proxy.new:
425-
FETCH => -> $ { &curried //= -> |c { &meth(self, |c); } },
426-
STORE => -> $, $val { &meth(self) = $val; }
423+
sub FETCH($) { -> |c { &meth(self, |c) } }
424+
sub STORE($, &val) { &meth(self) = &val }
425+
Proxy.new: :&FETCH, :&STORE;
427426
}
428427
else {
429428
die X::Method::NotFound.new( :method($_), :typename(self.^name) )

0 commit comments

Comments
 (0)