<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/pack.c, 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>merge revision(s) 4e0bb58a0a374b40b7691e7b7aa88e759a0fc9f2: [Backport #21811]</title>
<updated>2026-01-13T01:02:01+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-01-13T01:02:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b170f02e0f2a7831b51a9279ee2d35a5e4ecace9'/>
<id>b170f02e0f2a7831b51a9279ee2d35a5e4ecace9</id>
<content type='text'>
	[PATCH] fix underflow
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[PATCH] fix underflow
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert pack/unpack support for LEB128</title>
<updated>2025-12-20T07:59:51+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-12-20T07:12:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=77c3a9e447ec477be39e00072e1ce3348d0f4533'/>
<id>77c3a9e447ec477be39e00072e1ce3348d0f4533</id>
<content type='text'>
https://bugs.ruby-lang.org/issues/21785#note-10
&gt; It is too late to introduce it in Ruby 4.0, let's aim for 4.1.

This reverts commits:

* d0b72429a93e54f1f956b4aedfc25c57dc7001aa
  Add support for signed and unsigned LEB128 to pack/unpack.

* 68a900e30b4ca1537d7975c3a619fd94fca7b084
  add news for pack / unpack directives
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://bugs.ruby-lang.org/issues/21785#note-10
&gt; It is too late to introduce it in Ruby 4.0, let's aim for 4.1.

This reverts commits:

* d0b72429a93e54f1f956b4aedfc25c57dc7001aa
  Add support for signed and unsigned LEB128 to pack/unpack.

* 68a900e30b4ca1537d7975c3a619fd94fca7b084
  add news for pack / unpack directives
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for signed and unsigned LEB128 to pack/unpack.</title>
<updated>2025-12-18T22:42:47+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2025-12-16T17:10:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d0b72429a93e54f1f956b4aedfc25c57dc7001aa'/>
<id>d0b72429a93e54f1f956b4aedfc25c57dc7001aa</id>
<content type='text'>
This commit adds a new pack format command `R` and `r` for unsigned and
signed LEB128 encoding.  The "r" mnemonic is because this is a
"vaRiable" length encoding scheme.

LEB128 is used in various formats including DWARF, WebAssembly, MQTT,
and Protobuf.

[Feature #21785]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds a new pack format command `R` and `r` for unsigned and
signed LEB128 encoding.  The "r" mnemonic is because this is a
"vaRiable" length encoding scheme.

LEB128 is used in various formats including DWARF, WebAssembly, MQTT,
and Protobuf.

[Feature #21785]
</pre>
</div>
</content>
</entry>
<entry>
<title>Expand buffer at once then fill it at once</title>
<updated>2024-09-29T09:55:15+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-09-29T09:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=066ac0fdc2703ef627dab19cbb275d9aa28857a3'/>
<id>066ac0fdc2703ef627dab19cbb275d9aa28857a3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Extract common code from `pack_pack` and `pack_unpack_internal`</title>
<updated>2024-09-29T09:45:47+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-09-29T09:07:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3b43585a84978e9ca9b474ba55087edfd0863147'/>
<id>3b43585a84978e9ca9b474ba55087edfd0863147</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce a specialize instruction for Array#pack</title>
<updated>2024-05-23T19:11:50+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-05-23T18:23:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=49fcd33e136ee2fe8720183b63a41bb6ef8d615c'/>
<id>49fcd33e136ee2fe8720183b63a41bb6ef8d615c</id>
<content type='text'>
Instructions for this code:

```ruby
  # frozen_string_literal: true

[a].pack("C")
```

Before this commit:

```
== disasm: #&lt;ISeq:&lt;main&gt;@test.rb:1 (1,0)-(3,13)&gt;
0000 putself                                                          (   3)[Li]
0001 opt_send_without_block                 &lt;calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE&gt;
0003 newarray                               1
0005 putobject                              "C"
0007 opt_send_without_block                 &lt;calldata!mid:pack, argc:1, ARGS_SIMPLE&gt;
0009 leave
```

After this commit:

```
== disasm: #&lt;ISeq:&lt;main&gt;@test.rb:1 (1,0)-(3,13)&gt;
0000 putself                                                          (   3)[Li]
0001 opt_send_without_block                 &lt;calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE&gt;
0003 putobject                              "C"
0005 opt_newarray_send                      2, :pack
0008 leave
```

Co-authored-by: Maxime Chevalier-Boisvert &lt;maxime.chevalierboisvert@shopify.com&gt;
Co-authored-by: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instructions for this code:

```ruby
  # frozen_string_literal: true

[a].pack("C")
```

Before this commit:

```
== disasm: #&lt;ISeq:&lt;main&gt;@test.rb:1 (1,0)-(3,13)&gt;
0000 putself                                                          (   3)[Li]
0001 opt_send_without_block                 &lt;calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE&gt;
0003 newarray                               1
0005 putobject                              "C"
0007 opt_send_without_block                 &lt;calldata!mid:pack, argc:1, ARGS_SIMPLE&gt;
0009 leave
```

After this commit:

```
== disasm: #&lt;ISeq:&lt;main&gt;@test.rb:1 (1,0)-(3,13)&gt;
0000 putself                                                          (   3)[Li]
0001 opt_send_without_block                 &lt;calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE&gt;
0003 putobject                              "C"
0005 opt_newarray_send                      2, :pack
0008 leave
```

Co-authored-by: Maxime Chevalier-Boisvert &lt;maxime.chevalierboisvert@shopify.com&gt;
Co-authored-by: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Reuse `natstr` if it equals `endstr`</title>
<updated>2023-10-06T07:33:44+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-10-06T04:53:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=232e401b0f19cb5191ae7a0ec107fc9bf10c8145'/>
<id>232e401b0f19cb5191ae7a0ec107fc9bf10c8145</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a typo in BUG message [ci skip]</title>
<updated>2023-01-19T15:20:27+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-01-19T15:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f36178006b99fd121e7936968d210e570f8d99d0'/>
<id>f36178006b99fd121e7936968d210e570f8d99d0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add RBIMPL_ATTR_NORETURN to unknown_directive</title>
<updated>2023-01-05T19:55:14+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-01-05T19:14:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=29a5fcd60b3738378b66499636a10f96a0f2a474'/>
<id>29a5fcd60b3738378b66499636a10f96a0f2a474</id>
<content type='text'>
Fixes a compiler warning about the function unknown_directive:

pack.c:160:1: warning: function 'unknown_directive' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes a compiler warning about the function unknown_directive:

pack.c:160:1: warning: function 'unknown_directive' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
</pre>
</div>
</content>
</entry>
<entry>
<title>Raise an ArgumentError for unknown pack/unpack directive</title>
<updated>2023-01-05T18:05:03+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2023-01-05T17:41:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=03dd37775afb40eef392ae2920d728235af302c8'/>
<id>03dd37775afb40eef392ae2920d728235af302c8</id>
<content type='text'>
* [Bug #19150]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* [Bug #19150]
</pre>
</div>
</content>
</entry>
</feed>
