mame/quine-relay · error · RuntimeError

Integer expected

Error message

Integer expected

What it means

Error "Integer expected" thrown in mame/quine-relay.

Source

Thrown at vendor/aheui.rb:20

code = $<.each_line.map do |s|
  s.chomp.unpack("U*").map do |c|
    if 0xac00 <= c && c <= 0xd7a3
      c -= 0xac00
      # Hangul initial consonant, vowel, final consonant
      [c / 21 / 28, c / 28 % 21, c % 28]
    end
  end
end

def read_int
  s = ""
  while true
    ch = $stdin.getc
    case ch
    when /\d+/ then s << ch
    when /\s+/ then break
    else raise "Integer expected"
    end
  end
  s.to_i
end

STROKE_TABLE = [0,2,4,4,2,5,5,3,5,7,9,9,7,9,9,8,4,4,6,2,4,nil,3,4,3,4,4,nil]

x, y, dx, dy, s = 0, 0, 0, 1, 0
ss = (0..27).map { [] }
def (ss[21]).pop; shift; end # queue
ss[27] = nil # extension protocol

check_size = -> n do
  if ss[s].size >= n
    true
  else
    dx, dy = -dx, -dy
    false

View on GitHub (pinned to c2aa5098d3)

When it happens

Trigger: Thrown at vendor/aheui.rb:20 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of mame/quine-relay@c2aa5098d3 (2026-08-21). Data as JSON: /api/errors/d1ee4145e3f37967. Report an issue: GitHub.