From e7f8c3726ca328050c230ed3a92d2cbafe97528b Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 25 May 2021 16:14:19 -0400 Subject: [PATCH] Fix NFA#to_s --- lib/imbecile/regex/nfa.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/imbecile/regex/nfa.rb b/lib/imbecile/regex/nfa.rb index cc2dca5..f5d97ae 100644 --- a/lib/imbecile/regex/nfa.rb +++ b/lib/imbecile/regex/nfa.rb @@ -104,8 +104,8 @@ module Imbecile range_s += "-" + chr[transition.code_point_range.last] end end - accepts_s = dest_state.accepts ? " *" : "" - rv += " #{range_s} => #{state_id[dest_state]}#{accepts_s}\n" + accepts_s = transition.destination.accepts ? " *" : "" + rv += " #{range_s} => #{state_id[transition.destination]}#{accepts_s}\n" end end while to_visit.size > 0