<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/include/ruby/internal/error.h, 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>`Warning[:strict_unused_block]`</title>
<updated>2024-11-06T02:06:18+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2024-11-05T18:41:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ab7ab9e4508c24b998703824aa9576fb2e092065'/>
<id>ab7ab9e4508c24b998703824aa9576fb2e092065</id>
<content type='text'>
to show unused block warning strictly.

```ruby
class C
  def f = nil
end

class D
  def f = yield
end

[C.new, D.new].each{|obj| obj.f{}}
```

In this case, `D#f` accepts a block. However `C#f` doesn't
accept a block. There are some cases passing a block with
`obj.f{}` where `obj` is `C` or `D`. To avoid warnings on
such cases, "unused block warning" will be warned only if
there is not same name which accepts a block.
On the above example, `C.new.f{}` doesn't show any warnings
because there is a same name `D#f` which accepts a block.

We call this default behavior as "relax mode".

`strict_unused_block` new warning category changes from
"relax mode" to "strict mode", we don't check same name
methods and `C.new.f{}` will be warned.

[Feature #15554]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to show unused block warning strictly.

```ruby
class C
  def f = nil
end

class D
  def f = yield
end

[C.new, D.new].each{|obj| obj.f{}}
```

In this case, `D#f` accepts a block. However `C#f` doesn't
accept a block. There are some cases passing a block with
`obj.f{}` where `obj` is `C` or `D`. To avoid warnings on
such cases, "unused block warning" will be warned only if
there is not same name which accepts a block.
On the above example, `C.new.f{}` doesn't show any warnings
because there is a same name `D#f` which accepts a block.

We call this default behavior as "relax mode".

`strict_unused_block` new warning category changes from
"relax mode" to "strict mode", we don't check same name
methods and `C.new.f{}` will be warned.

[Feature #15554]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix documentation for rb_warn() and friends</title>
<updated>2023-09-29T10:53:40+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2023-09-29T10:51:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4468b6ef3c30158f975168418c58e693c7b6e228'/>
<id>4468b6ef3c30158f975168418c58e693c7b6e228</id>
<content type='text'>
* rb_warn() does not warn if $VERBOSE is nil, the "always" is wrong.
* Talk about $VERBOSE and not -W since $VERBOSE can be changed at runtime.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* rb_warn() does not warn if $VERBOSE is nil, the "always" is wrong.
* Talk about $VERBOSE and not -W since $VERBOSE can be changed at runtime.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add RB_WARN_CATEGORY_DEFAULT_BITS</title>
<updated>2023-04-14T07:46:10+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>byroot@ruby-lang.org</email>
</author>
<published>2023-04-13T14:48:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6a5c355e4e7deb76363f474041d00465be3b317b'/>
<id>6a5c355e4e7deb76363f474041d00465be3b317b</id>
<content type='text'>
Followup: ac123f167a364c3d7a43eca78d564e41f6dbb91e

RB_WARN_CATEGORY_ALL_BITS is exposed in a public header, so it
makes sense for it to be updated to contain all valid bits.

Instead we introduce RB_WARN_CATEGORY_DEFAULT_BITS to list the
categories that are enabled by default.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Followup: ac123f167a364c3d7a43eca78d564e41f6dbb91e

RB_WARN_CATEGORY_ALL_BITS is exposed in a public header, so it
makes sense for it to be updated to contain all valid bits.

Instead we introduce RB_WARN_CATEGORY_DEFAULT_BITS to list the
categories that are enabled by default.
</pre>
</div>
</content>
</entry>
<entry>
<title>Emit a performance warning when a class reached max variations</title>
<updated>2023-04-13T14:36:17+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>byroot@ruby-lang.org</email>
</author>
<published>2023-04-13T10:11:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ac123f167a364c3d7a43eca78d564e41f6dbb91e'/>
<id>ac123f167a364c3d7a43eca78d564e41f6dbb91e</id>
<content type='text'>
[Feature #19538]

This new `peformance` warning category is disabled by default.
It needs to be specifically enabled via `-W:performance` or `Warning[:performance] = true`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Feature #19538]

This new `peformance` warning category is disabled by default.
It needs to be specifically enabled via `-W:performance` or `Warning[:performance] = true`
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable all warning categories other than `RB_WARN_CATEGORY_ALL_BITS`</title>
<updated>2023-04-13T09:08:08+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-04-13T06:43:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=de023b68aa32240d08e420f549edcb8df7d8452c'/>
<id>de023b68aa32240d08e420f549edcb8df7d8452c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>include/ruby/internal/error.h: name a parameter</title>
<updated>2021-09-10T11:00:06+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2020-12-09T08:00:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=99c3328edc696ec3ce12d536a1dfe4578fd26f13'/>
<id>99c3328edc696ec3ce12d536a1dfe4578fd26f13</id>
<content type='text'>
Better document [ci skip]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Better document [ci skip]
</pre>
</div>
</content>
</entry>
<entry>
<title>include/ruby/internal/error.h: refactor move contents around [ci skip]</title>
<updated>2021-09-10T11:00:06+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2020-12-21T02:16:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=891dbedd001720442167b8bbeee0edf11c3e58de'/>
<id>891dbedd001720442167b8bbeee0edf11c3e58de</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>include/ruby/internal/error.h: add doxygen</title>
<updated>2021-09-10T11:00:06+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2020-12-21T02:15:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1b6245ccdcd414698a257847d508603f438578ca'/>
<id>1b6245ccdcd414698a257847d508603f438578ca</id>
<content type='text'>
Must not be a bad idea to improve documents.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Must not be a bad idea to improve documents.
</pre>
</div>
</content>
</entry>
<entry>
<title>sed -i 's/. They/.  They/'</title>
<updated>2021-09-10T11:00:06+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2021-01-14T06:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=94e5953b484517234ad476b1e179d1bdbcbafbd7'/>
<id>94e5953b484517234ad476b1e179d1bdbcbafbd7</id>
<content type='text'>
Truly editorial fix for comments.  This works better with Emacs'
set-justification-full function. [ci skip]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Truly editorial fix for comments.  This works better with Emacs'
set-justification-full function. [ci skip]
</pre>
</div>
</content>
</entry>
<entry>
<title>Mark `rb_unexpected_type` as "cold" [Bug #18062]</title>
<updated>2021-08-13T04:29:15+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2021-08-12T01:42:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=611da9faef76777e57718cf5b0286b965879479c'/>
<id>611da9faef76777e57718cf5b0286b965879479c</id>
<content type='text'>
So that it will not interfere the fast path in `Check_Type`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So that it will not interfere the fast path in `Check_Type`.
</pre>
</div>
</content>
</entry>
</feed>
