提交 895134bc 编写于 作者: J Jean Boussier

Use indentity hashes in Journey::GTG::Builder

上级 77fc1c2b
# frozen_string_literal: true
require "action_dispatch/journey/gtg/transition_table"
module ActionDispatch
......@@ -18,8 +19,8 @@ def initialize(root)
def transition_table
dtrans = TransitionTable.new
marked = {}
state_id = Hash.new { |h, k| h[k] = h.length }
marked = {}.compare_by_identity
state_id = Hash.new { |h, k| h[k] = h.length }.compare_by_identity
dstates = [firstpos(root)]
until dstates.empty?
......@@ -124,7 +125,7 @@ def lastpos(node)
private
def build_followpos
table = Hash.new { |h, k| h[k] = [] }
table = Hash.new { |h, k| h[k] = [] }.compare_by_identity
@ast.each do |n|
case n
when Nodes::Cat
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册