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

  • bigdecimal

  • bigdecimal/util

    • BigDecimal#to_d and Integer#to_d are added.

    • Float#to_d accepts a precision.

    • Rational#to_d raises ArgumentError when passing zero or negative precision.

    • Rational#to_d

      • 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.

    • 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:

      • Matrix::EigenvalueDecomposition

      • Matrix::LUPDecomposition

    • new methods:

      • Matrix#diagonal?

      • Matrix#eigen

      • Matrix#eigensystem

      • Matrix#hermitian?

      • Matrix#lower_triangular?

      • Matrix#lup

      • Matrix#lup_decomposition

      • Matrix#normal?

      • Matrix#orthogonal?

      • Matrix#permutation?

      • Matrix#round

      • Matrix#symmetric?

      • Matrix#unitary?

      • Matrix#upper_triangular?

      • Matrix#zero?

      • Vector#magnitude, norm

      • Vector#normalize

    • 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#** implements Numeric exponents (using the eigensystem)

      • Matrix.zero can build rectangular matrices

  • minitest

  • 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:

  • objspace

  • 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 from OpenSSL 1.0.0. It returns OpenSSL 0.9.8 compatible hash value.

  • optparse

    • support for bash/zsh completion.

  • Rake

  • RDoc

  • rexml

    • Support Ruby native encoding mechanism and iconv dependency is dropped.

  • RubyGems

  • stringio

  • 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

  • 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

  • FileUtils

    • 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.