lib/lrama/states_reporter.rb in lrama-0.6.2 vs lib/lrama/states_reporter.rb in lrama-0.6.3
- old
+ new
@@ -107,11 +107,11 @@
io << sprintf("%5i %s %s%s\n", item.rule_id, l, r, la)
end
io << "\n"
# Report shifts
- tmp = state.term_transitions.select do |shift, _|
- !shift.not_selected
+ tmp = state.term_transitions.reject do |shift, _|
+ shift.not_selected
end.map do |shift, next_state|
[shift.next_sym, next_state.id]
end
max_len = tmp.map(&:first).map(&:display_name).map(&:length).max
tmp.each do |term, state_id|