<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ripper/test_parser_events.rb, 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>[Bug #21712] Allow `.()` call for command with block</title>
<updated>2025-12-11T09:35:39+00:00</updated>
<author>
<name>yui-knk</name>
<email>spiketeika@gmail.com</email>
</author>
<published>2025-12-02T02:03:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c5b51bdd8c69ae038daf80cb227df854ca0110f1'/>
<id>c5b51bdd8c69ae038daf80cb227df854ca0110f1</id>
<content type='text'>
This commit allows codes like `a b do end.()` and `a b do end&amp;.()`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit allows codes like `a b do end.()` and `a b do end&amp;.()`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix leak of token_info when Ripper#warn jumps</title>
<updated>2024-08-07T13:14:14+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-07-31T18:59:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=584559d86a951095d793a536ad998e12ea08a890'/>
<id>584559d86a951095d793a536ad998e12ea08a890</id>
<content type='text'>
For example, the following code leaks:

    class MyRipper &lt; Ripper
      def initialize(src, &amp;blk)
        super(src)
        @blk = blk
      end

      def warn(msg, *args) = @blk.call(msg)
    end

    $VERBOSE = true
    def call_parse = MyRipper.new("if true\n  end\n") { |msg| return msg }.parse

    10.times do
      500_000.times do
        call_parse
      end

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

Before:

    37536
    53744
    70064
    86448
    102576
    119120
    135248
    151216
    167744
    183824

After:

    19280
    19696
    19728
    20336
    20448
    21408
    21616
    21616
    21824
    21840
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For example, the following code leaks:

    class MyRipper &lt; Ripper
      def initialize(src, &amp;blk)
        super(src)
        @blk = blk
      end

      def warn(msg, *args) = @blk.call(msg)
    end

    $VERBOSE = true
    def call_parse = MyRipper.new("if true\n  end\n") { |msg| return msg }.parse

    10.times do
      500_000.times do
        call_parse
      end

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

Before:

    37536
    53744
    70064
    86448
    102576
    119120
    135248
    151216
    167744
    183824

After:

    19280
    19696
    19728
    20336
    20448
    21408
    21616
    21616
    21824
    21840
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix leak in warning of duplicate keys when Ripper#warn jumps</title>
<updated>2024-08-06T14:19:50+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-07-31T18:18:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ced35800d48e671ed739c8451823c7d3180ef8ac'/>
<id>ced35800d48e671ed739c8451823c7d3180ef8ac</id>
<content type='text'>
For example, the following code leaks:

    class MyRipper &lt; Ripper
      def initialize(src, &amp;blk)
        super(src)
        @blk = blk
      end

      def warn(msg, *args) = @blk.call(msg)
    end

    $VERBOSE = true
    def call_parse = MyRipper.new("if true\n  end\n") { |msg| return msg }.parse

    10.times do
      500_000.times do
        call_parse
      end

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

Before:

    34832
    51952
    69760
    88048
    105344
    123040
    141152
    159152
    176656
    194272

After:

    18400
    20256
    20272
    20272
    20272
    20304
    20368
    20368
    20368
    20400
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For example, the following code leaks:

    class MyRipper &lt; Ripper
      def initialize(src, &amp;blk)
        super(src)
        @blk = blk
      end

      def warn(msg, *args) = @blk.call(msg)
    end

    $VERBOSE = true
    def call_parse = MyRipper.new("if true\n  end\n") { |msg| return msg }.parse

    10.times do
      500_000.times do
        call_parse
      end

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

Before:

    34832
    51952
    69760
    88048
    105344
    123040
    141152
    159152
    176656
    194272

After:

    18400
    20256
    20272
    20272
    20272
    20304
    20368
    20368
    20368
    20400
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix leak of AST when Ripper#compile_error jumps</title>
<updated>2024-07-31T18:47:44+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-07-31T17:32:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=635839749026b5d5bafeb892f2f01a9348a4b5c8'/>
<id>635839749026b5d5bafeb892f2f01a9348a4b5c8</id>
<content type='text'>
For example, the following script leaks:

    class MyRipper &lt; Ripper
      def initialize(src, &amp;blk)
        super(src)
        @blk = blk
      end

      def compile_error(msg) = @blk.call(msg)
    end

    def call_parse = MyRipper.new("/") { |msg| return msg }.parse

    10.times do
      100_000.times do
        call_parse
      end

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

Before:

    93952
    169040
    244224
    318784
    394432
    468224
    544048
    618560
    693776
    768384

After:

    19776
    19776
    20352
    20880
    20912
    21408
    21328
    21152
    21472
    20944
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For example, the following script leaks:

    class MyRipper &lt; Ripper
      def initialize(src, &amp;blk)
        super(src)
        @blk = blk
      end

      def compile_error(msg) = @blk.call(msg)
    end

    def call_parse = MyRipper.new("/") { |msg| return msg }.parse

    10.times do
      100_000.times do
        call_parse
      end

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

Before:

    93952
    169040
    244224
    318784
    394432
    468224
    544048
    618560
    693776
    768384

After:

    19776
    19776
    20352
    20880
    20912
    21408
    21328
    21152
    21472
    20944
</pre>
</div>
</content>
</entry>
<entry>
<title>ripper: Fix excess `compile_error` at simple backref op_asgn</title>
<updated>2024-06-07T02:28:38+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-05-19T10:42:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9e28354705e2aa312e5dee775e3bd08095fc7e9c'/>
<id>9e28354705e2aa312e5dee775e3bd08095fc7e9c</id>
<content type='text'>
Fix up 89cfc1520717257073012ec07105c551e4b8af7c.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix up 89cfc1520717257073012ec07105c551e4b8af7c.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update duplicated when clause warning message</title>
<updated>2024-05-24T16:36:54+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-05-15T19:17:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=47f0965269dae95c678b4276861cc389d277ce33'/>
<id>47f0965269dae95c678b4276861cc389d277ce33</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ripper: Fix opassign when assignment to backref variables</title>
<updated>2024-05-12T06:38:22+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-05-12T06:38:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5695c5df95460ed9949e1c8f8ca89b4a5c5cc4dd'/>
<id>5695c5df95460ed9949e1c8f8ca89b4a5c5cc4dd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ripper: Use `$&amp;` instead of quoting charaters in tests</title>
<updated>2024-05-12T06:36:42+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-05-10T13:46:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a1fb6cc978ffba6c4a8284a4fcca3efcef684714'/>
<id>a1fb6cc978ffba6c4a8284a4fcca3efcef684714</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix SEGV when ripper hits `backref_error` on `command_asgn` or `arg`</title>
<updated>2024-05-11T11:47:15+00:00</updated>
<author>
<name>yui-knk</name>
<email>spiketeika@gmail.com</email>
</author>
<published>2024-05-11T08:08:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7e604a02637275f7f2f1b13074abe1d5f146829b'/>
<id>7e604a02637275f7f2f1b13074abe1d5f146829b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Emit `warn` event for duplicated hash keys on ripper</title>
<updated>2024-04-14T21:29:25+00:00</updated>
<author>
<name>yui-knk</name>
<email>spiketeika@gmail.com</email>
</author>
<published>2024-04-07T01:59:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=515e52a0b1ce61ccaffe9183bcb78dda95a64907'/>
<id>515e52a0b1ce61ccaffe9183bcb78dda95a64907</id>
<content type='text'>
Need to use `rb_warn` macro instead of calling `rb_compile_warn`
directly to emit `warn` event on ripper.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Need to use `rb_warn` macro instead of calling `rb_compile_warn`
directly to emit `warn` event on ripper.
</pre>
</div>
</content>
</entry>
</feed>
