lib/rubocop/cop/rails/redundant_allow_nil.rb in rubocop-rails-2.18.0 vs lib/rubocop/cop/rails/redundant_allow_nil.rb in rubocop-rails-2.19.0

- old
+ new

@@ -60,11 +60,11 @@ if nxt_sib corrector.remove(range_between(node_beg(allow_nil), node_beg(nxt_sib))) elsif prv_sib corrector.remove(range_between(node_end(prv_sib), node_end(allow_nil))) else - corrector.remove(allow_nil.loc.expression) + corrector.remove(allow_nil) end end end def find_allow_nil_and_allow_blank(node) @@ -85,14 +85,14 @@ nil end def node_beg(node) - node.loc.expression.begin_pos + node.source_range.begin_pos end def node_end(node) - node.loc.expression.end_pos + node.source_range.end_pos end end end end end