<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/prism_compile.h, branch v4.0.3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Explicitly use a ruby version for prism to parse the code as (#14523)</title>
<updated>2025-09-12T20:49:35+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-09-12T20:49:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ea8d49376375bf3029abe8851ef88f880eeb0e1a'/>
<id>ea8d49376375bf3029abe8851ef88f880eeb0e1a</id>
<content type='text'>
Prism can parse multiple versions of ruby. Because of that branch release managers are ok with simply
bumping prism to its latest version.

However, if no version is specified, it will parse as the latest known version, which can be ahead of the maintenance branch.
So we need to explicitly pass a version to not accidentally introduce new syntax to maintenance branches.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prism can parse multiple versions of ruby. Because of that branch release managers are ok with simply
bumping prism to its latest version.

However, if no version is specified, it will parse as the latest known version, which can be ahead of the maintenance branch.
So we need to explicitly pass a version to not accidentally introduce new syntax to maintenance branches.</pre>
</div>
</content>
</entry>
<entry>
<title>[PRISM] Handle forwarding inside eval</title>
<updated>2025-01-14T23:41:50+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-01-14T22:48:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cb419e3912f0514b8151469b0a4a4b83cbbcce78'/>
<id>cb419e3912f0514b8151469b0a4a4b83cbbcce78</id>
<content type='text'>
Fixes [Bug #21031]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes [Bug #21031]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix memory leak in prism when syntax error in iseq compilation</title>
<updated>2024-11-08T20:43:41+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-11-08T19:33:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=51ffef281996727c60571771cd07c1459ba58cd2'/>
<id>51ffef281996727c60571771cd07c1459ba58cd2</id>
<content type='text'>
If there's a syntax error during iseq compilation then prism would leak
memory because it would not free the pm_parse_result_t.

This commit changes pm_iseq_new_with_opt to have a rb_protect to catch
when an error is raised, and return NULL and set error_state to a value
that can be raised by calling rb_jump_tag after memory has been freed.

For example:

    10.times do
      10_000.times do
        eval("/[/=~s")
      rescue SyntaxError
      end

      puts `ps -o rss= -p #{$$}`
    end

Before:

    39280
    68736
    99232
    128864
    158896
    188208
    217344
    246304
    275376
    304592

After:

    12192
    13200
    14256
    14848
    16000
    16000
    16000
    16064
    17232
    17952
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there's a syntax error during iseq compilation then prism would leak
memory because it would not free the pm_parse_result_t.

This commit changes pm_iseq_new_with_opt to have a rb_protect to catch
when an error is raised, and return NULL and set error_state to a value
that can be raised by calling rb_jump_tag after memory has been freed.

For example:

    10.times do
      10_000.times do
        eval("/[/=~s")
      rescue SyntaxError
      end

      puts `ps -o rss= -p #{$$}`
    end

Before:

    39280
    68736
    99232
    128864
    158896
    188208
    217344
    246304
    275376
    304592

After:

    12192
    13200
    14256
    14848
    16000
    16000
    16000
    16064
    17232
    17952
</pre>
</div>
</content>
</entry>
<entry>
<title>Make default parser enum and define getter/setter</title>
<updated>2024-10-02T11:43:40+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-10-02T10:08:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3e1021b1448a5820d387795e065ae25b9da5abdf'/>
<id>3e1021b1448a5820d387795e065ae25b9da5abdf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[PRISM] Handle RubyVM.keep_script_lines</title>
<updated>2024-08-30T00:27:01+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-08-29T18:26:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=371432b2d7a5f4a21876434047192e680a688780'/>
<id>371432b2d7a5f4a21876434047192e680a688780</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[PRISM] Respect eval coverage setting</title>
<updated>2024-05-20T16:28:47+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-05-20T15:29:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a708b6aa6589b06ed059ad40e7d4e71ebe0e16e3'/>
<id>a708b6aa6589b06ed059ad40e7d4e71ebe0e16e3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[PRISM] Raise LoadError when file cannot be read</title>
<updated>2024-04-25T18:59:48+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-04-25T17:32:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=af24ba40344cdd83865c7c580756352be526794a'/>
<id>af24ba40344cdd83865c7c580756352be526794a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[PRISM] Fix BEGIN{} execution order</title>
<updated>2024-03-29T12:51:04+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-03-28T18:15:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8191735b73eac4486eebac6530bd92080ee23b9a'/>
<id>8191735b73eac4486eebac6530bd92080ee23b9a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[PRISM] Set path on syntax error</title>
<updated>2024-03-27T21:19:24+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-03-27T19:04:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7e12b03c5a179c1c738fec5ac1ad06dfdc879b1b'/>
<id>7e12b03c5a179c1c738fec5ac1ad06dfdc879b1b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[PRISM] Pass --enable-frozen-string-literal through to evals</title>
<updated>2024-03-27T12:34:42+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-03-26T19:32:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=42d1cd8f7fa62b585283e566d4be9a390631c43d'/>
<id>42d1cd8f7fa62b585283e566d4be9a390631c43d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
