Hi all,

Can someone explain why the following code generates a rubocopy warning?

Unless I'm missing something, it makes rubocop really touchy when 
re-ordering code.

# make rubocop happy
class Passes
  # rubocop:disable Style/ClassVars
  @@class_var = 'no problems here'
end

# make rubocopy sad
class Offensive
  # Removing the next comment line makes for a happy rubocop - why?
  # rubocop:disable Style/ClassVars
  @@class_var = 'broken?'
end
                                                                  
Cheers,
Tom

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/rails-oceania.
For more options, visit https://groups.google.com/d/optout.

Reply via email to