diff --git a/lib/irb/color.rb b/lib/irb/color.rb index 0198838c6d..7a1d0c30ce 100644 --- a/lib/irb/color.rb +++ b/lib/irb/color.rb @@ -141,7 +141,7 @@ module IRB # :nodoc: seen[obj] = true block.call ensure - seen.delete(obj.object_id) + seen.delete(obj) end # Ripper::Lexer::Elem#state is supported on Ruby 2.5+