From 6000244c4bb5ae207a689ac4f59f582754353669 Mon Sep 17 00:00:00 2001 From: Oskar Eichler Date: Mon, 31 Aug 2026 00:51:18 +0200 Subject: [PATCH] Recognize incomplete Prism hash literals --- lib/method_source/code_helpers.rb | 1 + spec/method_source/code_helpers_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/method_source/code_helpers.rb b/lib/method_source/code_helpers.rb index 4185c18..daa2164 100644 --- a/lib/method_source/code_helpers.rb +++ b/lib/method_source/code_helpers.rb @@ -127,6 +127,7 @@ module IncompleteExpression /embedded document meets end of file/, # =begin /unterminated (quoted string|string|regexp|list) meets end of file/, # "quoted string" is ironruby /can't find string ".*" anywhere before EOF/, # rbx and jruby + /expected a `}` to close the hash literal/, # prism /missing 'end' for/, /expecting kWHEN/ # rbx ] diff --git a/spec/method_source/code_helpers_spec.rb b/spec/method_source/code_helpers_spec.rb index 287ff89..c31661e 100644 --- a/spec/method_source/code_helpers_spec.rb +++ b/spec/method_source/code_helpers_spec.rb @@ -10,6 +10,7 @@ ["def", "a", "(); end"], ["p = <