Commit e686b785 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Fix reading Lua authoritative match states that contain functions.

parent 9fabd62a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4,7 +4,9 @@ All notable changes to this project are documented below.
The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org).

## [Unreleased]

### Fixed
- Fix reading Lua authoritative match states that contain functions.
- Correct path representation for embedded migrations and console files on Windows systems.

## [3.2.1] - 2021-04-19
### Changed
+4 −1
Original line number Diff line number Diff line
@@ -36,7 +36,10 @@ Expected return these values (all required) in order:
--]]
local function match_init(context, params)
  local state = {
    debug = (params and params.debug) or false
    debug = (params and params.debug) or false,
    foo = function()
        return "bar"
      end
  }
  if state.debug then
    print("match init context:\n" .. du.print_r(context) .. "match init params:\n" .. du.print_r(params))
+2 −0
Original line number Diff line number Diff line
@@ -224,6 +224,8 @@ func RuntimeLuaConvertLuaValue(lv lua.LValue) interface{} {
			ret = append(ret, RuntimeLuaConvertLuaValue(v.RawGetInt(i)))
		}
		return ret
	case *lua.LFunction:
		return v.String()
	default:
		return v
	}