Sha256: 7c49398c0c66af23085c8ff8996b5cf7af26c1adf51d5d7858904c95862add8d
Contents?: true
Size: 678 Bytes
Versions: 30
Compression:
Stored size: 678 Bytes
Contents
require "strscan" class RPStringScanner < StringScanner if ENV["DEBUG"] || ENV["TALLY"] then def getch c = super where = caller.drop_while { |s| s =~ /(getch|nextc).$/ }.first where = where.split(/:/).first(2).join(":") if ENV["TALLY"] then d getch:where else d getch:[c, where] end c end def scan re s = super where = caller.drop_while { |x| x =~ /scan.$/ }.first where = where.split(/:/).first(2).join(":") if ENV["TALLY"] then d scan:[where] else d scan:[s, where] if s end s end def d o STDERR.puts o.inspect end end end
Version data entries
30 entries across 30 versions & 2 rubygems