1# -*- rdoc -*- 2= NEWS for Ruby 1.9.3 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.2 release 12=== License 13 14* Ruby's License is changed from a dual license with GPLv2 15 to a dual license with 2-clause BSDL. 16 17=== Known platform dependent issues 18==== OS X Lion 19 20* You have to configure ruby with '--with-gcc=gcc-4.2' if you're using 21 Xcode 4.1, or, if you're using Xcode 4.2, you have to configure ruby 22 with '--with-gcc=clang'. 23 24=== C API updates 25 26* rb_scan_args() is enhanced with support for option hash argument 27 extraction. 28 29* ruby_vm_at_exit() added. This enables extension libs to hook a VM 30 termination. 31 32* rb_reserved_fd_p() added. If you want to close all file descriptors, 33 check using this API. [ruby-core:37759] 34 35=== Library updates (outstanding ones only) 36 37* builtin classes 38 39 * ARGF 40 * new methods: 41 * ARGF.print 42 * ARGF.printf 43 * ARGF.putc 44 * ARGF.puts 45 * ARGF.read_nonblock 46 * ARGF.to_write_io 47 * ARGF.write 48 49 * Array 50 * extended method: 51 * Array#pack supports endian modifiers 52 53 * Bignum 54 * Multiplication algorithm for Bignums with a large number of digits over 55 150 BDIGITs is changed in order to reduce its calculation time. 56 Now such large Bignums are multiplied by using Toom-3 algorithm. 57 58 * Encoding 59 * new encodings: 60 * CP950 61 * CP951 62 * UTF-16 63 * UTF-32 64 * change alias: 65 * SJIS is Windows-31J 66 67 * File 68 * new constant: 69 * File::NULL 70 name of NULL device. 71 * File::DIRECT 72 name of O_DIRECT. 73 74 * IO 75 * extended method: 76 * IO#putc supports multibyte characters 77 * new methods: 78 * IO#advise 79 * IO.write(name, string, [offset] ) 80 Write `string` to file `name`. 81 Opposite with File.read. 82 * IO.binwrite(name, string, [offset] ) 83 binary version of IO.write. 84 85 * Kernel 86 * move #__id__ to BasicObject. 87 * extended method: 88 * Kernel#rand supports range argument 89 90 * Module 91 * new methods: 92 * Module#private_constant 93 * Module#public_constant 94 95 * Random 96 * extended method: 97 * Random.rand supports range argument 98 99 * String 100 * extended method: 101 * String#unpack supports endian modifiers 102 * new method: 103 * String#prepend 104 * String#byteslice 105 106 * Time 107 * extended method: 108 * Time#strftime supports %:z and %::z. 109 110 * Process 111 * Process#maxgroups and Process#maxgroups= now raise NotImplementedError if 112 the platform don't support supplementary groups concept. 113 114* bigdecimal 115 116 * BigDecimal#power and BigDecimal#** support non-integral exponent. 117 118 * Kernel.BigDecimal and BigDecimal.new now accept instances of Integer, 119 Rational, Float, and BigDecimal. If you pass a Rational or a Float to 120 them, you must specify the precision to produce the digits of a BigDecimal. 121 122 * The behavior of BigDecimal#coerce with a Rational is changed. It uses 123 the precision of the receiver BigDecimal to produce the digits of a 124 BigDecimal from the given Rational. 125 126* bigdecimal/util 127 128 * BigDecimal#to_d and Integer#to_d are added. 129 130 * Float#to_d accepts a precision. 131 132 * Rational#to_d raises ArgumentError when passing zero or negative 133 precision. 134 135 * Rational#to_d 136 137 * Zero and an implicit precision is deprecated. 138 This feature is removed at the next release of bigdecimal. 139 140 * A negative precision isn't supported. 141 Be careful it is an incompatible change. 142 143* date 144 145 * Accepts flonum explicitly with limitations. 146 * If the given offset is flonum, DateTime assumes its precision is 147 at most second. 148 149 DateTime.new(2001,2,3,0,0,0,3.0/24) == 150 DateTime.new(2001,2,3,0,0,0,'+03:00') 151 #=> true 152 153 * If the given operand for -/+ is flonum, DateTime assumes its 154 precision is at most nanosecond. 155 156 DateTime.new(2001,2,3) + 0.5 == DateTime.new(2001,2,3,12) 157 #=> true 158 159 * Precision of offset is always at most second. 160 161 Rational('0.5') == Rational('0.500001') #=> false 162 DateTime.new(2001,2,3,0,0,0,Rational('0.5')) == 163 DateTime.new(2001,2,3,0,0,0,Rational('0.500001')) 164 #=> true 165 166 * Ignores long offset and far reform day (with warning). 167 168 * Now accepts only: 169 170 -1<=offset<=1 (-24:00..+24:00) 171 2298874<=start<=2426355 or -/+oo 172 (proleptic Gregorian/Julian mean -/+oo) 173 174 * A method strftime cannot produce huge output (same as Time's one). 175 176 * Even though Date/DateTime can handle far dates, the following causes 177 an exception. 178 179 DateTime.new(1<<10000).strftime('%Y') # Errno::ERANGE 180 181 * Changed the format of inspect. 182 * Changed the format of marshal (but, can load old dumps). 183 184* io/console 185 * new methods: 186 * IO#noecho {|io| } 187 * IO#echo= 188 * IO#echo? 189 * IO#raw {|io| } 190 * IO#raw! 191 * IO#getch 192 * IO#winsize 193 * IO.console 194 195* json 196 * updated to v1.5.4. 197 198* matrix 199 * new classes: 200 * Matrix::EigenvalueDecomposition 201 * Matrix::LUPDecomposition 202 * new methods: 203 * Matrix#diagonal? 204 * Matrix#eigen 205 * Matrix#eigensystem 206 * Matrix#hermitian? 207 * Matrix#lower_triangular? 208 * Matrix#lup 209 * Matrix#lup_decomposition 210 * Matrix#normal? 211 * Matrix#orthogonal? 212 * Matrix#permutation? 213 * Matrix#round 214 * Matrix#symmetric? 215 * Matrix#unitary? 216 * Matrix#upper_triangular? 217 * Matrix#zero? 218 * Vector#magnitude, #norm 219 * Vector#normalize 220 * extended methods: 221 * Matrix#each and #each_with_index can iterate on a subset of the elements 222 * Matrix#find_index returns [row, column] and can iterate on a subset 223 of the elements 224 * Matrix#** implements Numeric exponents (using the eigensystem) 225 * Matrix.zero can build rectangular matrices 226 227* minitest 228 * Minitest has been updated to version 2.2.2. 229 * For full details, see https://github.com/seattlerb/minitest/blob/master/History.txt 230 231* net/http 232 * SNI (Server Name Indication) supported for HTTPS. 233 234 * Allow to configure to wait server returning '100 continue' response 235 before sending HTTP request body. Set Net::HTTP#continue_timeout AND pass 236 'expect' => '100-continue' to a extra HTTP header. 237 238 For example, the following code sends HTTP header and waits for getting 239 '100 continue' response before sending HTTP request body. When 0.5 [sec] 240 timeout occurs or the server send '100 continue', the client sends HTTP 241 request body. 242 http.continue_timeout = 0.5 243 http.request_post('/continue', 'body=BODY', 'expect' => '100-continue') 244 245 * new method: 246 * Net::HTTPRequest#set_form): Added to support 247 both application/x-www-form-urlencoded and multipart/form-data. 248 249* objspace 250 * new method: 251 * ObjectSpace::memsize_of_all 252 253* openssl 254 * PKey::RSA and PKey::DSA now use the generic X.509 encoding scheme 255 (e.g. used in a X.509 certificate's Subject Public Key Info) when 256 exporting public keys to DER or PEM. Backward compatibility is 257 ensured by (already existing) fallbacks during creation. 258 * OpenSSL::ASN1::Constructive#new and OpenSSL::ASN1::Primitive#new 259 (and the constructors of their sub-classes) will no longer force 260 tagging to be set to :EXPLICIT when tag and/or tag_class are passed 261 as parameters. tagging must be set explicitly. 262 * Support for infinite length encodings via infinite_length attribute. 263 * OpenSSL::PKey.read( file | string [, pwd] ) allows to read arbitrary 264 public/private keys in DER-/PEM-encoded form with an optional password 265 for encrypted PEM encodings. 266 * Add new method OpenSSL::X509::Name#hash_old as a wrapper of 267 X509_NAME_hash_old() defined from OpenSSL 1.0.0. It returns OpenSSL 0.9.8 268 compatible hash value. 269 270* optparse 271 * support for bash/zsh completion. 272 273* Rake 274 * Rake has been upgraded from 0.8.7 to 0.9.2.2. For full release notes see 275 https://github.com/jimweirich/rake/blob/master/CHANGES 276 277* RDoc 278 * RDoc has been upgraded to version 3.9.4. For full release notes see 279 http://docs.seattlerb.org/rdoc/History_txt.html 280 281* rexml 282 * Support Ruby native encoding mechanism and iconv dependency is dropped. 283 284* RubyGems 285 * RubyGems has been upgraded to version 1.8.10. For full release notes see 286 http://rubygems.rubyforge.org/rubygems-update/History_txt.html 287 288* stringio 289 * extended method: 290 * StringIO#set_encoding can get 2nd argument and optional hash. 291 292* test/unit 293 * New arguments: 294 * -j N, --jobs=N: Allow run N testcases at once. 295 * --jobs-status: Show status of jobs when parallel running. 296 * --no-retry: Don't retry testcases which failed when parallel running. 297 * --ruby=RUBY: path to ruby for job(worker) process. optional. 298 * --hide-skip: Hide skip messages. You'll see the number of skips at end of 299 test result. 300 301* uri 302 * new methods: 303 * URI::Generic#hostname 304 * URI::Generic#hostname= 305 306* webrick 307 * new method: 308 * WEBrick::HTTPRequest#continue for generating '100 continue' response. 309 * new logging directive: 310 * %{remote}p for remote (client) port number. 311 312* yaml 313 * The default YAML engine is now Psych. You may downgrade to syck by setting 314 YAML::ENGINE.yamler = 'syck'. 315 316* zlib 317 * new methods: 318 * Zlib.deflate 319 * Zlib.inflate 320 321* FileUtils 322 * extended method: 323 * FileUtils#chmod supports symbolic mode argument. 324 325=== Language changes 326 327* Regexps now support Unicode 6.0. (new characters and scripts) 328 329* [experimental] Regexps now support Age property. 330 Unlike Perl, current implementation takes interpretation of the 331 interpretation of UTS #18. 332 http://www.unicode.org/reports/tr18/ 333 334* Turning on/off indentation warnings with directives. 335 ("# -*- warn-indent: true -*-" / "# -*- warn-indent: false -*-") 336 337=== Compatibility issues (excluding feature bug fixes) 338 339 * Rational#to_d 340 341 See above. 342