Skip to content

Commit 3ecab91

Browse files
committed
[GR-19220] Remove duplicated Dir#ensure_open call and add guidelines for adding a ChangeLog entry (#2992)
PullRequest: truffleruby/3770
2 parents 43ae01b + 2caa27f commit 3ecab91

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,28 @@ You can use `tool/hooks/lint-check.sh` as a git hook to run `jt lint fast` autom
3535

3636
## ChangeLog
3737

38-
When opening a Pull Request, please add a ChangeLog entry with the format:
38+
When opening a Pull Request, if the change is visible or meaningful to users (they are the intended readers of the ChangeLog),
39+
please add a ChangeLog entry with this format:
3940

4041
```
4142
* Description (#GitHub issue number if any, @author).
4243
```
4344

4445
See the [the ChangeLog](CHANGELOG.md) for examples.
4546

47+
This is the meaning of the sections in the ChangeLog:
48+
* New features: a big new feature or a new method provided by TruffleRuby which does not exist in CRuby (e.g. a new interop method).
49+
* Compatibility: any change which helps compatibility with CRuby, whether it is a new method or behavior closer to CRuby.
50+
* Bug fixes: only for fixes where the bug "silently" caused incorrect behavior.
51+
For example, if it raised an exception before, the wrong behavior was pretty clear, so it should be under `Compatibility` not `Bug fixes`.
52+
On the other hand, if e.g. `1 + 2` returned `4` that should be under `Bug fixes`.
53+
* Performance: something which improves performance (whether interpreter, warmup or peak).
54+
* Memory Footprint: something which improves memory footprint.
55+
* Changes: this means incompatible changes that users may need to adapt to.
56+
57+
Always keep an empty line around the various sections, like it is done for entries in older releases.
58+
The idea is only add lines, never remove lines (important since this file uses union merge).
59+
4660
GitHub might show on the Pull Request:
4761
```
4862
Conflicting files

src/main/ruby/truffleruby/core/truffle/dir_operations.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def self.readdir_multiple(dir, resolve_type, exclude_self_and_parent, entries)
6060
end
6161

6262
def self.readdir_name(dir)
63-
dir.__send__(:ensure_open)
6463
dirptr = Primitive.object_ivar_get(dir, :@ptr)
6564
entry = Truffle::POSIX.truffleposix_readdir_name(dirptr)
6665
Errno.handle unless entry

0 commit comments

Comments
 (0)