Skip to content

Commit 4837b6d

Browse files
committed
lpeg_patterns/: Add __name field to IP object metatables
1 parent 3093e30 commit 4837b6d

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

lpeg_patterns/IPv4.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ local dec_octet = (
1616

1717
local IPv4_methods = {}
1818
local IPv4_mt = {
19+
__name = "lpeg_patterns.IPv4";
1920
__index = IPv4_methods;
2021
}
2122

lpeg_patterns/IPv6.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ local IPv4address = require "lpeg_patterns.IPv4".IPv4address
1717

1818
local IPv6_methods = {}
1919
local IPv6_mt = {
20+
__name = "lpeg_patterns.IPv6";
2021
__index = IPv6_methods;
2122
}
2223

lpeg_patterns/uri.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ _M.userinfo = Cs((unreserved + _M.pct_encoded + _M.sub_delims + P":")^0) -- 3.2.
4141

4242
-- Host 3.2.2
4343

44-
local IPvFuture_mt = {}
44+
local IPvFuture_mt = {
45+
__name = "lpeg_patterns.IPvFuture";
46+
}
4547
function IPvFuture_mt:__tostring()
4648
return string.format("v%x.%s", self.version, self.string)
4749
end

0 commit comments

Comments
 (0)