Exemplo n.º 1
0
        public static object GetElement(RubyContext /*!*/ context, Hash /*!*/ self, object key)
        {
            object result;

            if (!self.TryGetValue(BaseSymbolDictionary.NullToObj(key), out result))
            {
                return(_DefaultSite.Target(_DefaultSite, context, self, key));
            }
            return(result);
        }
Exemplo n.º 2
0
        public static object GetElement(CallSiteStorage <Func <CallSite, Hash, object, object> > /*!*/ storage, Hash /*!*/ self, object key)
        {
            object result;

            if (!self.TryGetValue(BaseSymbolDictionary.NullToObj(key), out result))
            {
                var site = storage.GetCallSite("default", 1);
                return(site.Target(site, self, key));
            }
            return(result);
        }