<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_ast.rb, branch v4.0.4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) 4644e4f2fafe45e2c49f18bc9712d0f5fff3d341: [Backport #21986]</title>
<updated>2026-05-11T20:40:35+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-05-11T20:40:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=926b0ec4ed0e181735f3778c3e6b79d891e70848'/>
<id>926b0ec4ed0e181735f3778c3e6b79d891e70848</id>
<content type='text'>
	[PATCH] [Bug #21986] Fix location of numeric literal

	When checking for suffixes, do not flush the numeric literal token
	even if no suffix is found.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[PATCH] [Bug #21986] Fix location of numeric literal

	When checking for suffixes, do not flush the numeric literal token
	even if no suffix is found.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 24a2ba09af13b7c969733ea9370ad59d2442f4c9: [Backport #21985]</title>
<updated>2026-05-11T20:40:06+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-05-11T20:40:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e4271b554c8b13270754a45ee631789237d5cced'/>
<id>e4271b554c8b13270754a45ee631789237d5cced</id>
<content type='text'>
	[PATCH] [Bug #21985] Include the `-` in the negative numbers location
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[PATCH] [Bug #21985] Include the `-` in the negative numbers location
</pre>
</div>
</content>
</entry>
<entry>
<title>Suppress warnings when testing RubyVM::AbstractSyntaxTree</title>
<updated>2025-09-12T11:44:39+00:00</updated>
<author>
<name>Étienne Barrié</name>
<email>etienne.barrie@gmail.com</email>
</author>
<published>2025-08-22T08:38:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=af210467b5d513fa7444cd64023f207aa2aaea14'/>
<id>af210467b5d513fa7444cd64023f207aa2aaea14</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add NODE SCLASS locations</title>
<updated>2025-08-30T13:41:23+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2025-08-30T12:26:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=dd4e7801f3f2b7e258016b8e22c6d8870516166b'/>
<id>dd4e7801f3f2b7e258016b8e22c6d8870516166b</id>
<content type='text'>
Add locations to struct `RNode_SCLASS`.

memo:

```
@ ProgramNode (location: (1,0)-(1,18))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,18))
    +-- body: (length: 1)
        +-- @ SingletonClassNode (location: (1,0)-(1,18))
            +-- locals: []
            +-- class_keyword_loc: (1,0)-(1,5) = "class"
            +-- operator_loc: (1,6)-(1,8) = "&lt;&lt;"
            +-- expression:
            |   @ SelfNode (location: (1,9)-(1,13))
            +-- body: nil
            +-- end_keyword_loc: (1,15)-(1,18) = "end"
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add locations to struct `RNode_SCLASS`.

memo:

```
@ ProgramNode (location: (1,0)-(1,18))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,18))
    +-- body: (length: 1)
        +-- @ SingletonClassNode (location: (1,0)-(1,18))
            +-- locals: []
            +-- class_keyword_loc: (1,0)-(1,5) = "class"
            +-- operator_loc: (1,6)-(1,8) = "&lt;&lt;"
            +-- expression:
            |   @ SelfNode (location: (1,9)-(1,13))
            +-- body: nil
            +-- end_keyword_loc: (1,15)-(1,18) = "end"
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow to get a NODE_SCOPE node of dummy stack frame of ArgumentError</title>
<updated>2025-08-28T03:44:29+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2025-08-26T10:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ed8fe53e80e16f9bff592333a3082981f39216e1'/>
<id>ed8fe53e80e16f9bff592333a3082981f39216e1</id>
<content type='text'>
Previously, it was not possible to obtain a node of the callee's
`Thread::Backtrace::Location` for cases like "wrong number of
arguments" by using `RubyVM::AST.of`. This change allows that retrieval.

This is preparation for [Feature #21543].
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, it was not possible to obtain a node of the callee's
`Thread::Backtrace::Location` for cases like "wrong number of
arguments" by using `RubyVM::AST.of`. This change allows that retrieval.

This is preparation for [Feature #21543].
</pre>
</div>
</content>
</entry>
<entry>
<title>Make `RubyVM::AST.of` return a parent node of NODE_SCOPE</title>
<updated>2025-08-28T03:44:04+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2025-08-26T09:58:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2ccb2de677849732181224cb9fd1a831dbaac4c0'/>
<id>2ccb2de677849732181224cb9fd1a831dbaac4c0</id>
<content type='text'>
This change makes `RubyVM::AST.of` and `.node_id_for_backtrace_location`
return a parent node of NODE_SCOPE (such as NODE_DEFN) instead of the
NODE_SCOPE node itself.
(In future, we may remove NODE_SCOPE, which is a bit hacky AST node.)

This is preparation for [Feature #21543].
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change makes `RubyVM::AST.of` and `.node_id_for_backtrace_location`
return a parent node of NODE_SCOPE (such as NODE_DEFN) instead of the
NODE_SCOPE node itself.
(In future, we may remove NODE_SCOPE, which is a bit hacky AST node.)

This is preparation for [Feature #21543].
</pre>
</div>
</content>
</entry>
<entry>
<title>Add NODE IN locations</title>
<updated>2025-08-11T13:25:47+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2025-08-10T12:30:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4775d1ffa8a34f0bca3f6124c98426d56eb8e1b6'/>
<id>4775d1ffa8a34f0bca3f6124c98426d56eb8e1b6</id>
<content type='text'>
Add locations to struct `RNode_IN`.

memo:

```bash
&gt; ruby -e 'case 1; in 2 then 3; end' --parser=prism --dump=parsetree
@ ProgramNode (location: (1,0)-(1,24))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,24))
    +-- body: (length: 1)
        +-- @ CaseMatchNode (location: (1,0)-(1,24))
            +-- predicate:
            |   @ IntegerNode (location: (1,5)-(1,6))
            |   +-- IntegerBaseFlags: decimal
            |   +-- value: 1
            +-- conditions: (length: 1)
            |   +-- @ InNode (location: (1,8)-(1,19))
            |       +-- pattern:
            |       |   @ IntegerNode (location: (1,11)-(1,12))
            |       |   +-- IntegerBaseFlags: decimal
            |       |   +-- value: 2
            |       +-- statements:
            |       |   @ StatementsNode (location: (1,18)-(1,19))
            |       |   +-- body: (length: 1)
            |       |       +-- @ IntegerNode (location: (1,18)-(1,19))
            |       |           +-- IntegerBaseFlags: decimal
            |       |           +-- value: 3
            |       +-- in_loc: (1,8)-(1,10) = "in"
            |       +-- then_loc: (1,13)-(1,17) = "then"
            +-- else_clause: nil
            +-- case_keyword_loc: (1,0)-(1,4) = "case"
            +-- end_keyword_loc: (1,21)-(1,24) = "end"
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add locations to struct `RNode_IN`.

memo:

```bash
&gt; ruby -e 'case 1; in 2 then 3; end' --parser=prism --dump=parsetree
@ ProgramNode (location: (1,0)-(1,24))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,24))
    +-- body: (length: 1)
        +-- @ CaseMatchNode (location: (1,0)-(1,24))
            +-- predicate:
            |   @ IntegerNode (location: (1,5)-(1,6))
            |   +-- IntegerBaseFlags: decimal
            |   +-- value: 1
            +-- conditions: (length: 1)
            |   +-- @ InNode (location: (1,8)-(1,19))
            |       +-- pattern:
            |       |   @ IntegerNode (location: (1,11)-(1,12))
            |       |   +-- IntegerBaseFlags: decimal
            |       |   +-- value: 2
            |       +-- statements:
            |       |   @ StatementsNode (location: (1,18)-(1,19))
            |       |   +-- body: (length: 1)
            |       |       +-- @ IntegerNode (location: (1,18)-(1,19))
            |       |           +-- IntegerBaseFlags: decimal
            |       |           +-- value: 3
            |       +-- in_loc: (1,8)-(1,10) = "in"
            |       +-- then_loc: (1,13)-(1,17) = "then"
            +-- else_clause: nil
            +-- case_keyword_loc: (1,0)-(1,4) = "case"
            +-- end_keyword_loc: (1,21)-(1,24) = "end"
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Add MODULE NODE locations</title>
<updated>2025-08-06T16:07:16+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2025-07-26T01:31:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bcd21053f733a93a82a34c6f5c23d6af2a8010ed'/>
<id>bcd21053f733a93a82a34c6f5c23d6af2a8010ed</id>
<content type='text'>
Add `keyword_module` amd `keyword_end` locations to struct `RNode_MODULE`.

memo:
```
&gt;ruby --dump=parsetree -e 'module A end'
@ ProgramNode (location: (1,0)-(1,12))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,12))
    +-- body: (length: 1)
        +-- @ ModuleNode (location: (1,0)-(1,12))
            +-- locals: []
            +-- module_keyword_loc: (1,0)-(1,6) = "module"
            +-- constant_path:
            |   @ ConstantReadNode (location: (1,7)-(1,8))
            |   +-- name: :A
            +-- body: nil
            +-- end_keyword_loc: (1,9)-(1,12) = "end"
            +-- name: :A
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add `keyword_module` amd `keyword_end` locations to struct `RNode_MODULE`.

memo:
```
&gt;ruby --dump=parsetree -e 'module A end'
@ ProgramNode (location: (1,0)-(1,12))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,12))
    +-- body: (length: 1)
        +-- @ ModuleNode (location: (1,0)-(1,12))
            +-- locals: []
            +-- module_keyword_loc: (1,0)-(1,6) = "module"
            +-- constant_path:
            |   @ ConstantReadNode (location: (1,7)-(1,8))
            |   +-- name: :A
            +-- body: nil
            +-- end_keyword_loc: (1,9)-(1,12) = "end"
            +-- name: :A
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Add NODE_DEFINED tests for cases with parentheses to test_ast.rb</title>
<updated>2025-07-24T16:07:32+00:00</updated>
<author>
<name>ydah</name>
<email>t.yudai92@gmail.com</email>
</author>
<published>2025-07-24T14:39:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b2838bef693db39960ca5e326e61408b4721b7bb'/>
<id>b2838bef693db39960ca5e326e61408b4721b7bb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add DEFINED NODE locations</title>
<updated>2025-07-24T14:30:23+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2025-07-24T12:59:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fd492a45eb747f49d1f35c09332b654ada0280dc'/>
<id>fd492a45eb747f49d1f35c09332b654ada0280dc</id>
<content type='text'>
Add keyword_defined locations to struct RNode_DEFINED
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add keyword_defined locations to struct RNode_DEFINED
</pre>
</div>
</content>
</entry>
</feed>
