Skip to content

Commit 9b8b857

Browse files
committed
[GR-15308] Update Ruby to 2.6.5.
PullRequest: truffleruby/1247
2 parents be5d1c4 + b79060f commit 9b8b857

File tree

242 files changed

+14503
-2634
lines changed

Some content is hidden

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

242 files changed

+14503
-2634
lines changed

.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

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: ruby
2-
rvm: 2.6.2
2+
rvm: 2.6.5
33
install:
44
- |
55
export ECLIPSE_EXE=$HOME/eclipse-cache/eclipse/eclipse

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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ New features:
44

55
* Enable and document `--coverage` option (#1840, @chrisseaton).
66
* Update the internal LLVM toolchain to LLVM 9 and reduce its download size.
7+
* Updated to Ruby 2.6.5 (#1749).
78

89
Bug fixes:
910

@@ -92,6 +93,7 @@ Compatibility:
9293
* Implemented `rb_get_alloc_func` and related functions (#1874, @XrXr).
9394
* Implemented `rb_module_new`, `rb_define_class_id`, `rb_define_module_id`, (#1876, @chrisseaton).
9495
* Implemented `ENV.slice`.
96+
* Support for the Darkfish theme for RDoc generation has been added back.
9597

9698
Performance:
9799

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/truffleruby/config_darwin.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
#define HAVE_LOCALE_H 1
3535
#define HAVE_MALLOC_MALLOC_H 1
3636
#define HAVE_PWD_H 1
37-
#define HAVE_SANITIZER_ASAN_INTERFACE_H 1
38-
#define HAVE_SANITIZER_MSAN_INTERFACE_H 1
3937
#define HAVE_STDALIGN_H 1
4038
#define HAVE_SYS_ATTR_H 1
4139
#define HAVE_SYS_FCNTL_H 1
@@ -51,8 +49,6 @@
5149
#define HAVE_TIME_H 1
5250
#define HAVE_UCONTEXT_H 1
5351
#define HAVE_UTIME_H 1
54-
#define HAVE_GMP_H 1
55-
#define HAVE_LIBGMP 1
5652
#define HAVE_TYPEOF 1
5753
#define HAVE_LONG_LONG 1
5854
#define HAVE_OFF_T 1
@@ -397,5 +393,5 @@
397393
#define RUBY_JMP_BUF sigjmp_buf
398394
#define USE_MJIT 1
399395
#define HAVE_PTHREAD_H 1
400-
#define RUBY_PLATFORM "x86_64-darwin18"
401-
#endif /* INCLUDE_RUBY_CONFIG_H */
396+
#define RUBY_PLATFORM "x86_64-darwin19"
397+
#endif /* INCLUDE_RUBY_CONFIG_H */

lib/cext/include/truffleruby/config_linux.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
#define SIZEOF_TIME_T 8
7575
#define SIZEOF_CLOCK_T 8
7676
#define PACKED_STRUCT(x) x __attribute__((packed))
77+
#define USE_UNALIGNED_MEMBER_ACCESS 1
7778
#define PRI_LL_PREFIX "ll"
7879
#define HAVE_PID_T 1
7980
#define rb_pid_t pid_t
@@ -222,6 +223,7 @@
222223
#define HAVE_CRYPT 1
223224
#define HAVE_DUP2 1
224225
#define HAVE_ERF 1
226+
#define HAVE_EXPLICIT_BZERO 1
225227
#define HAVE_FFS 1
226228
#define HAVE_FINITE 1
227229
#define HAVE_FLOCK 1
@@ -351,6 +353,7 @@
351353
#define HAVE_WAITPID 1
352354
#define HAVE_CRYPT_H 1
353355
#define HAVE_STRUCT_CRYPT_DATA_INITIALIZED 1
356+
#define HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN 1
354357
#define HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED 1
355358
#define HAVE_BUILTIN___BUILTIN_BSWAP16 1
356359
#define HAVE_BUILTIN___BUILTIN_BSWAP32 1

0 commit comments

Comments
 (0)