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

* doc/NEWS: sorted by entry name.

* doc/NEWS: modify String#[re,n] entry.
* doc/NEWS: unify method expressions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
aamine 2002-01-11 10:54:23 +00:00
parent 2f8cdb7978
commit e1ac9c6a0f

495
doc/NEWS
View file

@ -1,146 +1,3 @@
: String#to_i
Accepts optional base argument.
: Integer#to_s
Accepts optional base argument.
: TCPServer#listen, UNIXServer#listen
Added.
: String#match
Added.
: Syslog module
Imported.
: String#chomp
if $/ == '\n', chops off last newlines (any of \n, \r, \r\n).
: Module::new/Class::new
takes block.
: allocation framework
any instance of class can be allocated by class.allocate,
(except a few classes).
: String#[]
starting offset can be specified as optional second parameter.
: String/Array methods
returns an instance of receivers class.
: String::new
returns "".
: Dir#path
Added.
: Enum#sort_by
Added.
: Signal
new module, has module functions Signal::trap and Signal::list.
: Curses
Updated. New methods and constants for using the mouse, character
attributes, colors and key codes have been added.
: Range#step([step=1])
Added.
: Regexp
It is being obsoleted to regard /re/ as /re/ =~ $_ in a conditional
context. Use ~/re/ instead.
: String#lstrip, rstrip, lstrip!, rstrip!
Added. These strip only left or right part of a string.
: Socket::pack_sockaddr_in(), Socket::unpack_sockaddr_in()
Added. Utility for direct Socket access.
: Socket::pack_sockaddr_un(), Socket::unpack_sockaddr_un()
Added. Utility for direct Socket access.
: String#casecmp
Added. This is a case insensitive version of String#<=>.
: String#eql?
Changed to be always case sensitive.
: Module#include?
Added. [ruby-dev:13941]
: Dir::chdir
Changed to warn only when invoked from multiple threads or no block
is given. [ruby-dev:13823]
Dir.chdir("/tmp")
pwd = Dir.pwd #=> "/tmp"
puts pwd
Dir.chdir("foo") {
pwd = Dir.pwd #=> "/tmp/foo"
puts pwd
Dir.chdir("bar") { # <-- previously warned
pwd = Dir.pwd #=> "/tmp/foo/bar"
puts pwd
}
pwd = Dir.pwd #=> "/tmp/foo"
puts pwd
}
pwd = Dir.pwd #=> "/tmp"
puts pwd
: Proc#yield
Added. This is equivalent to Proc#call except it does not check the
number of given arguments, which are thus passed to the proc as-is.
: File#fnmatch, File::Constants::FNM_*
Added. Refer to the fnmatch(3) manpage for details.
e.g.
# exclude files matching "*.bak".
files.reject! { |fn| File::fnmatch?("*.bak", fn) }
: Method#==
Added.
: Multiple assignment behavior
Fixed so that "*a = nil" results in "a == []".
: Array expansion
Fixed with the following behavior:
@ -153,27 +10,22 @@
a = *[1]
p a #=> 1
: NameError & NoMethodError
: allocation framework
Moved and now NoMethodError < NameError < StandardError.
any instance of class can be allocated by class.allocate,
(except a few classes).
: open
: break and next
Extended so that when the third argument is permission flags it
calls open(2) instead of fopen(3).
Extended to take an optional expression, which is used as a value
for termination. [experimental]
: Marshal
Fixed not to dump anonymous classes/modules.
Fixed with loading modules.
: constants
: constants lookup
Improved at the performance of searching by using an internal hash
table.
: Syntax
: expression parenthesis in the first argument
Experimentally altered to get the following code (note the space
after p):
@ -188,17 +40,6 @@
(p("xx"*2)).to_i
: Range#to_ary
Added. You can now do something like this:
a, b, c = 1..3
: break and next
Extended to take an optional expression, which is used as a value
for termination. [experimental]
: to_str
Added to get objects which define to_str() treated as String's.
@ -218,15 +59,57 @@
=> -:7:in `open': No such file or directory - "foo" (Errno::ENOENT)
ruby 1.7.0 (2001-05-02) [i586-linux]
: Line-range operation
: syslog module
Obsoleted except the case when used in a one-liner (ruby -e "..."),
which means "if 101..200" in a script is no longer interpreted as
comparison between (({$.})) and 101 or 200.
Imported. UNIX syslog interface.
: forwardable module
Imported. Method delegation library.
: pp module
Imported. Prity Printing library.
: uri module
Imported. URI library.
: open
Extended so that when the third argument is permission flags it
calls open(2) instead of fopen(3).
: Array#fetch
Added.
: Array#insert(n, other, ...)
Added. [ruby-talk:14289]
This is much the same as (({ary[n,0] = [other,...]})) except
returing self.
ary = [0,1,2,3]
ary[2, 0] = [4, 5, 6]
p ary
ary = [0,1,2,3]
ary.insert(2, 4, 5, 6)
p ary
: Array#sort!
Changed to always return self without checking whether the sequence
of the elements was modified or not.
Beware that this behavior is not guaranteed to continue in the
future. Do not rely on its return value. [ruby-dev:12506]
: Comparison of exception classes in a rescue clause
Changed to use ((<Module>))#=== for comparing $! with the exception
Changed to use Module#=== for comparing $! with the exception
class specified in each rescue clause.
As the previous behavior was to use kind_of?, the effect is limited
@ -236,75 +119,94 @@
and Errno::EWOULDBLOCK, can both be rescued by listing just one of
them.
: ((<Array>))#fetch
: Curses
Updated. New methods and constants for using the mouse, character
attributes, colors and key codes have been added.
: Dir#path
Added.
: ((<Array>))#insert(n, other, ...)
Added. ((<ruby-talk:14289>))
This is much the same as (({ary[n,0] = [other,...]})) except
returing self.
ary = [0,1,2,3]
ary[2, 0] = [4, 5, 6]
p ary
ary = [0,1,2,3]
ary.insert(2, 4, 5, 6)
p ary
: ((<Array>))#sort!
Changed to always return self without checking whether the sequence
of the elements was modified or not.
Beware that this behavior is not guaranteed to continue in the
future. Do not rely on its return value. ((<ruby-dev:12506>))$B!%(B
: ((<Dir>)).open
Changed to return what the block returns when a block is given, just
as ((<File>)).open does. (It always returned (({nil})) in 1.6 and
prior)
: ((<Dir>)).chdir
: Dir.chdir
Extended to take a block.
: ((<Dir>)).glob
: Dir.glob
Made to support meta-character escaping by a backslash. Wildcards
and spaces may now be escaped using a backslash.
: ((<Enumerable>))#all?
: ((<Enumerable>))#any?
: ((<Enumerable>))#inject
: Dir.open
Changed to return what the block returns when a block is given, just
as File.open does. (It always returned (({nil})) in 1.6 and
prior)
: Dir.chdir
Changed to warn only when invoked from multiple threads or no block
is given. [ruby-dev:13823]
Dir.chdir('foo') {
Dir.chdir('bar') { # previously warned
puts Dir.pwd
}
}
: Enumerable#all?
: Enumerable#any?
: Enumerable#inject
: Enumerable#sort_by
Added.
: ((<File>)).lchmod
: ((<File>)).lchown
: File#fnmatch, File::Constants::FNM_*
Added. Refer to the fnmatch(3) manpage for details.
e.g.
# exclude files matching "*.bak".
files.reject! {|fn| File.fnmatch?("*.bak", fn) }
: File.lchmod
: File.lchown
Added.
: ((<IO>)).for_fd
: IO#puts
do not treat Array specially.
: IO.for_fd
Added.
: ((<IO>)).read
: IO.read
Added. ((<ruby-talk:9460>))
Added. [ruby-talk:9460]
: ((<Interrupt>))
: Interrupt
Made a subclass of ((<SignalException>)). (It was a subclass of
Made a subclass of SignalException. (It was a subclass of
Exception in 1.6 and prior)
: ((<MatchData>))#to_ary
: Line-range operation
Added for convenience of Regexp#match. ((<ruby-dev:12766>))
Obsoleted except the case when used in a one-liner (ruby -e "..."),
which means "if 101..200" in a script is no longer interpreted as
comparison between (({$.})) and 101 or 200.
: Marshal
Fixed not to dump anonymous classes/modules.
Fixed with loading modules.
: MatchData#to_ary
Added for convenience of Regexp#match. [ruby-dev:12766]
Previously we had to do:
@ -316,94 +218,185 @@
_, foo, bar, baz = /(\w+?)\s+(\w+?)\s+(\w+)/.match("foo bar baz")
p [foo, bar, baz]
: ((<Math>)).acos(x)
: ((<Math>)).asin(x)
: ((<Math>)).atan(x)
: ((<Math>)).cosh(x)
: ((<Math>)).sinh(x)
: ((<Math>)).tanh(x)
: ((<Math>)).hypot(x,y)
: Math.acos(x)
: Math.asin(x)
: Math.atan(x)
: Math.cosh(x)
: Math.hypot(x,y)
: Math.sinh(x)
: Math.tanh(x)
Added.
: ((<Module>))#included
: Method#==
Added.
: Module#include?
Added. [ruby-dev:13941]
: Module#included
Added. This is a hook called after Module#append_feature.
: ((<Module>))#method_removed
: ((<Module>))#method_undefined
: Module#method_removed
: Module#method_undefined
Added.
: ((<NoMethodError>))
: Module.new, Class.new
Added. ((<ruby-dev:12763>))
Extended to take block.
: Multiple assignment behavior
Fixed so that "*a = nil" results in "a == []".
: NameError & NoMethodError
Moved and now NoMethodError < NameError < StandardError.
: NoMethodError
Added. [ruby-dev:12763]
: NotImplementError
Finally obsoleted. Use ((<NotImplementedError>)).
Finally obsoleted. Use NotImplementedError.
: ((<Object>))#singleton_method_removed
: ((<Object>))#singleton_method_undefined
: Object#singleton_method_removed
: Object#singleton_method_undefined
Added.
: ((<Proc>))#==
: Proc#==
Added.
: ((<Process>)).times
: Proc#yield
Moved from ((<Time>)).times. (Time.times still remains but emits a
Added. This is equivalent to Proc#call except it does not check the
number of given arguments, which are thus passed to the proc as-is.
: Process.times
Moved from Time.times. (Time.times still remains but emits a
warning)
: ((<Process::Status>))
: Process.waitall
Added.
: Process::Status
Added. (({$?})) is now an instance of this class.
: ((<Process>)).waitall
: Range#step([step=1])
Added.
: ((<Regexp>)).last_match(n)
: Range#to_ary
Added. You can now do something like this:
a, b, c = 1..3
: Regexp
It is being obsoleted to regard /re/ as /re/ =~ $_ in a conditional
context. Use ~/re/ instead.
: Regexp#options
Added.
: Regexp.last_match(n)
Extended to take an optional argument.
: ((<Regexp>))#options
: Signal
Added.
Added. This module has module functions Signal.trap and Signal.list.
: ((<String>))#insert(n, other)
: Socket.pack_sockaddr_in, Socket.unpack_sockaddr_in
Added. Utility for direct Socket access.
: Socket.pack_sockaddr_un, Socket.unpack_sockaddr_un
Added. Utility for direct Socket access.
: String#[regexp, nth]
Extended to accepts optional second argument.
tries match between self and REGEXP, then returns the
content of the NTH regexp register.
: String#casecmp
Added. This is a case insensitive version of String#<=>.
: String#chomp
if $/ == '\n', chops off last newlines (any of \n, \r, \r\n).
: String#eql?
Changed to be always case sensitive.
: String#insert(n, other)
Added.
This is much the same as (({str[n, 0] = other})) except returing
self.
: ((<Symbol>)).all_symbols
: String#lstrip, rstrip, lstrip!, rstrip!
Added. ((<ruby-dev:12921>))
Added. These strip only left or right part of a string.
: ((<Symbol>))#intern
: String#match
Added.
: ((<SystemCallError>)).===
: String/Array methods
returns an instance of receivers class.
: String.new
returns "".
: Symbol#intern
Added.
: Symbol.all_symbols
Added. [ruby-dev:12921]
: SystemCallError.===
Added. (See the "Comparison of exception classes in a rescue clause"
paragraph above) ((<ruby-dev:12670>))
paragraph above) [ruby-dev:12670]
: ((<SystemExit>))#status
: SystemExit#status
Added.
: ((<TCPSocket>)).new
: ((<TCPSocket>)).open
: TCPServer#listen, UNIXServer#listen
Added.
: TCPSocket.new
: TCPSocket.open
Extended to take an address and a port number for the local side in
optional 3rd and 4th arguments.
: ((<Time>))
: Time
Extended to accept a negative time_t. (Only when the platform
supports it)
@ -411,8 +404,8 @@
p Time.at(-1)
=> Thu Jan 01 08:59:59 JST 1970
: ((<Time>))#to_a
: ((<Time>))#zone
: Time#to_a
: Time#zone
Made to return "UTC" under gmtime. It used to return a platform
dependent value, typically "GMT", in 1.6 and prior.