Mercurial Hosting > luan
diff core/src/luan/modules/Which_mod.luan @ 629:35dde32c02ab 0.15
change String.matches()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 18 Jan 2016 23:07:52 -0700 |
parents | 6510de302f95 |
children | ca169567ce07 |
line wrap: on
line diff
--- a/core/src/luan/modules/Which_mod.luan Mon Jan 18 06:42:50 2016 -0700 +++ b/core/src/luan/modules/Which_mod.luan Mon Jan 18 23:07:52 2016 -0700 @@ -5,7 +5,7 @@ local type = Luan.type or error() local String = require "luan:String" local literal = String.literal or error() -local match = String.match or error() +local matches = String.matches or error() local Io = require "luan:Io" local print = Io.print or error() @@ -37,7 +37,7 @@ local ptn = "[:./]"..literal(name).."$" for _, uri in ipairs(M.uris) do local mod = require(uri) - if match(uri,ptn) ~= nil then + if matches(uri,ptn) then print(uri) end if type(mod) == "table" then