Sha256: d6f1f12e012d1471bb7078a36c39492aaa05d7499ef36e45ec9bf2c10ed94631

Contents?: true

Size: 601 Bytes

Versions: 1

Compression:

Stored size: 601 Bytes

Contents

def __script__(src)
  code = []
  src = src.unpack("C*").map {|c| c.ord.to_s(6).rjust(3, "0").chars.to_a }
  src.flatten.map {|n| n.to_i(6) + 1 }.each do |n|
    code.empty? || code.last.size + n + 1 >= 60 ? code << "" : code.last << " "
    code.last << "_" * n
  end
  ([%q(require "_")] + code).join("\n")
end

$code, $fragment = [], []
def method_missing(mhd, *x)
  if x.empty?
    $code.concat($fragment.reverse)
    $fragment.clear
  end
  $fragment << (mhd.to_s.size - 1).to_s
end

at_exit do
  $code.concat($fragment.reverse)
  eval($code.join.scan(/.../).map {|c| c.to_i(6) }.pack("C*"))
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
_-1.1 lib/_.rb