public static MutableString Gets(RubyScope /*!*/ scope, RubyIO /*!*/ self, [DefaultProtocol] MutableString separator) { MutableString result = self.ReadLineOrParagraph(separator); KernelOps.Taint(scope.RubyContext, result); scope.GetInnerMostClosureScope().LastInputLine = result; scope.RubyContext.InputProvider.IncrementLastInputLineNumber(); return(result); }
public static MutableString Gets(RubyScope /*!*/ scope, StringIO /*!*/ self, [DefaultProtocol] MutableString separator) { var content = self.GetReadableContent(); int position = self._position; MutableString result = ReadLine(content, separator, ref position); self._position = position; scope.GetInnerMostClosureScope().LastInputLine = result; self._lineNumber++; return(result); }
public static MutableString Gets(RubyScope /*!*/ scope, RubyIO /*!*/ self, [DefaultProtocol] MutableString separator) { MutableString result = self.ReadLineOrParagraph(separator); if (result != null) { result.IsTainted = true; } scope.GetInnerMostClosureScope().LastInputLine = result; scope.RubyContext.InputProvider.LastInputLineNumber = ++self.LineNumber; return(result); }
public static MatchData SetCurrentMatchData(RubyScope /*!*/ scope, RubyRegex /*!*/ regex, MutableString /*!*/ str) { var targetScope = scope.GetInnerMostClosureScope(); if (str == null) { return(targetScope.CurrentMatch = null); } Match match = regex.Match(str, 0); if (match.Success) { return(targetScope.CurrentMatch = scope.RubyContext.TaintObjectBy(new MatchData(match, str), str)); } else { return(targetScope.CurrentMatch = null); } }
public static MatchData SetCurrentMatchData(RubyScope /*!*/ scope, RubyRegex /*!*/ regex, MutableString str) { return(scope.GetInnerMostClosureScope().CurrentMatch = (str != null) ? regex.Match(scope.RubyContext.KCode, str) : null); }
public static void Print(BinaryOpStorage /*!*/ writeStorage, RubyScope /*!*/ scope, object self) { Print(writeStorage, self, scope.GetInnerMostClosureScope().LastInputLine); }
public static MutableString /*!*/ LastMatch(RubyScope /*!*/ scope, RubyClass /*!*/ self, [DefaultProtocol] int groupIndex) { return(scope.GetInnerMostClosureScope().CurrentMatch.GetGroupValue(groupIndex)); }
public static MatchData LastMatch(RubyScope /*!*/ scope, RubyClass /*!*/ self) { return(scope.GetInnerMostClosureScope().CurrentMatch); }
public static object ImplicitMatch(ConversionStorage <MutableString> /*!*/ stringCast, RubyScope /*!*/ scope, RubyRegex /*!*/ self) { return(MatchIndex(scope, self, Protocols.CastToString(stringCast, scope.GetInnerMostClosureScope().LastInputLine))); }
public static void Print(RubyScope /*!*/ scope, object self) { Print(scope.RubyContext, self, scope.GetInnerMostClosureScope().LastInputLine); }
public static object ImplicitMatch(RubyScope /*!*/ scope, RubyRegex /*!*/ self) { return(MatchIndex(scope, self, Protocols.CastToString(scope.RubyContext, scope.GetInnerMostClosureScope().LastInputLine))); }