@@ -16,75 +16,66 @@ Bug fixes:
16
16
* ` RbConfig::CONFIG['extra_bindirs'] ` is now a String as other RbConfig values.
17
17
* ` SIGPIPE ` is correctly caught on SubstrateVM, and the corresponding write()
18
18
raises ` Errno::EPIPE ` when the read end of a pipe or socket is closed.
19
+ * Use the magic encoding comment for determining the source encoding when using eval().
20
+ * Fixed a couple bugs where the encoding was not preserved correctly.
19
21
20
22
Performance:
21
23
22
24
* Faster stat()-related calls, by returning the relevant field directly and
23
25
avoiding extra allocations.
24
26
* ` rb_str_new() ` /` rb_str_new_cstr() ` are much faster by avoiding extra copying and
25
27
allocations.
28
+ * ` String#{sub,sub!} ` are faster in the common case of an empty replacement string.
29
+ * Eliminated many unnecessary memory copy operations when reading from ` IO ` with
30
+ a delimiter (e.g., ` IO#each ` ), leading to overall improved ` IO ` reading for common
31
+ use cases such as iterating through lines in a ` File ` .
32
+ * Use the byte[ ] of the given Ruby String when calling eval() directly for parsing.
26
33
27
34
# 1.0 RC 2, May 2018
28
35
29
36
New features:
30
37
31
38
* We are now compatible with Ruby 2.4.4.
32
-
33
39
* ` object.class ` on a Java ` Class ` object will give you an object on which you
34
40
can call instance methods, rather than static methods which is what you get by
35
41
default.
36
-
37
42
* The log level can now also be set with ` -Dtruffleruby.log=info ` or
38
43
` TRUFFLERUBY_LOG=info ` .
39
-
40
44
* ` -Xbacktraces.raise ` will print Ruby backtraces whenever an exception is
41
45
raised.
42
-
43
46
* ` Java.import name ` imports Java classes as top-level constants.
44
-
45
47
* Coercion of foreign numbers to Ruby numbers now works.
46
-
47
48
* ` to_s ` works on all foreign objects and calls the Java ` toString ` .
48
-
49
49
* ` to_str ` will try to ` UNBOX ` and then re-try ` to_str ` , in order to provoke
50
50
the unboxing of foreign strings.
51
51
52
52
Changes:
53
53
54
54
* The version string now mentions if you're running GraalVM Community Edition
55
55
(` GraalVM CE ` ) or GraalVM Enterprise Edition (` GraalVM EE ` ).
56
-
57
56
* The inline JavaScript functionality ` -Xinline_js ` has been removed.
58
-
59
57
* Line numbers ` < 0 ` , in the various eval methods, are now warned about, because
60
58
we don't support these at all. Line numbers ` > 1 ` are warned about (at the
61
59
fine level) but the are shimmed by adding blank lines in front to get to the
62
60
correct offset. Line numbers starting at ` 0 ` are also warned about at the fine
63
61
level and set to ` 1 ` instead.
64
-
65
62
* The ` erb ` standard library has been patched to stop using a -1 line number.
66
-
67
63
* ` -Xbacktraces.interleave_java ` now includes all the trailing Java frames.
68
-
69
64
* Objects with a ` [] ` method, except for ` Hash ` , now do not return anything
70
65
for ` KEYS ` , to avoid the impression that you could ` READ ` them. ` KEYINFO `
71
66
also returns nothing for these objects, except for ` Array ` where it returns
72
67
information on indices.
73
-
74
68
* ` String ` now returns ` false ` for ` HAS_KEYS ` .
75
-
76
69
* The supported additional functionality module has been renamed from ` Truffle `
77
70
to ` TruffleRuby ` . Anything not documented in
78
71
` doc/user/truffleruby-additions.md ` should not be used.
79
-
80
72
* Imprecise wrong gem directory detection was replaced. TruffleRuby newly marks
81
73
its gem directories with a marker file, and warns if you try to use
82
74
TruffleRuby with a gem directory which is lacking the marker.
83
75
84
76
Bug fixes:
85
77
86
78
* TruffleRuby on SubstrateVM now correctly determines the system timezone.
87
-
88
79
* ` Kernel#require_relative ` now coerces the feature argument to a path and
89
80
canonicalizes it before requiring, and it now uses the current directory as
90
81
the directory for a synthetic file name from ` #instance_eval ` .
@@ -104,28 +95,20 @@ Changes:
104
95
105
96
* ` RubyTruffleError ` has been removed and uses replaced with standard
106
97
exceptions.
107
-
108
98
* C++ libraries like ` libc++ ` are now not needed if you don't run C++
109
99
extensions. ` libc++abi ` is now never needed. Documentation updated to make it
110
100
more clear what the minimum requirements for pure Ruby, C extensions, and C++
111
101
extensions separately.
112
-
113
102
* C extensions are now built by default - ` TRUFFLERUBY_CEXT_ENABLED ` is assumed
114
103
` true ` unless set to ` false ` .
115
-
116
104
* The ` KEYS ` interop message now returns an array of Java strings, rather than
117
105
Ruby strings. ` KEYS ` on an array no longer returns indices.
118
-
119
106
* ` HAS_SIZE ` now only returns ` true ` for ` Array ` .
120
-
121
107
* A method call on a foreign object that looks like an operator (the method name
122
108
does not begin with a letter) will call ` IS_BOXED ` on the object and based on
123
109
that will possibly ` UNBOX ` and convert to Ruby.
124
-
125
110
* Now using the native version of Psych.
126
-
127
111
* The supported version of LLVM on Oracle Linux has been dropped to 3.8.
128
-
129
112
* The supported version of Fedora has been dropped to 25, and the supported
130
113
version of LLVM to 3.8, due to LLVM incompatibilities. The instructions for
131
114
installing ` libssl ` have changed to match.
@@ -135,33 +118,25 @@ Changes:
135
118
New features:
136
119
137
120
* The Ruby version has been updated to version 2.3.6.
138
-
139
121
* Context pre-initialization with TruffleRuby ` --native ` , which significantly
140
122
improves startup time and loads the ` did_you_mean ` gem ahead of time.
141
-
142
123
* The default VM is changed to SubstrateVM, where the startup is significantly
143
124
better. Use ` --jvm ` option for full JVM VM.
144
-
145
125
* The ` Truffle::Interop ` module has been replaced with a new ` Polyglot ` module
146
126
which is designed to use more idiomatic Ruby syntax rather than explicit
147
127
methods. A [ new document] ( doc/user/polyglot.md ) describes polyglot programming
148
128
at a higher level.
149
-
150
129
* The ` REMOVABLE ` , ` MODIFIABLE ` and ` INSERTABLE ` Truffle interop key info flags
151
130
have been implemented.
152
-
153
131
* ` equal? ` on foreign objects will check if the underlying objects are equal
154
132
if both are Java interop objects.
155
-
156
133
* ` delete ` on foreign objects will send ` REMOVE ` , ` size ` will send ` GET_SIZE ` ,
157
134
and ` keys ` will send ` KEYS ` . ` respond_to?(:size) ` will send ` HAS_SIZE ` ,
158
135
` respond_to?(:keys) ` will send ` HAS_KEYS ` .
159
-
160
136
* Added a new Java-interop API similar to the one in the Nashorn JavaScript
161
137
implementation, as also implemented by Graal.js. The ` Java.type ` method
162
138
returns a Java class object on which you can use normal interop methods. Needs
163
139
the ` --jvm ` flag to be used.
164
-
165
140
* Supported and tested versions of LLVM for different platforms have been more
166
141
precisely [ documented] ( doc/user/installing-llvm.md ) .
167
142
@@ -175,10 +150,8 @@ Performance:
175
150
176
151
* ` Dir.glob ` is much faster and more memory efficient in cases that can reduce
177
152
to direct filename lookups.
178
-
179
153
* ` SecureRandom ` now defers loading OpenSSL until it's needed, reducing time to
180
154
load ` SecureRandom ` .
181
-
182
155
* ` Array#dup ` and ` Array#shift ` have been made constant-time operations by
183
156
sharing the array storage and keeping a starting index.
184
157
@@ -189,7 +162,6 @@ Bug fixes:
189
162
Internal changes:
190
163
191
164
* Changes to the lexer and translator to reduce regular expression calls.
192
-
193
165
* Some JRuby sources have been updated to 9.1.13.0.
194
166
195
167
# 0.32, March 2018
@@ -216,9 +188,7 @@ Internal changes:
216
188
217
189
* The launcher is now part of the TruffleRuby repository, rather than part of
218
190
the GraalVM repository.
219
-
220
191
* ` ArrayBuilderNode ` now uses ` ArrayStrategies ` and ` ArrayMirrors ` to remove
221
192
direct knowledge of array storage.
222
-
223
193
* ` RStringPtr ` and ` RStringPtrEnd ` now report as pointers for interop purposes,
224
194
fixing several issues with ` char * ` usage in C extensions.
0 commit comments