diff --git a/lich.rb b/lich.rb index 30519ee..f2a8f20 100755 --- a/lich.rb +++ b/lich.rb @@ -3564,11 +3564,7 @@ def inspect end def Map.get_free_id Map.load unless @@loaded - free_id = 0 - until @@list[free_id].nil? - free_id += 1 - end - free_id + @@list.compact.max_by{ |r| r.id}.id + 1 end def Map.list Map.load unless @@loaded