<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/json/generator, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/json] Fix generate(script_safe: true) to not confuse unrelated characters</title>
<updated>2024-12-05T08:16:22+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-12-03T08:11:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1510d72bec297047b5fd44eb89cf66cd4cb248e8'/>
<id>1510d72bec297047b5fd44eb89cf66cd4cb248e8</id>
<content type='text'>
Fix: https://github.com/ruby/json/issues/715

The first byte check was missing.

https://github.com/ruby/json/commit/93a7f8717d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix: https://github.com/ruby/json/issues/715

The first byte check was missing.

https://github.com/ruby/json/commit/93a7f8717d
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Prevent a warning of "a candidate for gnu_printf format attribute"</title>
<updated>2024-11-27T14:35:20+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2024-11-27T02:18:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=209f8ba7c4ce0130fbdd3872b629a66f9c889910'/>
<id>209f8ba7c4ce0130fbdd3872b629a66f9c889910</id>
<content type='text'>
GCC 13 prints the following warning.

https://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20241127T001003Z.log.html.gz
```
compiling generator.c
generator.c: In function ‘raise_generator_error’:
generator.c:91:5: warning: function ‘raise_generator_error’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
   91 |     VALUE str = rb_vsprintf(fmt, args);
      |     ^~~~~
```

This change prevents the warning by specifying the format attribute.

https://github.com/ruby/json/commit/b8c1490846
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC 13 prints the following warning.

https://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20241127T001003Z.log.html.gz
```
compiling generator.c
generator.c: In function ‘raise_generator_error’:
generator.c:91:5: warning: function ‘raise_generator_error’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
   91 |     VALUE str = rb_vsprintf(fmt, args);
      |     ^~~~~
```

This change prevents the warning by specifying the format attribute.

https://github.com/ruby/json/commit/b8c1490846
</pre>
</div>
</content>
</entry>
<entry>
<title>JSON::GeneratorError expose invalid object</title>
<updated>2024-11-26T06:11:05+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-11-25T10:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=693a79352157ee925308f029e6c3c0cad202aee4'/>
<id>693a79352157ee925308f029e6c3c0cad202aee4</id>
<content type='text'>
Fix: https://github.com/ruby/json/issues/710

Makes it easier to debug why a given tree of objects can't
be dumped as JSON.

Co-Authored-By: Étienne Barrié &lt;etienne.barrie@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix: https://github.com/ruby/json/issues/710

Makes it easier to debug why a given tree of objects can't
be dumped as JSON.

Co-Authored-By: Étienne Barrié &lt;etienne.barrie@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] JSON.dump: write directly into the provided IO</title>
<updated>2024-11-26T06:11:05+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-11-05T18:57:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ee0de3fd4e02f95f42fd3fe9cb18bcfe3e7e2bf1'/>
<id>ee0de3fd4e02f95f42fd3fe9cb18bcfe3e7e2bf1</id>
<content type='text'>
Ref: https://github.com/ruby/json/issues/524

Rather than to buffer everything in memory.

Unfortunately Ruby doesn't provide an API to write into
and IO without first allocating a string, which is a bit
wasteful.

https://github.com/ruby/json/commit/f017af6c0a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ref: https://github.com/ruby/json/issues/524

Rather than to buffer everything in memory.

Unfortunately Ruby doesn't provide an API to write into
and IO without first allocating a string, which is a bit
wasteful.

https://github.com/ruby/json/commit/f017af6c0a
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Fix right shift warnings</title>
<updated>2024-11-06T22:31:30+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-11-06T10:56:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=29d76d8c8b9e45f51a2fa6819b3854f2423239b0'/>
<id>29d76d8c8b9e45f51a2fa6819b3854f2423239b0</id>
<content type='text'>
Ignoring `CHAR_BITS` &gt; 8 platform, as far as `ch` indexes
`escape_table` that is hard-coded as 256 elements.

```
../../../../src/ext/json/generator/generator.c(121): warning C4333: '&gt;&gt;': right shift by too large amount, data loss
../../../../src/ext/json/generator/generator.c(122): warning C4333: '&gt;&gt;': right shift by too large amount, data loss
../../../../src/ext/json/generator/generator.c(243): warning C4333: '&gt;&gt;': right shift by too large amount, data loss
../../../../src/ext/json/generator/generator.c(244): warning C4333: '&gt;&gt;': right shift by too large amount, data loss
../../../../src/ext/json/generator/generator.c(291): warning C4333: '&gt;&gt;': right shift by too large amount, data loss
../../../../src/ext/json/generator/generator.c(292): warning C4333: '&gt;&gt;': right shift by too large amount, data loss
```

https://github.com/ruby/json/commit/fb82373612
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ignoring `CHAR_BITS` &gt; 8 platform, as far as `ch` indexes
`escape_table` that is hard-coded as 256 elements.

```
../../../../src/ext/json/generator/generator.c(121): warning C4333: '&gt;&gt;': right shift by too large amount, data loss
../../../../src/ext/json/generator/generator.c(122): warning C4333: '&gt;&gt;': right shift by too large amount, data loss
../../../../src/ext/json/generator/generator.c(243): warning C4333: '&gt;&gt;': right shift by too large amount, data loss
../../../../src/ext/json/generator/generator.c(244): warning C4333: '&gt;&gt;': right shift by too large amount, data loss
../../../../src/ext/json/generator/generator.c(291): warning C4333: '&gt;&gt;': right shift by too large amount, data loss
../../../../src/ext/json/generator/generator.c(292): warning C4333: '&gt;&gt;': right shift by too large amount, data loss
```

https://github.com/ruby/json/commit/fb82373612
</pre>
</div>
</content>
</entry>
<entry>
<title>Update depend files</title>
<updated>2024-11-05T17:00:36+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-11-05T16:13:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9987298654c5951d320f00876e2df0c2aa27c02c'/>
<id>9987298654c5951d320f00876e2df0c2aa27c02c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Resync</title>
<updated>2024-11-05T17:00:36+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-11-05T15:35:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ca8f21ace86e9c7ab184b3f0087ff458c06b178c'/>
<id>ca8f21ace86e9c7ab184b3f0087ff458c06b178c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Add tests for the behavior of JSON.generate with base types subclasses</title>
<updated>2024-11-05T17:00:36+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-11-04T12:15:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f664e7eaabf919c893bfbfab9e774db0523eec11'/>
<id>f664e7eaabf919c893bfbfab9e774db0523eec11</id>
<content type='text'>
Ref: https://github.com/ruby/json/pull/674
Ref: https://github.com/ruby/json/pull/668

The behavior on such case it quite unclear, the goal here is to
figure out whatever was the behavior on Cext version of `json 2.7.0`
and get all implementations to converge.

We can then decide to make them all behave differently if we so wish.

https://github.com/ruby/json/commit/614921dcef
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ref: https://github.com/ruby/json/pull/674
Ref: https://github.com/ruby/json/pull/668

The behavior on such case it quite unclear, the goal here is to
figure out whatever was the behavior on Cext version of `json 2.7.0`
and get all implementations to converge.

We can then decide to make them all behave differently if we so wish.

https://github.com/ruby/json/commit/614921dcef
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Use rb_str_new_frozen</title>
<updated>2024-11-05T17:00:36+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-11-03T09:22:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2f84a02ad51414c0b2e80da671745184031e6f4c'/>
<id>2f84a02ad51414c0b2e80da671745184031e6f4c</id>
<content type='text'>
https://github.com/ruby/json/commit/90c8aaaa6a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/json/commit/90c8aaaa6a
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/json] Trigger write barrier when setting Generator::State configs</title>
<updated>2024-11-01T04:04:24+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-10-31T10:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b85a7a44fa05da4078c8b0e20445947d8551788d'/>
<id>b85a7a44fa05da4078c8b0e20445947d8551788d</id>
<content type='text'>
Followup: https://github.com/ruby/json/commit/6382c231b0b8

https://github.com/ruby/json/commit/0c797b4a11
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Followup: https://github.com/ruby/json/commit/6382c231b0b8

https://github.com/ruby/json/commit/0c797b4a11
</pre>
</div>
</content>
</entry>
</feed>
