summaryrefslogtreecommitdiff
path: root/jni/ruby/NEWS
blob: b4ef080249e5d9415ba65e93d0fbee5cbfd72442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
# -*- rdoc -*-

= NEWS for Ruby 2.2.0

This document is a list of user visible feature changes made between
releases except for bug fixes.

Note that each entry is kept so brief that no reason behind or
reference information is supplied with.  For a full list of changes
with all sufficient information, see the ChangeLog file.

== Changes since the 2.1.0 release

=== Language changes

* nil/true/false
  * nil/true/false objects are frozen. [Feature #8923]

* Hash literal
  * Symbol key followed by a colon can be quoted. [Feature #4276]

* default argument
  fixed a very longstanding bug that an optional argument was not
  accessible in its default value expression.  [Bug #9593]

=== Core classes updates (outstanding ones only)

* Binding
  * New methods:
    * Binding#local_variables
    * Binding#receiver

* Dir
  * New methods:
    * Dir#fileno

* Enumerable
  * New methods:
    * Enumerable#slice_after
    * Enumerable#slice_when
  * Extended methods:
    * min, min_by, max and max_by supports optional argument to return
      multiple elements.

* Float
  * New methods:
    * Float#next_float
    * Float#prev_float

* File
  * New methods:
    * File.birthtime
    * File#birthtime

* File::Stat
  * New methods:
    * File::Stat#birthtime

* GC
  * GC.latest_gc_info returns :state to represent current GC status.
  * Improvements
    * Introduce incremental marking for major GC. [Feature #10137]

* IO
  * Improvements
    * IO#nonblock_read and IO#nonblock_write for pipes on Windows are supported.

* Kernel
  * New methods:
    * Kernel#itself
  * Improvements
    * Kernel#throw raises UncaughtThrowError, subclass of ArgumentError when
      there is no corresponding catch block, instead of ArgumentError.

* Process
  * Extended method:
    * Process execution methods such as Process.spawn opens the file in write
      mode for redirect from [:out, :err].

* String
  * New methods:
    * String#unicode_normalize
    * String#unicode_normalize!
    * String#unicode_normalized?

* Symbol
  * Improvements
    * Most symbols which are returned by String#to_sym and
      String#intern are GC-able.

* Method
  * New methods:
    * Method#curry([arity]) returns a curried Proc.
    * Method#super_method returns a Method of superclass, which would be called
      when super is used.

=== Core classes compatibility issues (excluding feature bug fixes)

* Enumerable
  * Enumerable#slice_before's state management deprecated.
  * Enumerable#chunk's state management deprecated.

* GC
  * incompatible changes:
    * Rename GC.stat entries. [Feature #9924]
      See https://docs.google.com/spreadsheets/d/11Ua4uBr6o0k-nORrZLEIIUkHJ9JRzRR0NyZfrhEEnc8/edit?usp=sharing

* IO
  * incompatible changes:
    * When flushing file IO with IO#flush, you cannot assume that the metadata
      of the file is updated immediately.  On some platforms (especially
      Windows), it is delayed until the filesystem load is decreased.
      Use IO#fsync if you want to guarantee updating metadata.

* Math
  * incompatible changes:
    * Math.log now raises Math::DomainError instead of returning NaN if the
      base is less than 0, and returns NaN instead of -infinity if both of
      two arguments are 0.
    * Math.atan2 now returns values like as expected by C99 if both two
      arguments are infinity.

* Proc
  * incompatible changes:
    * ArgumentError is no longer raised when lambda Proc is passed as a
      block, and the number of yielded arguments does not match the formal
      arguments of the lambda, if just an array is yielded and its length
      matches.

* Process
  * Process execution methods such as Process.spawn opens the file in write
    mode for redirect from [:out, :err].
    Before Ruby 2.2, it was opened in read mode.

=== Stdlib updates (outstanding ones only)

* Continuation
  * callcc is obsolete. use Fiber instead.

* Digest

  * Digest() should now be thread-safe.  If you have a problem with
    regard to on-demand loading under a multi-threaded environment,
    preload "digest/*" modules on boot or use this method instead of
    directly referencing Digest::*.
  * Digest::HMAC has been removed just as previously noticed.

* DL
  * DL has been removed from stdlib. Please use Fiddle instead!

* Etc
  * New methods:
    * Etc.uname
    * Etc.sysconf
    * Etc.confstr
    * IO#pathconf
    * Etc.nprocessors

* Find, Pathname
  * Extended methods:
    * find method accepts "ignore_error" keyword argument.

* Matrix
  * New methods:
    * Matrix#first_minor(row, column) returns the submatrix obtained
      by deleting the specified row and column.
    * Matrix#cofactor(row, column) returns the (row, column) cofactor
      which is obtained by multiplying the first minor by (-1)**(row + column).
    * Matrix#adjugate returns the adjugate of the matrix.
    * hstack and vstack are new instance and class methods to stack matrices
      horizontally and vertically.
    * Matrix#laplace_expansion(row_or_column: num) returns the laplace_expansion
      along the +num+ -th row or column.
    * Vector.basis(size:, index:) returns the specified basis vector.
    * Unary - and + added for Vector and Matrix.
    * Vector#cross_product generalized to arbitrary dimensions.
    * Vector#dot and #cross are aliases for #inner_product and #cross_product.
    * Vector#angle_with returns the angle with its argument
    * New instance and class method independent? to test linear independence.

* Pathname
  * Pathname#/ is aliased to Pathname#+.
  * New methods:
    * Pathname#birthtime

* Rake
  * Updated to Rake 10.4.0.  For full release notes see:

    http://docs.seattlerb.org/rake/History_rdoc.html#label-10.4.0

* RubyGems
  * Updated to RubyGems 2.4.2.  For full release notes see:

    http://docs.seattlerb.org/rubygems/History_txt.html#label-2.4.2+%2F+2014-10-01

* TSort
  * TSort.tsort_each, TSort.each_strongly_connected_component and
    TSort.each_strongly_connected_component_from returns an enumerator if
    no block given.

* XMLRPC
  * Added new parser class named LibXMLStreamParser.

=== Stdlib compatibility issues (excluding feature bug fixes)

* lib/mathn.rb
  * Show deprecated warning [Feature #10169]

* ext/date/lib/date/format.rb
  * Removed because it's empty file.

* Digest
  * Digest::HMAC has finally ceased to exist.  Use OpenSSL::HMAC or an external gem instead.

* time.rb
  * Time.parse, Time.strptime, Time.rfc2822, Time.xmlschema may produce
    fixed-offset Time objects.
    It is happen when usual localtime doesn't preserve the offset from UTC.
  * Time.httpdate produces always UTC Time object.
  * Time.strptime raises ArgumentError when no date information.

* lib/rational.rb
  * Removed because it is deprecated from 2009.

* lib/complex.rb
  * Removed because it is deprecated from 2009.

* lib/prettyprint.rb
  * Removed PrettyPrint#first?

* lib/minitest/*.rb
  * Removed because it conflicts to minitest 5. [Feature #9711]

* lib/test/**/*.rb
  * Removed because it conflicts to minitest 5, and it was just an wrapper
    of minitest 4. [Feature #9711]

* lib/uri
  * support RFC 3986. [Feature #2542]

* GServer
  * GServer is extracted to gserver gem. It's unmaintain code.

* Logger
  * Logger::Application is extracted to logger-application gem. It's unmaintain code.

* ObjectSpace (after requiring "objspace")
  * ObjectSpace.memsize_of(obj) returns a size includes sizeof(RVALUE).
    [Bug #8984]

* Prime
  * incompatible changes:
    * Prime.prime? now returns false for negative numbers. This method
      should not be used to know the number is composite or not. [Bug #7395]

* Psych
  * Removed Psych::EngineManager [Bug #8344]

=== Built-in global variables compatibility issues

=== C API updates

* Deprecated APIs removed.  [Feature #9502]

  Check_SafeStr -> SafeStringValue
  rb_check_safe_str -> SafeStringValue
  rb_quad_pack -> rb_integer_pack
  rb_quad_unpack -> rb_integer_unpack
  rb_read_check : access struct FILE internal. no replacement.
  rb_struct_iv_get : internal function. no replacement.
  struct rb_blocking_region_buffer : internal type. no replacement.
  rb_thread_blocking_region_begin -> rb_thread_call_without_gvl family
  rb_thread_blocking_region_end -> rb_thread_call_without_gvl family
  TRAP_BEG -> rb_thread_call_without_gvl family
  TRAP_END -> rb_thread_call_without_gvl family
  rb_thread_select -> rb_thread_fd_select
  struct rb_exec_arg : internal type. no replacement.
  rb_exec : internal function. no replacement.
  rb_exec_arg_addopt : internal function. no replacement.
  rb_exec_arg_fixup : internal function. no replacement.
  rb_exec_arg_init : internal function. no replacement.
  rb_exec_err : internal function. no replacement.
  rb_fork : internal function. no replacement.
  rb_fork_err : internal function. no replacement.
  rb_proc_exec_n : internal function. no replacement.
  rb_run_exec_options : internal function. no replacement.
  rb_run_exec_options_err : internal function. no replacement.
  rb_thread_blocking_region -> rb_thread_call_without_gvl family
  rb_thread_polling -> rb_thread_wait_for
  rb_big2str0 : internal function. no replacement.
  rb_big2ulong_pack -> rb_integer_pack
  rb_gc_set_params : internal function. no replacement.
  rb_io_mode_flags -> rb_io_modestr_fmode
  rb_io_modenum_flags -> rb_io_oflags_fmode

* struct RBignum is hidden.  [Feature #6083]
  Use rb_integer_pack and rb_integer_unpack instead.

* struct RRational is hidden.  [Feature #9513]
  Use rb_rational_num and rb_rational_den instead.

* rb_big_new and rb_big_resize takes a size_t instead of long.

* rb_num2long returns a long instead of SIGNED_VALUE.

* rb_num2ulong returns an unsigned long instead of VALUE.

* st hash table uses power-of-two sizes for speed [Feature #9425].
  Lookups are 10-25% faster if using appropriate hash functions.
  However, weaknesses in hash distribution can no longer be masked
  by prime number-sized tables, so extensions may need to tweak
  hash functions to ensure good distribution.

* rb_sym2str() added. This is almost same as `rb_id2str(SYM2ID(sym))`
  but not pinning a dynamic symbol.

* rb_str_cat_cstr() added. This is same as `rb_str_cat2()`.

* `rb_str_substr()` and `rb_str_subseq()` will share middle of a string,
  but not only the end of a string, in the future.  Therefore, result
  strings may not be NUL-terminated, `StringValueCStr()` is needed
  calling to obtain a NUL-terminated C string.

* rb_tracepoint_new() supports new internal events accessible only from C:
  * RUBY_INTERNAL_EVENT_GC_ENTER
  * RUBY_INTERNAL_EVENT_GC_EXIT
    r47528

* rb_hash_delete() now does not call the block given to the current method.

* rb_extract_keywords() and rb_get_kwargs() exported.  See README.EXT
  for details.

=== Build system updates

* jemalloc is optionally supported via `./configure --with-jemalloc`
  jemalloc may be suitable when system malloc is slow or prone
  to fragmentation.  [Feature #9113]

=== Implementation changes

* GC
    * Most symbols which are returned by String#to_sym and
      String#intern are GC-able [Feature #9634]
    * Introduce incremental marking for major GC. [Feature #10137]
    * Enable lazy sweep on GC caused by malloc().

* VM
    * Use frozen string literals for Hash#[] and Hash#[]=
    * Fast keyword arguments passing [Feature #10440]
    * Allow to receive huge splatted array by a rest argument
      [Feature #10440]

* Process
    * Process creation methods, such as spawn(), uses vfork() system call.
      vfork() is faster than fork() when the parent process uses huge memory.