# HG changeset patch # User Matthew Wild # Date 1335186575 -3600 # Node ID 96b40b5e8ea8452454032ed650d994419571779c # Parent d53142e90cd054ffd83c2a3c8ff12ca2855d602c moduleapi: module:provides(): Fix usage of wrong table diff -r d53142e90cd0 -r 96b40b5e8ea8 core/moduleapi.lua --- a/core/moduleapi.lua Sun Apr 22 23:44:21 2012 +0500 +++ b/core/moduleapi.lua Mon Apr 23 14:09:35 2012 +0100 @@ -298,7 +298,7 @@ function api:provides(name, item) if not item then item = self.environment; end if not item.name then - local item_name = module.name; + local item_name = self.name; -- Strip a provider prefix to find the item name -- (e.g. "auth_foo" -> "foo" for an auth provider) if item_name:find(name.."_", 1, true) == 1 then