From 20887b1ccb66621053fa9af600434eeab2beaa0d Mon Sep 17 00:00:00 2001 From: PRESFIL Date: Wed, 11 Jun 2025 18:34:26 +0000 Subject: [PATCH] fix(lua): print= shadowed by native Lua print() Trying `rc.print()` causes redirection to native global Lua `print()`, which prints to stdout. I don't see any proc of shor-circuiting `autocall_config` with global environment `_G`. --- lua/rtorrent.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lua/rtorrent.lua b/lua/rtorrent.lua index 94714bfb..12d4ee50 100644 --- a/lua/rtorrent.lua +++ b/lua/rtorrent.lua @@ -31,11 +31,7 @@ function mt.__call (t, ...) return ret end function mt.__index (t, key) - ns = rawget(t, "__namestack") - if ns == nil then - if _G[key] ~= nil then return _G[key] end - ns = {} - end + ns = rawget(t, "__namestack") or {} table.insert(ns, key) return setmetatable({__namestack=ns}, mt) end