Skip to content

Commit 190c9e2

Browse files
committed
[GR-20473] Backport: Update Ruby to 2.6.5.
PullRequest: truffleruby/1248
2 parents d94c06a + 2683a47 commit 190c9e2

File tree

163 files changed

+2699
-441
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+2699
-441
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Merge options
22

3-
/CHANGELOG.md merge=union
3+
#/CHANGELOG.md merge=union
44

55
# Rules for GitHub's Linguist language-classification system. We're abusing the
66
# 'vendored' attribute to exclude files as a lot of this isn't really vendored,

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.2
1+
2.6.5

3rd_party_licenses.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
257257
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
258258
THE SOFTWARE.
259259

260+
lib/rdoc/generator/template/darkfish/css/fonts.css:
261+
This file is licensed under the SIL Open Font License.
262+
http://scripts.sil.org/OFL
263+
260264
ext/psych/yaml:
261265
Copyright (c) 2006 Kirill Simonov
262266

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# 19.3.1
22

3+
New features:
4+
5+
* Updated to Ruby 2.6.5 (#1749).
6+
37
Compatibility:
48

59
* Implemented `rb_gc_register_mark_object` and `rb_enc_str_asciionly_p` (#1856, @chrisseaton).
10+
* Support for the Darkfish theme for RDoc generation has been added back.
611

712
# 19.3.0
813

doc/contributor/stdlib.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ gem list | grep default:
155155
* `ostruct` (default: 0.1.0)
156156
* `prime` (default: 0.1.0)
157157
* `psych` (default: 3.1.0)
158-
* `rdoc` (default: 6.1.0)
158+
* `rdoc` (default: 6.1.2)
159159
* `rexml` (default: 3.1.9)
160160
* `rss` (default: 0.2.7)
161161
* `scanf` (default: 1.0.0)

doc/contributor/updating-ruby.md

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ You'll usually get some conflicts to work out.
4444

4545
Configuration files must be regenerated from ruby for Linux and macOS
4646
and copied into `lib/cext/include/truffleruby`. In the MRI repository
47-
do the folowing
47+
do the following:
4848

4949
```
50+
graalvm_clang=$(jt ruby -e 'puts RbConfig::CONFIG["CC"]')
51+
5052
autoconf
51-
CC=clang ./configure
53+
CC=$graalvm_clang ./configure
5254
```
5355

5456
The output of configure should report that it has created or updated a
@@ -72,46 +74,29 @@ You will need to copy that file to
7274
* Update `doc/contributor/stdlib.md`
7375
* Update method lists - see `spec/truffle/methods_spec.rb`
7476
* Update `ci.jsonnet` to use the corresponding MRI version for benchmarking
77+
* Grep for the old version with `git grep -F x.y.z`
7578

7679
## Update libraries from third-party repos
7780

7881
Look in `../ruby/ext/json` to see the version of `flori/json` being used, and
7982
then copy the original source of `flori/json` into `lib/json`.
8083

81-
## Updating .gemspec of default gems
84+
## Updating default and bundled gems
85+
86+
You need a clean install (e.g., no extra gems installed) of MRI for this.
8287

83-
Default gems are imported from MRI files, except the .gemspec files in
84-
`lib/gems/specifications/default`.
85-
To update those, copy the files over from an installed MRI.
8688
```
89+
rm -rf lib/gems/gems
90+
cp -R ~/.rubies/ruby-n.n.n/lib/ruby/gems/n.n.n/gems lib/gems
91+
8792
rm -rf lib/gems/specifications/default
8893
cp -r ~/.rubies/ruby-n.n.n/lib/ruby/gems/n.n.n/specifications/default lib/gems/specifications
8994
```
9095

91-
If any of these gemspecs has executables (`s.executables = ...`), then those
92-
files must be copied under `lib/gems/gems/GEM-VERSION/exe` for `Gem.bin_path` to
93-
work:
94-
```
95-
grep -R executables lib/gems/specifications/default
96-
cp -R ~/.rubies/ruby-n.n.n/lib/ruby/gems/n.n.n/gems/GEM-VERSION lib/gems/gems
97-
```
98-
99-
Note: `gem install --default` might help with this, but it does not seem to
100-
create the executable files currently, even on MRI.
101-
10296
## Updating bundled gems
10397

104-
To update a bundled gem, follow these steps:
105-
106-
* Remove the current gem and gemspec from `lib/gems/gems` and
107-
`lib/gems/specifications`
108-
* Run the gem install command with the desired version
109-
`gem install rake -v 10.4.2 --no-doc`
110-
* Update the project `.gitignore` to allow the newly install gem sources
111-
and gemspec
112-
* Copy from the build directory `lib` to the source `lib`
113-
* If the gem installs any executables like `rake` in `bin` ensure that the
114-
shebang has a format as follows:
98+
If the gem installs any executables like `rake` in `bin` ensure that the
99+
shebang has a format as follows:
115100

116101
```bash
117102
#!/usr/bin/env bash

doc/legal/legal.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ See `epl-2.0.txt`, `gpl-2.txt`, `lgpl-2.1.txt`.
1919
## MRI
2020

2121
The standard implementation of Ruby is MRI. TruffleRuby contains code from MRI
22-
version 2.6.1, including:
22+
version 2.6.5, including:
2323

2424
* the standard library in `lib/mri`,
2525
* Ruby C extension API in `lib/cext/include` and `src/main/c/cext`,
@@ -45,6 +45,9 @@ CC0 public domain dedication, see `ccan-cc0.txt`.
4545
terms of 'BSD-MIT', see `ccan-bsd-mit.txt`. Despite the filename 'BSD-MIT' this
4646
is the conventional MIT licence.
4747

48+
RDoc Darkfish theme fonts under `lib/mri/rdoc/generator/template/darkfish/` are
49+
available under the terms of the SIL Open Font License 1.1, see `ofl.txt`.
50+
4851
The header file `lib/cext/include/ruby/onigmo.h` is part of Onigmo, available
4952
under the same 2-clause BSD licence as Ruby.
5053

doc/user/compatibility.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Compatibility
22

33
TruffleRuby aims to be fully compatible with the standard implementation of
4-
Ruby, MRI, version 2.6.2, revision 67232.
4+
Ruby, MRI, version 2.6.5.
55

66
Any incompatibility with MRI is considered a bug, except for rare cases detailed below.
77
If you find an incompatibility with MRI, please [report](https://github.com/oracle/truffleruby/issues) it to us.
@@ -87,10 +87,6 @@ more explanation on this.
8787

8888
`RubyVM` is not intended for users and is not implemented.
8989

90-
#### RDoc HTML generation
91-
92-
TruffleRuby does not include the Darkfish theme for RDoc.
93-
9490
## Features with major differences
9591

9692
#### Threads run in parallel

doc/user/security.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ https://www.ruby-lang.org/en/security/.
3737

3838
Number | Description | Their Mitigation | Test | Our Mitigation
3939
--- | --- | --- | --- | ---
40+
CVE-2019-16255 | A code injection vulnerability of Shell#[] and Shell#test | [Fix](https://github.com/ruby/ruby/commit/d6adc68dc9c74a33b3ca012af171e2d59f0dea10) | MRI test | Same
41+
CVE-2019-16254 | HTTP response splitting in WEBrick (Additional fix) | [Fix](https://github.com/ruby/ruby/commit/3ce238b5f9795581eb84114dcfbdf4aa086bfecc) | MRI test | Same
42+
CVE-2019-15845 | A NUL injection vulnerability of File.fnmatch and File.fnmatch? | [Fix](https://github.com/ruby/ruby/commit/a0a2640b398cffd351f87d3f6243103add66575b) | MRI test | Check for NUL bytes
43+
CVE-2019-16201 | Regular Expression Denial of Service vulnerability of WEBrick’s Digest access authentication | [Fix](https://github.com/ruby/ruby/commit/36e057e26ef2104bc2349799d6c52d22bb1c7d03) | MRI test | Same
44+
CVE-2012-6708 | Multiple jQuery vulnerabilities in RDoc | Remove jquery.js | N/A | Same
45+
CVE-2015-9251 | Multiple jQuery vulnerabilities in RDoc | Remove jquery.js | N/A | Same
4046
CVE-2019-8320 | Delete directory using symlink when decompressing `tar` | Check the expanded path | Tested in MRI `test/rubygems/test_gem_package.rb` | Applied the same patch
4147
CVE-2019-8321 | Escape sequence injection in `verbose` | Sanitise message | Tested in `ruby/spec` `:security` | Applied the same patch
4248
CVE-2019-8322 | Escape sequence injection in `gem owner` | Sanitise message | Tested in `ruby/spec` `:security` | Applied the same patch

lib/cext/include/ruby/ruby.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,7 +1775,7 @@ VALUE rb_check_symbol(volatile VALUE *namep);
17751775
#define RUBY_CONST_ID_CACHE(result, str) \
17761776
{ \
17771777
static ID rb_intern_id_cache; \
1778-
if (!rb_intern_id_cache) \
1778+
if (!polyglot_is_value(rb_intern_id_cache)) \
17791779
rb_intern_id_cache = rb_intern2((str), (long)strlen(str)); \
17801780
result rb_intern_id_cache; \
17811781
}

0 commit comments

Comments
 (0)