From 0bb34781b9eebd1455a167dbbd4f9d0fe7b758a0 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 11 Nov 2023 16:52:08 +0100 Subject: small fixes --- alv-lib/_midi.moon | 8 ++++---- alv/copilot/base.moon | 2 +- alv/dummy.moon | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/alv-lib/_midi.moon b/alv-lib/_midi.moon index 8e8b507..82b1b4f 100644 --- a/alv-lib/_midi.moon +++ b/alv-lib/_midi.moon @@ -3,10 +3,10 @@ import RtMidiIn, RtMidiOut, RtMidi from require 'luartmidi' bit = if _VERSION == 'Lua 5.4' { - band: loadstring 'function (a, b) return a & b end' - bor: loadstring 'function (a, b) return a | b end' - lshift: loadstring 'function (a, b) return a << b end' - rshift: loadstring 'function (a, b) return a >> b end' + band: (load 'return function (a, b) return a & b end')! + bor: (load 'return function (a, b) return a | b end')! + lshift: (load 'return function (a, b) return a << b end')! + rshift: (load 'return function (a, b) return a >> b end')! } else ok, bit = pcall require, 'bit32' diff --git a/alv/copilot/base.moon b/alv/copilot/base.moon index 96aea3b..b7823e6 100644 --- a/alv/copilot/base.moon +++ b/alv/copilot/base.moon @@ -76,7 +76,7 @@ class Copilot if ok result = RTNode :result unless result.__class == RTNode result - elseif not result\match "not found" + elseif not result\match "'alv%-lib%.[^']+' not found" error result else assert @modules, "no current eval cycle?" diff --git a/alv/dummy.moon b/alv/dummy.moon index ec16aa5..cc69f10 100644 --- a/alv/dummy.moon +++ b/alv/dummy.moon @@ -38,7 +38,7 @@ class Dummy --- stringify this Dummy. -- -- throws an error, `Dummy` nodes cannot be stringified. - stringify: => error Error, 'implementation', "cannot stringify Dummy" + stringify: => error Error 'implementation', "cannot stringify Dummy" --- static functions -- @section static -- cgit v1.2.3