From 9240f01b1fbe5ea4f6a2017d35f8f605f84f0039 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 13 Feb 2025 17:54:21 -0800 Subject: merge revision(s) 63723c8d5908569918fb27e070ae5bc9de33c8bd: [Backport #21014] Correctly set node_id on iseq location The iseq location object has a slot for node ids. parse.y was correctly populating that field but Prism was not. This commit populates the field with the ast node id for that iseq [Bug #21014] --- test/ruby/test_compile_prism.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 33a8b17b99..a2e8b7bd97 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -3,6 +3,12 @@ # This file is organized to match itemization in https://github.com/ruby/prism/issues/1335 module Prism class TestCompilePrism < Test::Unit::TestCase + def test_iseq_has_node_id + code = "proc { <, -1 + end + # Subclass is used for tests which need it class Subclass; end ############################################################################ -- cgit v1.2.3