1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* NEWS: Reorder and fix indent levels [ruby-core:52723]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
marcandre 2013-02-23 14:23:39 +00:00
parent 315c72e234
commit 87e0df89d2

542
NEWS
View file

@ -11,217 +11,300 @@ with all sufficient information, see the ChangeLog file.
== Changes since the 1.9.3 release
=== C API updates
* NUM2SHORT() and NUM2USHORT() added. They are similar to NUM2INT, but short.
* rb_newobj_of() and NEWOBJ_OF() added. They create a new object of a given class.
=== Language changes
=== Library updates (outstanding ones only)
* Added keyword arguments.
* builtin classes
* ARGF
* added method:
* added ARGF#codepoints and ARGF#each_codepoint, like the corresponding
methods for IO.
* Added %i and %I for symbol list creation (similar to %w and %W).
* Array
* added method:
* added Array#bsearch for binary search.
* incompatible changes:
* random parameter of Array#shuffle! and Array#sample now
will be called with one argument, maximum value.
* when given Range arguments, Array#values_at now returns nil for each
value that is out-of-range.
* Default source encoding is changed to UTF-8. (was US-ASCII)
* Enumerable
* added method:
* added Enumerable#lazy method for lazy enumeration.
* No warning for unused variables starting with '_'
* Enumerator
* added method:
* added Enumerator#size for lazy size evaluation.
* extended method:
* Enumerator.new accept an argument for lazy size evaluation.
* new class Enumerator::Lazy for lazy enumeration
=== Core classes updates (outstanding ones only)
* ENV
* aliased method:
* ENV.to_h is a new alias for ENV.to_hash
* ARGF
* added method:
* added ARGF#codepoints and ARGF#each_codepoint, like the corresponding
methods for IO.
* Fiber
* incompatible changes:
* Fiber#resume cannot resume a fiber which invokes "Fiber#transfer".
* Array
* added method:
* added Array#bsearch for binary search.
* incompatible changes:
* random parameter of Array#shuffle! and Array#sample now
will be called with one argument, maximum value.
* when given Range arguments, Array#values_at now returns nil for each
value that is out-of-range.
* File
* extended method:
* File.fnmatch? now expands braces in the pattern if
File::FNM_EXTGLOB option is given.
* Enumerable
* added method:
* added Enumerable#lazy method for lazy enumeration.
* GC
* improvements:
* introduced the bitmap marking which suppresses to copy a memory page
with Copy-on-Write.
* introduced the non-recursive marking which avoids unexpected stack overflow.
* Enumerator
* added method:
* added Enumerator#size for lazy size evaluation.
* extended method:
* Enumerator.new accept an argument for lazy size evaluation.
* new class Enumerator::Lazy for lazy enumeration
* GC::Profiler
* added method:
* added GC::Profiler.raw_data which returns raw profile data for GC.
* ENV
* aliased method:
* ENV.to_h is a new alias for ENV.to_hash
* Hash
* added method:
* added Hash#to_h as explicit conversion method, like Array#to_a.
* extended method:
* Hash#default_proc= can be passed nil to clear the default proc.
* Fiber
* incompatible changes:
* Fiber#resume cannot resume a fiber which invokes "Fiber#transfer".
* IO
* deprecated methods:
* IO#lines, #bytes, #chars and #codepoints are deprecated.
* File
* extended method:
* File.fnmatch? now expands braces in the pattern if
File::FNM_EXTGLOB option is given.
* Kernel
* added method:
* added Kernel#Hash conversion method like Array() or Float().
* added Kernel#__dir__ which returns the absolute path of the
directory of the file from which this method is called.
* added Kernel#caller_locations which returns an array of
frame information objects.
* extended method:
* Kernel#warn accepts multiple args in like puts.
* Kernel#caller accepts second optional argument `n' which specify
required caller size.
* Kernel#to_enum and enum_for accept a block for lazy size evaluation.
* incompatible changes:
* system() and exec() closes non-standard file descriptors
(The default of :close_others option is changed to true by default.)
* respond_to? against a protected method now returns false unless
the second argument is true.
* __callee__ has returned to the original behavior, and now
returns the called name but not the original name in an
aliased method.
* Kernel#inspect does not call #to_s anymore
(it used to call redefined #to_s).
* GC
* improvements:
* introduced the bitmap marking which suppresses to copy a memory page
with Copy-on-Write.
* introduced the non-recursive marking which avoids unexpected stack overflow.
* LoadError
* added method:
* added LoadError#path method to return the file name that could not be
loaded.
* GC::Profiler
* added method:
* added GC::Profiler.raw_data which returns raw profile data for GC.
* Module
* added method:
* added Module#prepend which is similar to Module#include,
however a method in the prepended module overrides the
corresponding method in the prepending module.
* added Module.prepended and Module.prepend_features, similar
to included and append_features.
* added Module#refine, which extends a class or module locally.
[experimental]
* extended method:
* Module#define_method accepts a UnboundMethod from a Module.
* Module#const_get accepts a qualified constant string, e.g.
Object.const_get("Foo::Bar::Baz")
* Hash
* added method:
* added Hash#to_h as explicit conversion method, like Array#to_a.
* extended method:
* Hash#default_proc= can be passed nil to clear the default proc.
* Mutex
* added method:
* added Mutex#owned? which returns the mutex is held by current
thread or not. [experimental]
* incompatible changes:
* Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize
and Mutex#sleep are no longer allowed to be used from trap handler
and raise a ThreadError in such case.
* Mutex#sleep may spurious wakeup. Check after wakeup.
* IO
* deprecated methods:
* IO#lines, #bytes, #chars and #codepoints are deprecated.
* NilClass
* added method:
* added nil.to_h which returns {}
* Kernel
* added method:
* added Kernel#Hash conversion method like Array() or Float().
* added Kernel#__dir__ which returns the absolute path of the
directory of the file from which this method is called.
* added Kernel#caller_locations which returns an array of
frame information objects.
* extended method:
* Kernel#warn accepts multiple args in like puts.
* Kernel#caller accepts second optional argument `n' which specify
required caller size.
* Kernel#to_enum and enum_for accept a block for lazy size evaluation.
* incompatible changes:
* system() and exec() closes non-standard file descriptors
(The default of :close_others option is changed to true by default.)
* respond_to? against a protected method now returns false unless
the second argument is true.
* __callee__ has returned to the original behavior, and now
returns the called name but not the original name in an
aliased method.
* Kernel#inspect does not call #to_s anymore
(it used to call redefined #to_s).
* ObjectSpace::WeakMap
* new low level class to hold weak references to objects.
* LoadError
* added method:
* added LoadError#path method to return the file name that could not be
loaded.
* Proc
* incompatible change:
* removed Proc#== and #eql? so two procs are == only when they are
the same object.
* Module
* added method:
* added Module#prepend which is similar to Module#include,
however a method in the prepended module overrides the
corresponding method in the prepending module.
* added Module.prepended and Module.prepend_features, similar
to included and append_features.
* added Module#refine, which extends a class or module locally.
[experimental]
* extended method:
* Module#define_method accepts a UnboundMethod from a Module.
* Module#const_get accepts a qualified constant string, e.g.
Object.const_get("Foo::Bar::Baz")
* Process
* added method:
* added getsid for getting session id (unix only).
* Mutex
* added method:
* added Mutex#owned? which returns the mutex is held by current
thread or not. [experimental]
* incompatible changes:
* Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize
and Mutex#sleep are no longer allowed to be used from trap handler
and raise a ThreadError in such case.
* Mutex#sleep may spurious wakeup. Check after wakeup.
* Range
* added method:
* added Range#size for lazy size evaluation.
* added Range#bsearch for binary search.
* NilClass
* added method:
* added nil.to_h which returns {}
* RubyVM (MRI specific)
* added RubyVM::InstructionSequence.of to get the instruction sequence
from a method or a block.
* added RubyVM::InstructionSequence#path, #absolute_path, #label,
#base_label and #first_lineno to retrieve information from where
the instruction sequence was defined.
* added Environment variables to specify stack usage:
* RUBY_THREAD_VM_STACK_SIZE: vm stack size used at thread creation.
default: 128KB (32bit CPU) or 256KB (64bit CPU).
* RUBY_THREAD_MACHINE_STACK_SIZE: machine stack size used at thread
creation. default: 512KB or 1024KB.
* RUBY_FIBER_VM_STACK_SIZE: vm stack size used at fiber creation.
default: 64KB or 128KB.
* RUBY_FIBER_MACHINE_STACK_SIZE: machine stack size used at fiber
creation. default: 256KB or 256KB.
These variables are checked only at launched time.
* added constant DEFAULT_PARAMS to get above default parameters.
* ObjectSpace::WeakMap
* new low level class to hold weak references to objects.
* Signal
* added method:
* added Signal.signame which returns signal name
* Proc
* incompatible change:
* removed Proc#== and #eql? so two procs are == only when they are
the same object.
* incompatible changes:
* Signal.trap raises ArgumentError when :SEGV, :BUS, :ILL, :FPE, :VTALRM
are specified.
* Process
* added method:
* added getsid for getting session id (unix only).
* String
* added method:
* added String#b returning a copied string whose encoding is ASCII-8BIT.
* change return value:
* String#lines now returns an array instead of an enumerator.
* String#chars now returns an array instead of an enumerator.
* String#codepoints now returns an array instead of an enumerator.
* String#bytes now returns an array instead of an enumerator.
* Range
* added method:
* added Range#size for lazy size evaluation.
* added Range#bsearch for binary search.
* Struct
* added method:
* added Struct#to_h returning values with keys corresponding to the
instance variable names.
* RubyVM (MRI specific)
* added RubyVM::InstructionSequence.of to get the instruction sequence
from a method or a block.
* added RubyVM::InstructionSequence#path, #absolute_path, #label,
#base_label and #first_lineno to retrieve information from where
the instruction sequence was defined.
* added Environment variables to specify stack usage:
* RUBY_THREAD_VM_STACK_SIZE: vm stack size used at thread creation.
default: 128KB (32bit CPU) or 256KB (64bit CPU).
* RUBY_THREAD_MACHINE_STACK_SIZE: machine stack size used at thread
creation. default: 512KB or 1024KB.
* RUBY_FIBER_VM_STACK_SIZE: vm stack size used at fiber creation.
default: 64KB or 128KB.
* RUBY_FIBER_MACHINE_STACK_SIZE: machine stack size used at fiber
creation. default: 256KB or 256KB.
These variables are checked only at launched time.
* added constant DEFAULT_PARAMS to get above default parameters.
* Thread
* added method:
* added Thread#thread_variable_get for getting thread local variables
(these are different than Fiber local variables).
* added Thread#thread_variable_set for setting thread local variables.
* added Thread#thread_variables for getting a list of the thread local
variable keys.
* added Thread#thread_variable? for testing to see if a particular thread
variable has been set.
* added Thread.handle_interrupt as well as instance and singleton methods
pending_interrupt? for asynchronous handling of exceptions
* added Thread#backtrace_locations which returns similar information of
Kernel#caller_locations.
* new class Thread::Backtrace::Location to hold backtrace location
information. These are returned by Thread#backtrace_locations and
* Signal
* added method:
* added Signal.signame which returns signal name
* incompatible changes:
* Signal.trap raises ArgumentError when :SEGV, :BUS, :ILL, :FPE, :VTALRM
are specified.
* String
* added method:
* added String#b returning a copied string whose encoding is ASCII-8BIT.
* change return value:
* String#lines now returns an array instead of an enumerator.
* String#chars now returns an array instead of an enumerator.
* String#codepoints now returns an array instead of an enumerator.
* String#bytes now returns an array instead of an enumerator.
* Struct
* added method:
* added Struct#to_h returning values with keys corresponding to the
instance variable names.
* Thread
* added method:
* added Thread#thread_variable_get for getting thread local variables
(these are different than Fiber local variables).
* added Thread#thread_variable_set for setting thread local variables.
* added Thread#thread_variables for getting a list of the thread local
variable keys.
* added Thread#thread_variable? for testing to see if a particular thread
variable has been set.
* added Thread.handle_interrupt as well as instance and singleton methods
pending_interrupt? for asynchronous handling of exceptions
* added Thread#backtrace_locations which returns similar information of
Kernel#caller_locations.
* incompatible changes:
* Thread#join and Thread#value now raises a ThreadError if target thread
is the current or main thread.
* new class Thread::Backtrace::Location to hold backtrace location
information. These are returned by Thread#backtrace_locations and
Kernel#caller_locations.
* incompatible changes:
* Thread#join and Thread#value now raises a ThreadError if target thread
is the current or main thread.
* Time
* change return value:
* Time#to_s now returns US-ASCII encoding instead of BINARY.
* Time
* change return value:
* Time#to_s now returns US-ASCII encoding instead of BINARY.
* TracePoint
* new class. This class is replacement of set_trace_func.
Easy to use and efficient implementation.
* TracePoint
* new class. This class is replacement of set_trace_func.
Easy to use and efficient implementation.
* toplevel
* added method:
* added main.define_method which defines a global function.
* added main.using, which imports refinements into the current file or
eval string. [experimental]
* toplevel
* added method:
* added main.define_method which defines a global function.
* added main.using, which imports refinements into the current file or
eval string. [experimental]
=== Core classes compatibility issues (excluding feature bug fixes)
* Array#values_at
See above.
* String#lines
* String#chars
* String#codepoints
* String#bytes
These methods no longer return an Enumerator, although passing a
block is still supported for backwards compatibility.
Code like str.lines.with_index(1) { |line, lineno| ... } no longer
works because str.lines returns an array. Replace lines with
each_line in such cases.
* IO#lines
* IO#chars
* IO#codepoints
* IO#bytes
* ARGF#lines
* ARGF#chars
* ARGF#bytes
* StringIO#lines
* StringIO#chars
* StringIO#codepoints
* StringIO#bytes
* Zlib::GzipReader#lines
* Zlib::GzipReader#bytes
These methods are deprecated in favor of each_line, each_byte,
each_char and each_codepoint.
* Proc#==
* Proc#eql?
These methods were removed. Two procs are == only when they are
the same object.
* Fixnum
* Bignum
* Float
Fixnums, Bignums and Floats are frozen.
* Signal.trap
See above.
* Merge Onigmo.
https://github.com/k-takata/Onigmo
* The :close_others option is true by default for system() and exec().
Also, the close-on-exec flag is set by default for all new file descriptors.
This means file descriptors doesn't inherit to spawned process unless
explicitly requested such as system(..., fd=>fd).
* Kernel#respond_to? against a protected method now returns false
unless the second argument is true.
* Kernel#respond_to_missing?
* Kernel#initialize_clone
* Kernel#initialize_dup
These methods are now private.
* Thread#join, Thread#value
See above.
* Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize and Mutex#sleep
See above.
=== Stdlib updates (outstanding ones only)
* cgi
* Add HTML5 tag maker.
@ -395,9 +478,9 @@ with all sufficient information, see the ChangeLog file.
https://github.com/rubygems/rubygems/blob/master/History.txt
* shellwords
* Shellwords#shellescape() now stringifies the given object using to_s.
* Shellwords#shelljoin() accepts non-string objects in the given
array, each of which is stringified using to_s.
* Shellwords#shellescape now stringifies the given object using to_s.
* Shellwords#shelljoin accepts non-string objects in the given
array, each of which is stringified using to_s.
* stringio
* deprecated methods:
@ -431,95 +514,18 @@ with all sufficient information, see the ChangeLog file.
* deprecated methods:
* Zlib::GzipReader#lines and #bytes are deprecated.
=== Language changes
=== Stdlib compatibility issues (excluding feature bug fixes)
* Added keyword arguments.
* OpenStruct new methods can conflict with custom attributes named
"each_pair", "eql?", "hash" or "to_h".
* Added %i and %I for symbol list creation (similar to %w and %W).
* Dir.mktmpdir in lib/tmpdir.rb
* Default source encoding is changed to UTF-8. (was US-ASCII)
See above.
* No warning for unused variables starting with '_'
=== C API updates
=== Compatibility issues (excluding feature bug fixes)
* NUM2SHORT() and NUM2USHORT() added. They are similar to NUM2INT, but short.
* Array#values_at
* rb_newobj_of() and NEWOBJ_OF() added. They create a new object of a given class.
See above.
* String#lines
* String#chars
* String#codepoints
* String#bytes
These methods no longer return an Enumerator, although passing a
block is still supported for backwards compatibility.
Code like str.lines.with_index(1) { |line, lineno| ... } no longer
works because str.lines returns an array. Replace lines with
each_line in such cases.
* IO#lines
* IO#chars
* IO#codepoints
* IO#bytes
* ARGF#lines
* ARGF#chars
* ARGF#bytes
* StringIO#lines
* StringIO#chars
* StringIO#codepoints
* StringIO#bytes
* Zlib::GzipReader#lines
* Zlib::GzipReader#bytes
These methods are deprecated in favor of each_line, each_byte,
each_char and each_codepoint.
* Proc#==
* Proc#eql?
These methods were removed. Two procs are == only when they are
the same object.
* Fixnum
* Bignum
* Float
Fixnums, Bignums and Floats are frozen.
* Signal.trap
See above.
* Merge Onigmo.
https://github.com/k-takata/Onigmo
* The :close_others option is true by default for system() and exec().
Also, the close-on-exec flag is set by default for all new file descriptors.
This means file descriptors doesn't inherit to spawned process unless
explicitly requested such as system(..., fd=>fd).
* Kernel#respond_to? against a protected method now returns false
unless the second argument is true.
* Kernel#respond_to_missing?
* Kernel#initialize_clone
* Kernel#initialize_dup
These methods are now private.
* Dir.mktmpdir in lib/tmpdir.rb
See above.
* OpenStruct new methods can conflict with custom attributes named
"each_pair", "eql?", "hash" or "to_h".
* Thread#join, Thread#value
See above.
* Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize and Mutex#sleep
See above.