railsbp/rails_best_practices — Issue #96: undefined method `line' for nil:NilClass -- sexp.rb:26
Author: grosser
Created: 2012-01-14 16:31:59+00:00
State: open

this happens when parsing slim templates (see https://github.com/grosser/gettext_i18n_rails/pull/32#issuecomment-3492984)

```Ruby
undefined method `line' for nil:NilClass
~/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/whiny_nil.rb:48:in `method_missing'
~/.rvm/gems/ruby-1.9.2-p290/gems/rails_best_practices-1.7.2/lib/rails_best_practices/core_ext/sexp.rb:29:in `line'
~/.rvm/gems/ruby-1.9.2-p290/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:788:in `s'
```

self[1].line --> self[1] && self[1].line