Skip to content

Commit 78e987a

Browse files
committed
Merge branch 'master' into release/graal-vm/1.0
2 parents a134cac + 13bd0c4 commit 78e987a

File tree

351 files changed

+25727
-15175
lines changed

Some content is hidden

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

351 files changed

+25727
-15175
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ lib/mri/openssl.su
2929
lib/mri/zlib.su
3030
lib/mri/psych.su
3131
lib/mri/syslog.su
32+
lib/mri/nkf.su
3233
lib/mri/etc.su
3334
lib/mri/rbconfig/sizeof.su
3435
/.ext

CHANGELOG.md

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
1-
# 1.0 RC 9
1+
# 1.0 RC 10
2+
3+
New features:
4+
5+
* The `nkf` and `kconv` standard libraries were added (#1439).
6+
* `Mutex` and `ConditionVariable` have a new fast path for acquiring locks
7+
that are unlocked.
8+
* `Queue` and `SizedQueue`, `#close` and `#closed?`, have been implemented.
9+
* `Kernel#clone(freeze)` has been implemented (#1454).
10+
* `Warning.warn` has been implemented (#1470).
11+
* `Thread.report_on_exception` has been implemented (#1476).
12+
13+
Bug fixes:
14+
15+
* Added `rb_eEncodingError` for C extensions (#1437).
16+
* Fixed race condition when creating threads (#1445).
17+
* Handle `exception: false` for IO#write_nonblock (#1457).
18+
* `File.expand_path` now raises an exception for a non-absolute user-home.
19+
* `ArgumentError` messages now better match MRI (#1467).
20+
* Added support for `:float_millisecond`, `:millisecond`, and
21+
`:second` time units to `Process.clock_gettime` (#1468).
22+
* Fixed backtrace of re-raised exceptions (#1459).
23+
* Updated an exception message in Psych related to loading a non-existing
24+
class so that it now matches MRI.
25+
* Fixed a JRuby-style Java interop compatibility issue seen in `test-unit`.
26+
* Fixed problem with calling `warn` if `$stderr` has been reassigned.
27+
* Fixed definition of `RB_ENCODING_GET_INLINED` (#1440).
28+
29+
Changes:
30+
31+
* Timezone messages are now logged at `CONFIG` level, use `-Xlog=CONFIG` to
32+
debug if the timezone is incorrectly shown as `UTC`.
33+
34+
# 1.0 RC 9, 5 November 2018
235

336
Security:
437

@@ -10,7 +43,7 @@ New features:
1043

1144
* LLVM for Oracle Linux 7 can now be installed without building from source.
1245

13-
Bug fixes
46+
Bug fixes:
1447

1548
* Times can now be created with UTC offsets in `+/-HH:MM:SS` format.
1649
* `Proc#to_s` now has `ASCII-8BIT` as its encoding instead of the
@@ -34,7 +67,7 @@ Changes:
3467
* Detect when the system libssl is incompatible more accurately and
3568
add instructions on how to recompile the extension.
3669

37-
# 1.0 RC 8, October 2018
70+
# 1.0 RC 8, 19 October 2018
3871

3972
New features:
4073

@@ -52,11 +85,11 @@ Changes:
5285
* JCodings has been updated from 1.0.30 to 1.0.40.
5386
* Joni has been updated from 2.1.16 to 2.1.25.
5487

55-
Performance
88+
Performance:
5689

5790
* Performance of setting the last exception on a thread has now been improved.
5891

59-
# 1.0 RC 7, October 2018
92+
# 1.0 RC 7, 3 October 2018
6093

6194
New features:
6295

@@ -98,7 +131,7 @@ Changes:
98131
* Reimplemented exceptions and other APIs that can return a backtrace to use
99132
Truffle's lazy stacktraces API.
100133

101-
# 1.0 RC 6, September 2018
134+
# 1.0 RC 6, 3 September 2018
102135

103136
New features:
104137

@@ -177,7 +210,7 @@ Changes:
177210
* The `-Xsync.stdio` option has been removed - use standard Ruby
178211
`STDOUT.sync = true` in your program instead.
179212

180-
# 1.0 RC 5, August 2018
213+
# 1.0 RC 5, 3 August 2018
181214

182215
New features:
183216

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ There are three ways to install TruffleRuby:
2424
as a simple binary tarball. This distribution can also be used for
2525
[testing TruffleRuby in CI](doc/user/standalone-distribution.md).
2626

27-
You can use `gem` to install Gems as normal. TruffleRuby currently requires
28-
Bundler version `1.16.x`.
27+
You can use `gem` to install Gems as normal.
2928

3029
You can also build TruffleRuby from source, see the
3130
[building instructions](doc/contributor/workflow.md), and using
32-
[Docker](doc/contributor/docker.md)
31+
[Docker](doc/contributor/docker.md).
3332

3433
## Aim
3534

@@ -45,12 +44,12 @@ TruffleRuby aims to:
4544

4645
## TruffleRuby configurations
4746

48-
There are two main configurations of TruffleRuby - *native* and *JVM*. It's
47+
There are two main configurations of TruffleRuby: *native* and *JVM*. It's
4948
important to understand the different configurations of TruffleRuby, as each has
5049
different capabilities and performance characteristics. You should pick the
5150
execution mode that is appropriate for your application.
5251

53-
When distributed as part of GraalVM, TruffleRuby by default runs in the *native*
52+
TruffleRuby by default runs in the *native*
5453
configuration. In this configuration, TruffleRuby is ahead-of-time compiled to a
5554
standalone native executable. This means that you don't need a JVM installed on
5655
your system to use it. The advantage of the native configuration is that it
@@ -78,7 +77,7 @@ highest possible performance you probably want the *JVM* configuration, by using
7877
`--jvm`.
7978

8079
At runtime you can tell if you are using the native configuration using
81-
`TruffleRuby.native?`
80+
`TruffleRuby.native?`.
8281

8382
You won't encounter it when using TruffleRuby from the GraalVM, but there is
8483
also another configuration which is TruffleRuby running on the JVM but with the
@@ -128,7 +127,7 @@ You will find that many C extensions will not work without modification.
128127
## Migration from MRI
129128

130129
TruffleRuby should in most cases work as a drop-in replacement for MRI, but you
131-
should read about out [compatibility](doc/user/compatibility.md).
130+
should read about our [compatibility](doc/user/compatibility.md).
132131

133132
## Migration from JRuby
134133

ci.jsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ local part_definitions = {
289289
downloads+: {
290290
JAVA_HOME: {
291291
name: "labsjdk",
292-
version: "8u172-jvmci-0.48",
292+
version: "8u192-jvmci-0.52",
293293
platformspecific: true,
294294
},
295295
},
@@ -303,7 +303,7 @@ local part_definitions = {
303303
downloads+: {
304304
JAVA_HOME: {
305305
name: "openjdk",
306-
version: "8u172-jvmci-0.48",
306+
version: "8u192-jvmci-0.52",
307307
platformspecific: true,
308308
},
309309
},
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# Assumptions Third Party Code Makes About TruffleRuby
22

3-
When third-party code starts to make assumptions about the way TruffleRuby does
4-
something, such as a `TruffleRuby` method, or the layout of our distribution, we
5-
record it here so that we know who is using it if we need to change something
6-
about it.
3+
Third-party code should never use any APIs apart from standard Ruby, and those
4+
listed in [TruffleRuby additions]('../user/truffleruby-additions.md').
5+
6+
When third-party code uses the TruffleRuby additions, it should be listed here
7+
so that we know why non-standard APIs have been added.
78

89
## TruffleRuby Extensions in Gems
910

10-
* `concurrent-ruby` <= 1.0.5 uses: `Truffle::System.full_memory_barrier`,
11-
`Truffle::Primitive.logical_processors`
12-
* `concurrent-ruby` >= 1.1.0 uses: `TruffleRuby.full_memory_barrier`,
13-
`Truffle::AtomicReference`, `Truffle::System.synchronized`
11+
* `concurrent-ruby` < 1.1.0 used `Truffle::System.full_memory_barrier`,
12+
`Truffle::Primitive.logical_processors`, `Truffle::AtomicReference`, and
13+
`Truffle::System.synchronized`. These are all still available in order to
14+
support these older versions of `concurrent-ruby`.
15+
16+
* `concurrent-ruby` >= 1.1.0 uses `TruffleRuby.full_memory_barrier`,
17+
`TruffleRuby.synchronized`, and `TruffleRuby::AtomicReference`,

doc/legal/legal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ version 2.4.4, including:
2222

2323
* the standard library in `lib/mri`,
2424
* Ruby C extension API in `lib/cext/include` and `src/main/c/cext`,
25-
* C extensions in `src/main/c/{etc,openssl,psych,rbconfig-sizeof,syslog,zlib}`
25+
* C extensions in `src/main/c/{etc,nkf,openssl,psych,rbconfig-sizeof,syslog,zlib}`
2626

2727
MRI is copyright Yukihiro Matsumoto. It is made available under the terms of the
2828
2-clause BSD licence `ruby-bsdl.txt`, or a custom licence `ruby-licence.txt`.

doc/user/compatibility.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ currently using.
8383
#### Some classes marked as internal will be different
8484

8585
MRI provides some classes that are described in the documentation as being only
86-
available on C Ruby (MRI). We implement these classes if it's practical to do
86+
available on MRI (C Ruby). We implement these classes if it's practical to do
8787
so, but this isn't always the case. For example `RubyVM` is not available.
8888

8989
## Features with subtle differences
@@ -128,6 +128,11 @@ Also, IO buffer drains, writes on IO objects with `sync` set, and
128128
`write_nonblock`, will not retry the write on `EAGAIN` and `EWOULDBLOCK`, as the
129129
streams do not provide a way to detect this.
130130

131+
#### Error messages
132+
133+
Error message strings will sometimes differ from MRI, as these are not generally
134+
covered by the Ruby Specification suite or tests.
135+
131136
## Features with very low performance
132137

133138
#### Keyword arguments

lib/cext/include/ruby/encoding.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ enum ruby_encoding_consts {
4040
#define RB_ENCODING_SET_INLINED(obj,i) RB_ENCODING_SET(obj,i)
4141
#define RB_ENCODING_SET(obj,i) rb_enc_set_index((obj), (i))
4242

43-
#define RB_ENCODING_GET_INLINED(obj) \
44-
(int)((RBASIC(obj)->flags & RUBY_ENCODING_MASK)>>RUBY_ENCODING_SHIFT)
43+
#define RB_ENCODING_GET_INLINED(obj) RB_ENCODING_GET(obj)
4544
#define RB_ENCODING_GET(obj) rb_enc_get_index(obj)
4645

4746
#define RB_ENCODING_IS_ASCII8BIT(obj) (RB_ENCODING_GET_INLINED(obj) == 0)

lib/cext/include/truffleruby/constants.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ VALUE rb_tr_get_Class(void);
99
VALUE rb_tr_get_Comparable(void);
1010
VALUE rb_tr_get_Data(void);
1111
VALUE rb_tr_get_Encoding(void);
12+
VALUE rb_tr_get_EncodingError(void);
1213
VALUE rb_tr_get_Enumerable(void);
1314
VALUE rb_tr_get_FalseClass(void);
1415
VALUE rb_tr_get_File(void);
@@ -79,6 +80,7 @@ VALUE rb_tr_get_default_rs(void);
7980
#define rb_mComparable rb_tr_get_Comparable()
8081
#define rb_cData rb_tr_get_Data()
8182
#define rb_cEncoding rb_tr_get_Encoding()
83+
#define rb_eEncodingError rb_tr_get_EncodingError()
8284
#define rb_mEnumerable rb_tr_get_Enumerable()
8385
#define rb_cFalseClass rb_tr_get_FalseClass()
8486
#define rb_cFile rb_tr_get_File()

0 commit comments

Comments
 (0)