Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
harrysolovay committed Jun 15, 2023
1 parent 678e690 commit fa0a1d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions rune/Rune.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Deno.test("match abc", async () => {
.when(is("a"), (x) => x.access("a"))
.when(is("b"), (x) => x.access("b"))
.else((x) => x.access("c"))
).run()
).run(new Scope())
assertEquals(+result, 0)
}
})
Expand All @@ -285,7 +285,7 @@ Deno.test("match u", async () => {
)
)
.rehandle(is(String))
.run(),
.run(new Scope()),
"hello",
)
})
8 changes: 4 additions & 4 deletions rune/ValueRune.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ class RunMatch<M, T, U> extends Run<T, U> {
value
conditions
constructor(
batch: Batch,
scope: Scope,
child: Rune<M, never>,
conditions: [(x: M) => boolean, ValueRune<T, U>][],
) {
super(batch)
this.value = batch.prime(child, this.signal)
super(scope)
this.value = scope.prime(child, this.signal)
this.conditions = conditions.map(([cond, val]) =>
[cond, batch.prime(val, this.signal)] as const
[cond, scope.prime(val, this.signal)] as const
)
}

Expand Down

0 comments on commit fa0a1d9

Please sign in to comment.