From b6f89db9208c4b11c60d4153fdac9513e119c5a1 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Tue, 26 Dec 2023 08:42:06 +0900 Subject: [PATCH] Freeze input grammar text --- lib/lrama/lexer/grammar_file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lrama/lexer/grammar_file.rb b/lib/lrama/lexer/grammar_file.rb index 2200bcbf..6be07670 100644 --- a/lib/lrama/lexer/grammar_file.rb +++ b/lib/lrama/lexer/grammar_file.rb @@ -5,7 +5,7 @@ class GrammarFile def initialize(path, text) @path = path - @text = text + @text = text.freeze end def ==(other)