aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-09-28 18:35:12 -0700
committerBruce Hill <bruce@bruce-hill.com>2018-09-28 18:35:17 -0700
commit258527750cea3372a932552e0f18cd48e132def5 (patch)
tree053d33a01574a0978d9f7499265837dae349bdc7
parent84931a6f0e0c8627a4835a9ce886aba28b0e76bc (diff)
Slightly more robust.
-rw-r--r--code_obj.lua2
-rw-r--r--code_obj.moon2
2 files changed, 2 insertions, 2 deletions
diff --git a/code_obj.lua b/code_obj.lua
index 5be92e6..577eaf3 100644
--- a/code_obj.lua
+++ b/code_obj.lua
@@ -355,7 +355,7 @@ do
local _list_1 = self.bits
for _index_0 = 1, #_list_1 do
local bit = _list_1[_index_0]
- if bit.__class == LuaCode then
+ if not (type(bit) == 'string') then
gather_from(bit)
end
end
diff --git a/code_obj.moon b/code_obj.moon
index 4e70784..07b7618 100644
--- a/code_obj.moon
+++ b/code_obj.moon
@@ -207,7 +207,7 @@ class LuaCode extends Code
seen[var] = true
to_declare[#to_declare+1] = var
for bit in *@bits
- if bit.__class == LuaCode
+ unless type(bit) == 'string'
gather_from bit
gather_from self
if #to_declare > 0