NEWS for Ruby 1.9.3¶ ↑
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 1.9.2 release¶ ↑
License¶ ↑
-
Ruby's License is changed from a dual license with GPLv2 to a dual license with 2-clause BSDL.
Known platform dependent issues¶ ↑
OS X Lion¶ ↑
-
You have to configure ruby with '–with-gcc=gcc-4.2' if you're using Xcode 4.1, or, if you're using Xcode 4.2, you have to configure ruby with '–with-gcc=clang'.
C API updates¶ ↑
-
rb_scan_args() is enhanced with support for option hash argument extraction.
-
ruby_vm_at_exit() added. This enables extension libs to hook a VM termination.
-
rb_reserved_fd_p() added. If you want to close all file descriptors, check using this API. [ruby-core:37759]
Library updates (outstanding ones only)¶ ↑
-
builtin classes
-
-
extended method:
-
Array#pack
supports endian modifiers
-
-
-
Bignum
-
Multiplication algorithm for Bignums with a large number of digits over 150 BDIGITs is changed in order to reduce its calculation time. Now such large Bignums are multiplied by using Toom-3 algorithm.
-
-
-
new encodings:
-
CP950
-
CP951
-
UTF-16
-
UTF-32
-
-
change alias:
-
SJIS is Windows-31J
-
-
-
-
new constant:
-
File::NULL name of NULL device.
-
File::DIRECT name of O_DIRECT.
-
-
-
-
move #__id__ to
BasicObject
. -
extended method:
-
Kernel#rand
supports range argument
-
-
-
-
new methods:
-
-
-
extended method:
-
Random.rand
supports range argument
-
-
-
-
extended method:
-
String#unpack
supports endian modifiers
-
-
new method:
-
-
-
extended method:
-
Time#strftime
supports %:z and %::z.
-
-
-
-
Process#maxgroups and Process#maxgroups= now raise
NotImplementedError
if the platform don't support supplementary groups concept.
-
-
bigdecimal
-
BigDecimal#power
andBigDecimal#*
* support non-integral exponent. -
Kernel
.BigDecimal andBigDecimal.new
now accept instances ofInteger
,Rational
,Float
, andBigDecimal
. If you pass aRational
or aFloat
to them, you must specify the precision to produce the digits of aBigDecimal
. -
The behavior of
BigDecimal#coerce
with aRational
is changed. It uses the precision of the receiverBigDecimal
to produce the digits of aBigDecimal
from the givenRational
.
-
-
bigdecimal/util
-
BigDecimal#to_d
andInteger#to_d
are added. -
Float#to_d
accepts a precision. -
Rational#to_d
raisesArgumentError
when passing zero or negative precision. -
-
Zero and an implicit precision is deprecated. This feature is removed at the next release of bigdecimal.
-
A negative precision isn't supported. Be careful it is an incompatible change.
-
-
-
date
-
Accepts flonum explicitly with limitations.
-
If the given offset is flonum,
DateTime
assumes its precision is at most second.DateTime.new
(2001,2,3,0,0,0,3.0/24) ==DateTime.new
(2001,2,3,0,0,0,'+03:00')#=> true
-
If the given operand for -/+ is flonum,
DateTime
assumes its precision is at most nanosecond.DateTime.new
(2001,2,3) + 0.5 ==DateTime.new
(2001,2,3,12)#=> true
-
Precision of offset is always at most second.
Rational('0.5') == Rational('0.500001') #=> false
DateTime.new
(2001,2,3,0,0,0,Rational('0.5')) ==DateTime.new
(2001,2,3,0,0,0,Rational('0.500001'))#=> true
-
-
Ignores long offset and far reform day (with warning).
-
Now accepts only:
-1<=offset<=1 (-24:00..+24:00) 2298874<=start<=2426355 or -/+oo
(proleptic Gregorian/Julian mean -/+oo)
-
-
A method strftime cannot produce huge output (same as Time's one).
-
Even though Date/DateTime can handle far dates, the following causes an exception.
DateTime.new(1<<10000)
.strftime('%Y') # Errno::ERANGE
-
-
Changed the format of inspect.
-
Changed the format of marshal (but, can load old dumps).
-
-
io/console
-
json
-
updated to v1.5.4.
-
-
matrix
-
new classes:
-
new methods:
-
Vector#magnitude
, norm
-
extended methods:
-
Matrix#each
and each_with_index can iterate on a subset of the elements -
Matrix#find_index
returns [row, column] and can iterate on a subset of the elements -
Matrix#*
* implementsNumeric
exponents (using the eigensystem) -
Matrix.zero
can build rectangular matrices
-
-
-
minitest
-
Minitest has been updated to version 2.2.2.
-
For full details, see github.com/seattlerb/minitest/blob/master/History.txt
-
-
net/http
-
SNI (Server Name Indication) supported for HTTPS.
-
Allow to configure to wait server returning '100 continue' response before sending HTTP request body.
Set
Net::HTTP#continue_timeout
AND pass 'expect' => '100-continue' to a extra HTTP header.For example, the following code sends HTTP header and waits for getting '100 continue' response before sending HTTP request body. When 0.5 [sec] timeout occurs or the server send '100 continue', the client sends HTTP request body.
http.continue_timeout = 0.5 http.request_post('/continue', 'body=BODY', 'expect' => '100-continue')
-
new method:
-
Net::HTTPRequest#set_form
): Added to support both application/x-www-form-urlencoded and multipart/form-data.
-
-
-
objspace
-
new method:
-
-
openssl
-
PKey::RSA and PKey::DSA now use the generic X.509 encoding scheme (e.g. used in a X.509 certificate's Subject Public Key Info) when exporting public keys to DER or PEM. Backward compatibility is ensured by (already existing) fallbacks during creation.
-
OpenSSL::ASN1::Constructive#new and OpenSSL::ASN1::Primitive#new (and the constructors of their sub-classes) will no longer force tagging to be set to :EXPLICIT when tag and/or tag_class are passed as parameters. tagging must be set explicitly.
-
Support for infinite length encodings via infinite_length attribute.
-
OpenSSL::PKey.read
( file | string [, pwd] ) allows to read arbitrary public/private keys in DER-/PEM-encoded form with an optional password for encrypted PEM encodings. -
Add new method
OpenSSL::X509::Name#hash_old
as a wrapper of X509_NAME_hash_old() defined fromOpenSSL
1.0.0. It returnsOpenSSL
0.9.8 compatible hash value.
-
-
optparse
-
support for bash/zsh completion.
-
-
Rake
-
Rake has been upgraded from 0.8.7 to 0.9.2.2. For full release notes see github.com/jimweirich/rake/blob/master/CHANGES
-
-
-
RDoc
has been upgraded to version 3.9.4. For full release notes see docs.seattlerb.org/rdoc/History_txt.html
-
-
rexml
-
Support Ruby native encoding mechanism and iconv dependency is dropped.
-
-
RubyGems
-
RubyGems has been upgraded to version 1.8.10. For full release notes see rubygems.rubyforge.org/rubygems-update/History_txt.html
-
-
stringio
-
extended method:
-
StringIO#set_encoding
can get 2nd argument and optional hash.
-
-
-
test/unit
-
New arguments:
-
-j N, –jobs=N: Allow run N testcases at once.
-
–jobs-status: Show status of jobs when parallel running.
-
–no-retry: Don't retry testcases which failed when parallel running.
-
–ruby=RUBY: path to ruby for job(worker) process. optional.
-
–hide-skip: Hide skip messages. You'll see the number of skips at end of test result.
-
-
-
uri
-
new methods:
-
-
webrick
-
new method:
-
WEBrick::HTTPRequest#continue for generating '100 continue' response.
-
-
new logging directive:
-
%{remote}p for remote (client) port number.
-
-
-
yaml
-
The default YAML engine is now
Psych
. You may downgrade to syck by setting YAML::ENGINE.yamler = 'syck'.
-
-
zlib
-
new methods:
-
-
-
extended method:
-
FileUtils#chmod
supports symbolic mode argument.
-
-
Language changes¶ ↑
-
Regexps now support Unicode 6.0. (new characters and scripts)
- experimental
-
Regexps now support Age property.
Unlike Perl, current implementation takes interpretation of the interpretation of UTS #18. www.unicode.org/reports/tr18/
-
Turning on/off indentation warnings with directives. (“# -*- warn-indent: true -*-” / “# -*- warn-indent: false -*-”)
Compatibility issues (excluding feature bug fixes)¶ ↑
* Rational#to_d See above.