1# -*- rdoc -*-
2= NEWS for Ruby 1.9.2
3
4This document is a list of user visible feature changes made between
5releases except for bug fixes.
6
7Note that each entry is kept so brief that no reason behind or
8reference information is supplied with.  For a full list of changes
9with all sufficient information, see the ChangeLog file.
10
11== Changes since the 1.9.1 release
12=== Library updates (outstanding ones only)
13
14* builtin classes
15
16  * Array
17    * new methods:
18      * Array#keep_if
19      * Array#repeated_combination
20      * Array#repeated_permutation
21      * Array#rotate
22      * Array#rotate!
23      * Array#select!
24      * Array#sort_by!
25
26    * extended method:
27      * Array#{uniq,uniq!,product} can take a block.
28
29  * Complex
30    * new method:
31      * Complex#rationalize
32
33  * Dir
34    * new method:
35      * Dir.home
36
37  * Encoding
38    * new encodings:
39      * Big5
40      * Big5-UAO
41      * ISO-2022-JP-KDDI
42      * SJIS-DoCoMo
43      * SJIS-KDDI
44      * SJIS-SoftBank
45      * UTF8-DoCoMo
46      * UTF8-KDDI
47      * UTF8-SoftBank
48
49    * new method:
50      * ascii_compatible?
51
52  * Enumerable
53    * new methods:
54      * Enumerable#chunk
55      * Enumerable#collect_concat
56      * Enumerable#each_entry
57      * Enumerable#flat_map
58      * Enumerable#slice_before
59
60  * Enumerator
61    * new methods:
62      * Enumerator#peek
63      * Enumerator#next_values
64      * Enumerator#peek_values
65      * Enumerator#feed
66      * StopIteration#result
67
68    * extended method:
69      * #with_index accepts an optional argument that specifies the
70        index number to start with, defaulted to 0.
71
72    * incompatible changes:
73      * #rewind now calls the "rewind" method of the enclosed object
74        if defined.
75      * #next doesn't clear the position at end.
76
77  * ENV
78    * Uses locale's encoding
79    * ENV.[]= raises Errno::{EINVAL,ENOMEM} etc. on failure.
80    * new methods:
81      * ENV.keep_if
82      * ENV.select!
83
84  * Float
85    * new constants:
86      * Float::INFINITY
87      * Float::NAN
88    * new method:
89      * Float#rationalize
90
91  * File
92    * new methods:
93      * File.realpath
94      * File.realdirpath
95
96  * GC::Profiler
97    * new method:
98      * GC::Profiler.total_time
99
100  * Hash
101    * new methods:
102      * Hash#keep_if
103      * Hash#select!
104
105  * IO
106    * new methods:
107      * IO#autoclose=
108      * IO#autoclose?
109      * IO#fdatasync
110      * IO#codepoints
111      * IO#each_codepoint
112
113    * extended method:
114      * IO.pipe can take a block.
115
116    * new modules:
117      * IO::WaitReadable
118      * IO::WaitWritable
119        They are used to extend non-blocking exceptions.
120
121  * Integer
122    * new method:
123      * Integer#rationalize
124
125  * Kernel
126    * new methods:
127      * Kernel#respond_to_missing?
128      * Kernel#singleton_class
129      * Kernel#require_relative
130
131    * extended method:
132      * Kernel#respond_to? can be used to detect methods not implemented.
133        For example, Process.respond_to?(:fork) returns false on Windows.
134
135    * incompatible changes:
136      * Kernel#instance_eval yields the receiver.
137
138      * Kernel#exec
139      * Kernel#spawn
140      * Kernel#system
141      * Kernel#` (`...`)
142        ..etc.
143
144        On Windows, the current directory is no longer implicitly
145        prepended to the default command search path, just like other
146        platforms.
147
148  * MatchData
149    * new method:
150      * MatchData#==
151
152  * Method
153    * new method:
154      * Method#parameters
155
156  * NilClass
157    * new method:
158      * NilClass#rationalize
159
160  * Object
161    * extended methods:
162      * Float() supports hexadecimal floating point format.
163      * printf() supports %a/%A format.
164
165  * Proc
166    * new method:
167      * Proc#parameters
168    * extended method:
169      * Proc#source_location returns location even if receiver is a method
170        defined by attr_reader / attr_writer / attr_accessor.
171
172  * Process
173    * extended method:
174      * Process.spawn accepts [:child, FD] for a redirect target.
175
176  * Random (new class to generate pseudo-random numbers)
177
178  * Rational
179    * new method:
180      * Rational#rationalize
181
182  * String
183    * extended methods:
184      * string[regexp, name] is supported for named capture.
185
186  * Thread
187    * new methods:
188      * Thread#add_trace_func
189      * Thread#set_trace_func
190
191  * Time
192    * extended features:
193      * time_t restriction is removed to represent before 1901 and after 2038.
194        Proleptic Gregorian calendar is used for old dates.
195      * Time.new have optional arguments to specify date with time offset.
196      * Time#getlocal, Time#localtime have optional time offset argument.
197
198    * new methods:
199      * Time#to_r
200      * Time#subsec
201      * Time#round
202
203    * incompatible change:
204      * The year argument of Time.{utc,gm,local,mktime} is now interpreted as
205        the value itself.  For example, Time.utc(99) means the year 99 AD,
206        not 1999 AD.
207
208  * UnboundMethod
209    * new method:
210      * UnboundMethod#parameters
211
212
213* digest
214  * new methods:
215    * Digest::Class.base64digest
216    * Digest::Instance#base64digest
217    * Digest::Instance#base64digest!
218
219  * Digest::HMAC (digest/hmac) has been marked as deprecated because
220    it was unintentional for the experimental library to be included
221    in the final release of 1.9.1.  Please use OpenSSL::HMAC instead.
222
223* rss
224
225  * 0.2.4 -> 0.2.7.
226
227  * RSS::Maker.make
228    * raise an exception not returns nil for invalid feed making.
229    * requires block.
230
231  * RSS::Maker.[]
232    * new method to return maker class.
233
234  * RSS::Maker.supported?(version)
235    * new method to check whether given version is supported.
236
237  * RSS::Maker: item.guid.permanent_link?
238    * new alias of item.guid.isPermaLink
239  * RSS::Maker: item.guid.permanent_link=
240    * new alias of item.guid.isPermaLink=
241
242* DL
243  * Now uses libffi as a backend if avaiable.
244    It means DL works fine on more platforms.
245
246* Fiddle
247  * A lightweight wrapper for libffi.
248
249* YAML
250  * Now uses libyaml as a backend if available.
251    It means YAML library supports new standards for YAML.
252
253* Psych
254  * A wrapper for libyaml.
255
256* JSON
257  * Update to JSON 1.1.9
258
259* REXML
260
261  * REXML::Document.entity_expansion_limit=
262
263    New method to set the entity expansion limit. By default the limit is
264    set to 10000.  See the following URL for details.
265
266    http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/
267
268* RDoc
269
270  * Updated to RDoc 2.5.8
271
272* RubyGems
273
274  * Updated to RubyGems 1.3.7
275
276* logger
277
278  * imported upstream version (logger/1.2.7)
279    * do not raise an exception even if log writing failed.
280    * do not raise ShiftingError if an aged file already exists.
281      (no ShiftingError will be raised from 1.2.7, just warn() instead)
282
283* matrix
284  * API change to adhere strictly to mathematical definitions:
285    * Matrices must now be rectangular.
286    * trace, regular?, singular? are defined only for square matrices
287    * support for empty matrices
288    * all integer matrices now have the right determinant (also an integer)
289
290  * Matrix and Vector include Enumerable.
291
292  * new methods:
293    * Matrix.build
294    * Matrix.empty
295    * Matrix#conj
296    * Matrix#conjugate
297    * Matrix#each
298    * Matrix#each_with_index
299    * Matrix#empty?
300    * Matrix#imag
301    * Matrix#imaginary
302    * Matrix#real
303    * Matrix#real?
304    * Matrix#rect
305    * Matrix#rectangular
306
307* net/http
308  * merged net/https.
309
310* open3
311  * new methods:
312    * Open3.popen2
313    * Open3.popen2e
314    * Open3.capture3
315    * Open3.capture2
316    * Open3.capture2e
317    * Open3.pipeline_rw
318    * Open3.pipeline_r
319    * Open3.pipeline_w
320    * Open3.pipeline_start
321    * Open3.pipeline
322
323* pty
324  * new methods:
325    * PTY.open
326    * PTY.check
327  * deprecated methods:
328    * protect_signal
329    * reset_signal
330
331* openssl
332  * new methods:
333    * OpenSSL::Buffering#read_nonblock
334    * OpenSSL::Buffering#write_nonblock
335    * OpenSSL::SSL::SSLSocket#connect_nonblock
336    * OpenSSL::SSL::SSLSocket#accept_nonblock
337
338* scanf
339  * support %a/%A format.
340
341
342* socket
343
344  * incompatible changes:
345    * Socket#{recvfrom,recvfrom_nonblock,accept,accept_nonblock,sysaccept}
346      returns a sender address as Addrinfo object instead of a binary sockaddr string.
347      Addrinfo#to_s returns the old binary sockaddr string.
348    * BasicSocket#getsockopt returns Socket::Option object instead of a binary string.
349      Socket::Option#to_s returns the old binary string.
350    * Socket.do_not_reverse_lookup is turned on by default now.
351
352  * new class:
353    * Addrinfo
354    * Socket::Option
355    * Socket::AncillaryData
356
357  * new methods:
358    * Socket.ip_address_list
359    * Socket.tcp
360    * Socket.tcp_server_loop
361    * Socket.tcp_server_sockets
362    * Socket.udp_server_sockets
363    * Socket.udp_server_loop_on
364    * Socket.udp_server_loop
365    * Socket.unix
366    * Socket.unix_server_loop
367    * Socket.unix_server_socket
368    * Socket.accept_loop
369    * Socket#ipv6only!
370    * BasicSocket#local_address
371    * BasicSocket#remote_address
372    * BasicSocket#connect_address
373    * BasicSocket#sendmsg
374    * BasicSocket#sendmsg_nonblock
375    * BasicSocket#recvmsg
376    * BasicSocket#recvmsg_nonblock
377    * BasicSocket#getpeereid
378
379  * extended methods:
380    * Socket.new's 3rd argument is optional now.
381    * Socket.pair's 3rd argument is optional now.
382    * Socket.pair and UNIXSocket.pair can take a block.
383    * BasicSocket#send, UDPSocket#send, Socket.getnameinfo, Socket#bind, and
384      Socket#{connect,connect_nonblock} accepts an Addrinfo object as sockaddr.
385    * BasicSocket#getsockopt accepts a Socket::Option object.
386    * Socket.getaddrinfo and IPSocket#{addr,peeraddr} accept an optional
387      argument to turn reverse lookup on/off.
388
389    * constant names can be accepted as well as constant values.
390      i.e. Socket.new(:PF_INET, :SOCK_STREAM, 0)
391      The constant names can be specified without the prefix.
392      i.e. Socket.new(:INET, :STREAM, 0)
393      * protocol/address family
394      * socket type
395      * socket option protocol level
396      * socket option name
397      * shutdown's argument
398
399* stringio
400  * new methods:
401    * StringIO#read_nonblock
402    * StringIO#write_nonblock
403* pathname
404  * new methods:
405    * Pathname#binread
406    * Pathname#realdirpath
407    * Pathname#each_child
408
409  * extended methods:
410    * Pathname#realpath and Pathname#realdirpath takes optional basedir
411      argument.
412
413* Readline
414  * new methods:
415    * Readline.set_screen_size
416    * Readline.get_screen_size
417
418  * extended methods:
419    * Readline.completion_proc= accepts nil.
420      nil means to use default completion proc.
421
422* set
423  * new methods:
424    * Set#keep_if
425    * Set#select!
426
427* time
428  * incompatible changes:
429    * Time.parse raises ArgumentError when no date information.
430
431* thread
432  * extended method:
433    * ConditionVariable#wait takes timeout argument.
434
435* securerandom
436  * new methods:
437    * SecureRandom.urlsafe_base64
438
439* URI
440  * new methods:
441    * URI.encode_www_form
442    * URI.decode_www_form
443    * URI.encode_www_form_component
444    * URI.decode_www_form_component
445  * Obsoleted methods:
446    * URI.decode
447    * URI.encode
448    * URI.escape
449    * URI.unescape
450
451* etc
452  * new methods:
453    * Etc::Passwd.each
454    * Etc::Group.each
455
456* zlib
457  * new methods:
458    * Zlib::GzipFile#path
459    * Zlib.#adler32_combine
460    * Zlib.#crc32_combine
461
462* rbconfig
463  * new methods:
464    * RbConfig.ruby
465
466=== Language changes
467
468* Regexp properties (\p{}) names now ignore underscores, spaces, and case, so
469  \p{ol chiki} is the same as \p{Ol_Chiki}
470* Regexps now support Unicode 5.2 (new characters and scripts)
471* \d, \s, and \w are now ASCII only; use POSIX bracket classes and \p{} for
472  Unicode semantics
473* $: no longer includes the current directory, use require_relative
474* Symbol with an invalid encoding is forbidden to exist.
475
476=== Compilation options
477
478* --program-prefix and --program-suffix no longer act on the shared object
479  names nor paths to libraries.
480
481  use --with-rubylibprefix='${libruby}/${RUBY_INSTALL_NAME}' and
482  --with-soname='${RUBY_INSTALL_NAME}' for the same result as Ruby 1.9.1.
483
484* --with-arch is added for universal binary, instead of
485  --enable-fat-binary option.
486
487=== Compatibility issues (excluding feature bug fixes)
488
489  * Enumerator#rewind
490  * Socket#recvfrom
491  * Socket#recvfrom_nonblock
492  * Socket#accept
493  * Socket#accept_nonblock
494  * Socket#sysaccept
495  * BasicSocket#getsockopt
496  * Time.utc
497  * Time.gm
498  * Time.local
499  * Time.mktime
500  * Time.parse
501  * --program-prefix and --program-suffix
502  * --enable-fat-binary
503  * $:
504
505    See above.
506
507  * Digest::HMAC
508
509    Deprecated.  See above.
510