U:RDoc::TopLevel[ iI"NEWS-1.9.1:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI"NEWS for Ruby 1.9.1;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"JThis document is a list of user visible feature changes made between ;TI"#releases except for bug fixes.;T@ o; ;[I"DNote that each entry is kept so brief that no reason behind or ;TI"Ireference information is supplied with. For a full list of changes ;TI"=with all sufficient information, see the ChangeLog file.;T@ S; ; i; I"$Changes since the 1.8.7 release;To; ;[I" strings but now they return an array of symbols. ;TI"A o Extra subclassing check when binding UnboundMethods ;TI" ;TI"* Exceptions ;TI"B o Exceptions are equal to each other if they belong to ;TI"E the same class and have the same message and backtrace. ;TI"E o SystemStackError used to be a subclass of StandardError ;TI"; but not it is a direct subclass of Exception. ;TI"" o SecurityError: ditto ;TI". o Removed Exception#to_str [Ruby2] ;TI" ;TI"!* Enumerable and Enumerator ;TI"H o Enumerable::Enumerator, compatibility alias of Enumerator, ;TI" is removed. ;TI"E o Enumerable#{map,collect} called without a block returns ;TI" an enumerator. ;TI"G o Even more builtin and bundled libraries have been made to ;TI"? return an enumerator when called without a block. ;TI" * Array ;TI"@ o Array#nitems was removed (use count {|i| !i.nil?}) ;TI"3 o Array#choice was removed (use sample) ;TI"8 o Array#[m,n] = nil places nil in the array. ;TI" * Hash ;TI"5 o Hash#to_s is equivalent to Hash#inspect ;TI"8 o Semantics for Hash#each and Hash#each_pair ;TI"( o Hash#select returns a hash ;TI"@ o Hash#key is the new name for #index which has been ;TI" deprecated. ;TI"F o Hash preserves order. It enumerates its elements in the ;TI"3 order in which the keys are inserted. ;TI"G o Most of the changes in Hash apply to hash like interfaces ;TI"# such as ENV and *DBM. ;TI"* IO operations ;TI"J o Many methods used to act byte-wise but now some of those act ;TI"F character-wise. You can use alternate byte-wise methods. ;TI" o IO#getc ;TI" o Non-blocking IO ;TI": o Kernel#open takes "t" for newline conversion ;TI"2 o Kernel#open takes encoding specified ;TI"F o IO automatically converts byte sequence from a character ;TI"2 encodings into another if specified. ;TI"" o StringIO#readpartial ;TI" o IO.try_convert ;TI" o IO.binread ;TI" o IO.copy_stream ;TI" o IO#binmode? ;TI"5 o IO#close_on_exec= and IO#close_on_exec? ;TI"@ o Limit input in IO#gets, IO#readline, IO#readlines, ;TI"? IO#each_line, IO#lines, IO.foreach, IO.readlines, ;TI"> StringIO#gets, StringIO#readline, StringIO#each, ;TI" StringIO#readlines ;TI"( o IO#ungetc, StringIO#ungetc ;TI". o IO#ungetbyte, StringIO#ungetbyte ;TI"9 o IO#internal_encoding, IO#external_encoding, ;TI" IO#set_encoding ;TI"+ o IO.pipe takes encoding option ;TI"A o Directive %u behaves like %d for negative values in ;TI"& printf-style formatting. ;TI"* File and Dir operations ;TI"G o #to_path is called as necessary in File.path, File.chmod, ;TI"? File.lchmod, File.chown, File.lchown, File.utime, ;TI" File.unlink, etc.. ;TI"" o File.world_readable? ;TI"" o File.world_writable? ;TI" o Dir.[], Dir.glob ;TI" o Dir.exist? ;TI" o Dir.exists? ;TI"* File::Stat ;TI"( o File::Stat#world_readable? ;TI"( o File::Stat#world_writable? ;TI"* String ;TI"C o No longer an Enumerable: use each_line/lines for line ;TI" oriented operation ;TI" o Encoding-awareness ;TI"E o Character-wise semantics in many methods instead of ;TI" byte-wise. ;TI"L o String#[]: Indexing a String with an integer returns a ;TI"D single character String instead of an integer. ;TI"E o String#[]=: No longer takes an integer as right ;TI"E side value. Note that "str[i] = ?c" because of ;TI"+ the following change. ;TI"B o ?c is evaluated to a single character string ;TI", instead of an integer. ;TI"* Regexp ;TI" o Encoding-awareness ;TI"D o Regexp matches only with strings which is encoded in a ;TI"< compatible character encoding to the regexp's. ;TI"; o Regexp#kcode is removed. use Regexp#encoding. ;TI"/* Symbols: restriction on literal symbols ;TI"* Numeric ;TI"@ o Numeric#div always rounds as Integer#div has done. ;TI"" o Numeric#fdiv: ditto. ;TI"* Integer ;TI"+ o Integer(nil) raises TypeError ;TI"* Fixnum ;TI"$ o Fixnum#id2name removed ;TI"# o Fixnum#to_sym removed ;TI"* Struct ;TI" o Struct#inspect ;TI" * Time ;TI"% o New format in Time#to_s ;TI"A o Timezone information preserved on Marshal.dump/load ;TI"* $SAFE and bound methods ;TI"8 o New trusted/untrusted model in addition to ;TI"& tainted/untainted model. ;TI" ;TI"* Deprecation ;TI"H o $= (global flag for case-sensitiveness on string matching) ;TI" o Kernel#to_a ;TI"& o Kernel#getc, #gsub, #sub ;TI"F o Kernel#callcc and Continuation now become 'continuation' ;TI" bundled library. ;TI" o Object#type ;TI"7 o Removed Array and Hash #indices, #indexes ;TI" o Hash#index ;TI" o ENV.index ;TI"$ o Process::Status#to_int ;TI" o Numeric#rdiv ;TI"E o Precision is removed. Don't cry, it will be redesigned ;TI". and come back in future version. ;TI"+ o Symbol#to_int and Symbol#to_i ;TI"B o $KCODE is no longer effective. Use Encoding related ;TI"% features of each class. ;TI"! o VERSION and friends ;T;0o;;0;[o; ;[I"bundled libraries;T@ o;;[+I"* Pathname ;TI", o No longer has #to_str nor #=~. ;TI"* time and date ;TI"J o Time.parse and Date.parse interprets slashed numerical dates ;TI" as "dd/mm/yyyy". ;TI"* Readline ;TI"H o If Readline uses libedit, Readline::HISTORY[0] returns the ;TI"# first of the history. ;TI"* Continuation ;TI" o as above ;TI" ;TI"* Deprecation ;TI"- o Complex#image: use Complex#imag ;TI"8 o All SSL-related class methods in Net::SMTP ;TI"< o Prime#cache, Prime#primes, Prime#primes_so_far ;TI". o mailread library: use tmail gem. ;TI"' o cgi-lib library: use cgi. ;TI"& o date2 library: use date. ;TI" o eregex library ;TI"G o finalize library: use ObjectSpace.define_finalizer if you ;TI". really need a finalizer. really? ;TI", o ftools library: use fileutils. ;TI"0 o generator library: use Enumerator. ;TI"/ o importenv library and Env library ;TI"F o jcode library: use multilingualization support of String ;TI" o parsedate library ;TI" o ping library ;TI" o readbytes library ;TI"C o getopts library and parsearg library: use optparse or ;TI" getoptlong. ;TI"; o soap, wsdl and xsd libraries: use soap4r gem. ;TI"' o Win32API library: use dl. ;TI"D o dl library: Reimplemented and API changed. use the new ;TI"' version of dl or ffi gem. ;TI"A o rubyunit library and runit library: use minitest or ;TI"C test/unit. Or use anything you love through RubyGems. ;TI"E o test/unit is reimplemented on top of minitest. This is ;TI"5 not fully compatible with the original. ;T;0S; ; i; I"Language core changes;T@ o;;[I" * New syntax and semantics ;TI"E o Magic comments to declare in which encoding your source ;TI" code is written ;TI"C o New literal hash syntax and new syntax for hash style ;TI" arguments ;TI"$ o New syntax for lambdas ;TI"5 o .() and calling Procs without #call/#[] ;TI"& o Block in block arguments ;TI"# o Block local variables ;TI"B o Mandatory arguments after optional arguments allowed ;TI"% o Multiple splats allowed ;TI"C o #[] can take splatted arguments, hash style arguments ;TI" and a block. ;TI"C o New directives in printf-style formatted strings (%). ;TI"D o Newlines allowed before ternary colon operator (:) and ;TI"* method call dot operator (.) ;TI"= o Negative operators such as !, != and !~ are now ;TI" overloadable ;TI"< o Encoding.default_external and default_internal ;TI"C o __ENCODING__: New pseudo variable to hold the current ;TI" script's encoding ;T;0S; ; i; I"Library updates;T@ o;;;;[o;;0;[o; ;[I" builtin classes and objects;To;;[†I"* Kernel and Object ;TI" o BasicObject ;TI"@ o Object#=~ returns nil instead of false by default. ;TI", o Kernel#define_singleton_method ;TI"F o Kernel#load can load a library from the highest versions ;TI"! of gems by default. ;TI"* Class and Module ;TI"D o Module#const_defined?, #const_get and #method_defined? ;TI") take an optional parameter. ;TI"3 o #class_variable_{set,get} are public. ;TI"( o Class of singleton classes ;TI" ;TI"* Errno::EXXX ;TI"C o All of those are always defined. Errno::EXXX will be ;TI"D defined as an alias to Errno::NOERROR if your platform ;TI" does not have one. ;TI" ;TI"* Binding#eval ;TI"* Blocks and Procs ;TI"/ o Arity of blocks without arguments ;TI"/ o proc is now a synonym of Proc.new ;TI" o Proc#yield ;TI"# o Passing blocks to #[] ;TI" o Proc#lambda? ;TI" o Proc#curry ;TI"'* Fiber: coroutines/micro-threads ;TI"* Thread ;TI": o Thread.critical and Thread.critical= removed ;TI"G o Thread#exit!, Thread#kill! and Thread#terminate! removed. ;TI" ;TI"!* Enumerable and Enumerator ;TI"@ o Enumerator#enum_cons and Enumerator#enum_slice are ;TI"G removed. Use #each_cons and #each_slice without a block. ;TI"D o Enumerable#each_with_index can take optional arguments ;TI"' and passes them to #each. ;TI") o Enumerable#each_with_object ;TI"$ o Enumerator#with_object ;TI"$ o Enumerator.new { ... } ;TI" * Array ;TI"H o Array#delete returns a deleted element rather than a given ;TI" object ;TI"7 o Array#to_s is equivalent to Array#inspect ;TI" o Array.try_convert ;TI"6 o Array#pack('m0') complies with RFC 4648. ;TI" * Hash ;TI"- o preserving item insertion order ;TI" o Hash#default_proc= ;TI"E o Hash#_compare_by_identity and Hash#compare_by_identity? ;TI" o Hash.try_convert ;TI" o Hash#assoc ;TI" o Hash#rassoc ;TI" o Hash#flatten ;TI" * Range ;TI" o Range#cover? ;TI"D o Range#include? iterates over elements and compares the ;TI"H given value with each element unless the range is numeric. ;TI"D Use Range#cover? for the old behavior, i.e. comparison ;TI"# with boundary values. ;TI"" o Range#min, Range#max ;TI" ;TI"* File and Dir operations ;TI" o New methods ;TI"* Process ;TI" o Process.spawn ;TI" o Process.daemon ;TI"* String ;TI" o String#clear ;TI" o String#ord ;TI", o String#getbyte, String#setbyte ;TI"F o String#chars and String#each_char act as character-wise. ;TI"6 o String#codepoints, String#each_codepoint ;TI"( o String#unpack with a block ;TI" o String#hash ;TI" o String.try_convert ;TI" o String#encoding ;TI"E o String#force_encoding, String#encode and String#encode! ;TI" o String#ascii_only? ;TI"$ o String#valid_encoding? ;TI" o String#match ;TI"* Symbol ;TI") o Zero-length symbols allowed ;TI" o Symbol#intern ;TI" o Symbol#encoding ;TI"7 o Symbol methods similar to those in String ;TI"* Regexp ;TI"( o Regexp#=== matches symbols ;TI" o Regexp.try_convert ;TI" o Regexp#match ;TI"$ o Regexp#fixed_encoding? ;TI" o Regexp#encoding ;TI"# o Regexp#named_captures ;TI" o Regexp#names ;TI"* MatchData ;TI" o MatchData#names ;TI" o MatchData#regexp ;TI"* Encoding ;TI"* Encoding::Converter ;TI"8 o supports conversion between many encodings ;TI"* Numeric ;TI"2 o Numeric#upto, #downto, #times, #step ;TI"* o Numeric#real?, Complex#real? ;TI" o Numeric#magnitude ;TI" o Numeric#round ;TI" * Float ;TI" o Float#round ;TI"* Integer ;TI" o Integer#round ;TI"* Rational / Complex ;TI". o They are in the core library now ;TI" * Math ;TI"2 o Math#log takes an optional argument. ;TI" o Math#log2 ;TI"0 o Math#cbrt, Math#lgamma, Math#gamma ;TI" * Time ;TI"5 o Time.times removed. Use Process.times. ;TI" o Time#sunday? ;TI" o Time#monday? ;TI" o Time#tuesday? ;TI" o Time#wednesday? ;TI" o Time#thursday? ;TI" o Time#friday? ;TI" o Time#saturday? ;TI"( o Time#tv_nsec and Time#nsec ;TI"* Misc. new methods ;TI"N o RUBY_ENGINE to distinguish between Ruby processor implementation ;TI" o public_method ;TI" o public_send ;TI" o GC.count ;TI"' o ObjectSpace.count_objects ;TI"$ o Method#hash, Proc#hash ;TI"G o Method#source_location, UnboundMethod#source_location and ;TI"" Proc#source_location ;TI" o __callee__ ;TI"F o Elements in $LOAD_PATH and $LOADED_FEATURES are expanded ;T;0o;;0;[o; ;[I"bundled libraries;To;;[$I"* RubyGems ;TI"1 o Package management system for Ruby. ;TI"4 o Integrated with Ruby's library loader. ;TI" * Rake ;TI"F o Ruby make. A simple ruby build program with capabilities ;TI" similar to make. ;TI"* minitest ;TI"I o Our new testing library which is faster, cleaner and easier ;TI"- to read than the old test/unit. ;TI"I o You can introduce the old test/unit as testunit gem through ;TI"# RubyGems if you want. ;TI" * CMath ;TI", o Complex number version of Math ;TI" * Prime ;TI"I o Extracted from Mathn and improved. You can easily enumerate ;TI" prime numbers. ;TI"; o Prime.new is obsolete. Use its class methods. ;TI"* ripper ;TI" o Ruby script parser ;TI"* Readline ;TI"' o Readline.vi_editing_mode? ;TI"* o Readline.emacs_editing_mode? ;TI"% o Readline::HISTORY.clear ;TI" * Tk ;TI"J o TkXXX widget classes are removed and redefined as aliases of ;TI" Tk::XXX classes. ;TI" * RDoc ;TI"- o Updated to version 2.2.2. See: ;TI"R http://rubyforge.org/frs/shownotes.php?group_id=627&release_id=26434 ;TI" * json ;TI"? o JSON (JavaScript Object Notation) encoder/decoder ;T;0o;;0;[o; ;[I"commandline options;To;;[ I"* -E, --encoding ;TI" * -U ;TI"%* --enable-gems, --disable-gems ;TI"+* --enable-rubyopt, --disable-rubyopt ;TI"A* long options are allowed in RUBYOPT environment variable. ;T;0S; ; i; I"Implementation changes;T@ o;;;;[o;;0;[o; ;[I"Memory Diet;To;;[I"G* Object Compaction - Object, Array, String, Hash, Struct, Class, ;TI" Module ;TI"3* st_table compaction (inlining small tables) ;T;0o;;0;[o; ;[I" YARV;To;;[I"=* Ruby codes are compiled into opcodes before executed. ;TI"* Native thread ;T;0o;;0;[o; ;[I"Platform supports;To;;[ I"* Support levels ;TI" (0) Supported ;TI" (1) Best effort ;TI" (2) Perhaps ;TI" (3) Not supported ;TI"* Dropped ;TI"L o No longer supports djgpp, bcc32, human68k, MacOS 9 or earlier, ;TI" VMS nor Windows CE.;T;0: @file@:0@omit_headings_from_table_of_contents_below0