示例#1
0
        public object ruby_array(RBasic r, params object[] o)
        {
            RBasic x = ruby.InstanceOf(o[0]);
            object val;
            uint   to_ary = ruby.intern("to_ary");

            if (x.RespondTo(to_ary, false))
            {
                val = ruby.Funcall(x, to_ary, null);
            }
            else
            {
                val = ruby.Funcall(x, ruby.intern("to_a"), null);
            }
            if (val is RArray == false)
            {
                throw new eTypeError("`to_a' did not return Array");
            }
            return((RArray)val);
        }
示例#2
0
 protected object ruby_respond_to(RBasic r, params object[] args)
 {
     return(r.RespondTo(args));
 }
示例#3
0
文件: Object.cs 项目: emtees/old-code
 protected object ruby_respond_to(RBasic r, params object[] args)
 {
     return r.RespondTo(args);
 }