class Prism::Source

def compute_offsets(code)

from the start of the string an array.
Find all of the newlines in the source code and return their byte offsets
def compute_offsets(code)
  offsets = [0]
  code.b.scan("\n") { offsets << $~.end(0) }
  offsets
end