{"action":"created","issue":{"url":"https://api.github.com/repos/rspec/rspec-core/issues/2163","repository_url":"https://api.github.com/repos/rspec/rspec-core","labels_url":"https://api.github.com/repos/rspec/rspec-core/issues/2163/labels{/name}","comments_url":"https://api.github.com/repos/rspec/rspec-core/issues/2163/comments","events_url":"https://api.github.com/repos/rspec/rspec-core/issues/2163/events","html_url":"https://github.com/rspec/rspec-core/issues/2163","id":130781081,"number":2163,"title":"SnippetExtractor with Ruby 2.3 squiggly heredoc cause error, exit without message","user":{"login":"hanachin","id":167012,"avatar_url":"https://avatars.githubusercontent.com/u/167012?v=3","gravatar_id":"","url":"https://api.github.com/users/hanachin","html_url":"https://github.com/hanachin","followers_url":"https://api.github.com/users/hanachin/followers","following_url":"https://api.github.com/users/hanachin/following{/other_user}","gists_url":"https://api.github.com/users/hanachin/gists{/gist_id}","starred_url":"https://api.github.com/users/hanachin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanachin/subscriptions","organizations_url":"https://api.github.com/users/hanachin/orgs","repos_url":"https://api.github.com/users/hanachin/repos","events_url":"https://api.github.com/users/hanachin/events{/privacy}","received_events_url":"https://api.github.com/users/hanachin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-02T18:58:13Z","updated_at":"2016-02-23T12:01:53Z","closed_at":"2016-02-02T23:43:30Z","body":"It caused by Ruby's Ripper.lex bug.\r\nI send a pull request to https://github.com/ruby/ruby/pull/1234\r\n\r\nreproduce code:\r\n```rb\r\ndescribe 'squiggly heredoc in spec' do\r\n  specify do\r\n    foo.\r\n    bar\r\n  end\r\n\r\n  BAR = <<~EOS\r\n    test\r\n  EOS\r\nend\r\n```\r\n\r\n```console\r\n% be rspec foo_spec.rb\r\nF\r\n\r\n/usr/local/var/rbenv/versions/2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:70:in `block in on_heredoc_dedent': undefined method `event' for #<Array:0x007f844b935b08> (NoMethodError)\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:69:in `each'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:69:in `on_heredoc_dedent'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:61:in `parse'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:61:in `parse'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:55:in `lex'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:44:in `lex'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/source.rb:38:in `tokens'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/source.rb:52:in `tokens_by_line_number'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/snippet_extractor.rb:81:in `block in unclosed_paren_tokens_in_line_range'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/flat_map.rb:7:in `each'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/flat_map.rb:7:in `flat_map'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/flat_map.rb:7:in `flat_map'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/snippet_extractor.rb:80:in `unclosed_paren_tokens_in_line_range'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/snippet_extractor.rb:67:in `line_range_of_expression'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/snippet_extractor.rb:51:in `expression_lines'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/snippet_extractor.rb:40:in `extract_expression_lines_at'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/exception_presenter.rb:207:in `read_failed_lines'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/exception_presenter.rb:158:in `failure_slash_error_lines'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/exception_presenter.rb:145:in `block in failure_lines'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/exception_presenter.rb:144:in `tap'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/exception_presenter.rb:144:in `failure_lines'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/exception_presenter.rb:32:in `colorized_message_lines'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/exception_presenter.rb:229:in `formatted_message_and_backtrace'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/exception_presenter.rb:84:in `fully_formatted_lines'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/exception_presenter.rb:76:in `fully_formatted'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/notifications.rb:200:in `fully_formatted'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/notifications.rb:114:in `block in fully_formatted_failed_examples'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/notifications.rb:113:in `each'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/notifications.rb:113:in `each_with_index'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/notifications.rb:113:in `fully_formatted_failed_examples'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/formatters/base_text_formatter.rb:33:in `dump_failures'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/reporter.rb:189:in `block in notify'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/reporter.rb:188:in `each'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/reporter.rb:188:in `notify'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/reporter.rb:160:in `block in finish'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/reporter.rb:175:in `close_after'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/reporter.rb:156:in `finish'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/reporter.rb:79:in `report'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/runner.rb:117:in `run_specs'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/runner.rb:93:in `run'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/runner.rb:78:in `run'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib/rspec/core/runner.rb:45:in `invoke'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/exe/rspec:4:in `<top (required)>'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/bin/rspec:23:in `load'\r\n\tfrom /usr/local/var/rbenv/versions/2.3.0/bin/rspec:23:in `<main>'\r\n```"},"comment":{"url":"https://api.github.com/repos/rspec/rspec-core/issues/comments/187672399","html_url":"https://github.com/rspec/rspec-core/issues/2163#issuecomment-187672399","issue_url":"https://api.github.com/repos/rspec/rspec-core/issues/2163","id":187672399,"user":{"login":"halilim","id":226712,"avatar_url":"https://avatars.githubusercontent.com/u/226712?v=3","gravatar_id":"","url":"https://api.github.com/users/halilim","html_url":"https://github.com/halilim","followers_url":"https://api.github.com/users/halilim/followers","following_url":"https://api.github.com/users/halilim/following{/other_user}","gists_url":"https://api.github.com/users/halilim/gists{/gist_id}","starred_url":"https://api.github.com/users/halilim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halilim/subscriptions","organizations_url":"https://api.github.com/users/halilim/orgs","repos_url":"https://api.github.com/users/halilim/repos","events_url":"https://api.github.com/users/halilim/events{/privacy}","received_events_url":"https://api.github.com/users/halilim/received_events","type":"User","site_admin":false},"created_at":"2016-02-23T12:01:53Z","updated_at":"2016-02-23T12:01:53Z","body":"Thanks. I've converted them to indented heredocs (`<<-`) for now."}}