PythonVsRuby/2について、ここに記述してください。

class SjisChars

  $KCODE = "SJIS"
  KU13 = 0x8740..0x879c
  KU89 = 0xED40..0xEEFC
  KU115 = 0xFA40..0xFC4B
  GAIJI = 0xF040..0xF9FC

  def initialize(chars)
    @chars = chars
  end

  def scan2
    @chars.split(//).each do |c|
      yield c
    end
  end

  def chkRange(r)
    re = "[%s-%s]" % [[r.first].pack("n"), [r.last].pack("n")]
    @chars.scan(Regexp.compile(re))
  end

  def gaiji?
    chkRange(KU115)
  end

  def hexprint
    p @chars.unpack("n*").each {|i| printf("%x,", i)}
end