{"action":"closed","issue":{"url":"https://api.github.com/repos/jneen/rouge/issues/385","repository_url":"https://api.github.com/repos/jneen/rouge","labels_url":"https://api.github.com/repos/jneen/rouge/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/jneen/rouge/issues/385/comments","events_url":"https://api.github.com/repos/jneen/rouge/issues/385/events","html_url":"https://github.com/jneen/rouge/issues/385","id":131095337,"number":385,"title":"Apache Lexer raises NoMethodError error","user":{"login":"benbalter","id":282759,"avatar_url":"https://avatars.githubusercontent.com/u/282759?v=3","gravatar_id":"","url":"https://api.github.com/users/benbalter","html_url":"https://github.com/benbalter","followers_url":"https://api.github.com/users/benbalter/followers","following_url":"https://api.github.com/users/benbalter/following{/other_user}","gists_url":"https://api.github.com/users/benbalter/gists{/gist_id}","starred_url":"https://api.github.com/users/benbalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbalter/subscriptions","organizations_url":"https://api.github.com/users/benbalter/orgs","repos_url":"https://api.github.com/users/benbalter/repos","events_url":"https://api.github.com/users/benbalter/events{/privacy}","received_events_url":"https://api.github.com/users/benbalter/received_events","type":"User","site_admin":true},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-03T17:25:26Z","updated_at":"2016-02-04T20:20:11Z","closed_at":"2016-02-04T20:20:11Z","body":"### The error:\r\n\r\n```\r\nNoMethodError: undefined method `<<' for nil:NilClass\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/lexer.rb:392:in `block in lex'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/regex_lexer.rb:436:in `yield_token'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/regex_lexer.rb:333:in `token'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/lexers/apache.rb:43:in `block (2 levels) in <class:Apache>'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/regex_lexer.rb:305:in `instance_exec'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/regex_lexer.rb:305:in `block in step'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/regex_lexer.rb:287:in `each'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/regex_lexer.rb:287:in `step'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/regex_lexer.rb:268:in `stream_tokens'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/lexer.rb:388:in `lex'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/formatters/html.rb:50:in `each'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/formatters/html.rb:50:in `stream_untableized'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/formatters/html.rb:43:in `stream'\r\n\tfrom /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rouge-1.10.1/lib/rouge/formatter.rb:33:in `format'\r\n```\r\n\r\n### Steps to reproduce (per the readme)\r\n\r\n1. Create a file \"test.txt\" with contents \"test\"\r\n2. `require 'rouge'`\r\n3. `source = File.read(\"test.txt\")`\r\n4. `formatter = Rouge::Formatters::HTML.new(css_class: 'highlight')`\r\n5. `lexer = Rouge::Lexers::Apache.new`\r\n6. `formatter.format(lexer.lex(source))`"}}