class Rouge::Lexer
def assert_utf8!(str)
- Private: -
def assert_utf8!(str) encoding = str.encoding.name return if encoding == 'US-ASCII' || encoding == 'UTF-8' || encoding == 'ASCII-8BIT' raise EncodingError.new( "Bad encoding: #{str.encoding.names.join(',')}. " + "Please convert your string to UTF-8." ) end