예제 #1
0
        public static object MethodMissing(RubyScope /*!*/ scope, BlockParam block, string /*!*/ self, [NotNull] RubySymbol /*!*/ name, params object[] /*!*/ args)
        {
            if (name.EndsWith('=') || name.EndsWith('!'))
            {
                throw RubyExceptions.CreateTypeError("Mutating method `{0}' called for an immutable string (System::String)", name);
            }

            // TODO: forward to MutableString until we implement the methods here:
            return(KernelOps.SendMessageOpt(scope, block, ToStr(self), name.ToString(), args));
        }
예제 #2
0
 public static object Each(RubyScope /*!*/ scope, BlockParam /*!*/ block, Enumerator /*!*/ self)
 {
     // MRI doesn't send "send" message:
     return(KernelOps.SendMessageOpt(scope, block, self._targetObject, self._targetName, self._targetArguments));
 }
예제 #3
0
 public object Each(RubyScope /*!*/ scope, BlockParam /*!*/ block)
 {
     return(KernelOps.SendMessageOpt(scope, block, _targetObject, _targetName, _targetArguments));
 }