lib/ragel/bitmap.rb in ragel-bitmap-0.2.0 vs lib/ragel/bitmap.rb in ragel-bitmap-0.2.1

- old
+ new

@@ -1,8 +1,17 @@ # frozen_string_literal: true require 'ragel/bitmap/version' +# Polyfilling `getbyte` in order to support ruby 1.8 +unless ''.respond_to?(:getbyte) + class String + def getbyte(index) + self[index].ord + end + end +end + module Ragel module Bitmap class Array8 def initialize(string) @string = string