2003-08-01 16:16:53 -04:00
|
|
|
= command line options
|
2002-12-01 04:08:14 -05:00
|
|
|
|
2003-07-30 05:10:38 -04:00
|
|
|
: -W option
|
|
|
|
|
|
|
|
new option to specify warning level. -W0 to shut up warnings, -W1 for normal level,
|
2003-07-31 22:43:42 -04:00
|
|
|
-W2 for verbose level. -w equals to -W2.
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
= language syntax
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: arbitrary delimited string array
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
%W(...) notation, word list literal like %w(...) with the
|
|
|
|
exception that #{} interpolation is allowed.
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: arbitrary delimited symbol literl
|
|
|
|
|
|
|
|
:"foo", :"foo#{bar}", etc.
|
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: expression interpolation in strings
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
Now arbitrary statements are allowed inside #{} interpolation
|
|
|
|
without escapes. In other hand, they can no longer access to
|
|
|
|
variables defined in eval.
|
|
|
|
|
|
|
|
: negative number literals
|
|
|
|
|
|
|
|
Digits preceded minus sign is a literal integer.
|
|
|
|
|
|
|
|
: array expansion
|
|
|
|
|
|
|
|
Fixed with the following behavior:
|
|
|
|
|
|
|
|
a = *[1]
|
|
|
|
p a #=> [1]
|
|
|
|
|
|
|
|
Now 1-element array in rhs is expanded properly.
|
|
|
|
|
|
|
|
a = *[1]
|
|
|
|
p a #=> 1
|
|
|
|
|
|
|
|
: break and next
|
|
|
|
|
|
|
|
Extended to take an optional expression, which is used as a value
|
|
|
|
for termination.
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: direct assignment to Foo::Bar is allowed
|
|
|
|
|
|
|
|
also, you can define "class Foo::Bar; end".
|
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
= language core
|
2003-07-30 05:10:38 -04:00
|
|
|
|
|
|
|
: $stdin, $stdout, $stderr
|
|
|
|
|
|
|
|
can be assignable again. the original stdio are preserved as STDIN,
|
|
|
|
STDOUT, STDERR.
|
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: $VERBOSE now has 3 levels
|
|
|
|
|
|
|
|
nil - silence, false - medium (default), true - verbose
|
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: allocation framework
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
any instance of class can be allocated by class.allocate,
|
|
|
|
(except for a few classes).
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: comparison of exception classes in a rescue clause
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
changed to use Module#=== for comparing $! with the exception
|
|
|
|
class specified in each rescue clause.
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
as the previous behavior was to use kind_of?, the effect is limited
|
|
|
|
to the SystemCallError case. SystemCallError.=== has been newly
|
|
|
|
defined to return true when the two have the same errno. With this
|
|
|
|
change, SystemCallError's with the same errno, such as Errno::EAGAIN
|
|
|
|
and Errno::EWOULDBLOCK, can both be rescued by listing just one of
|
|
|
|
them.
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: constants lookup
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
improved at the performance of searching by using an internal hash
|
|
|
|
table.
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
calls const_missing method of the class/module, if constant is not
|
|
|
|
found in the look up path.
|
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: expression parenthesis in the first argument
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
altered to get the following code (note the space after p):
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
p ("xx"*2).to_i
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
Interpreted as:
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
p (("xx"*2).to_i)
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
Instead of:
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
(p("xx"*2)).to_i
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: implicit comparison in conditional expressions
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
Obsoleted except when it is used in -e.
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: between Range and $.
|
|
|
|
Use explicit comparison instead.
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: between Regexp and $_
|
|
|
|
Use the unary method ~/re/ instead.
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: to_str
|
2002-12-19 03:29:18 -05:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
added to get objects which define to_str() treated as String's.
|
2002-12-19 03:29:18 -05:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
now almost all the built-in methods try each argument with to_str()
|
|
|
|
when they expect it to be a String.
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
foo = Object.new
|
|
|
|
class <<foo
|
|
|
|
def to_str
|
|
|
|
"foo"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
p File.open(foo)
|
|
|
|
=> -:7:in `open': wrong argument type Object (expected String) (TypeError)
|
|
|
|
ruby 1.6.4 (2001-04-19) [i586-linux]
|
|
|
|
=> -:7:in `open': No such file or directory - "foo" (Errno::ENOENT)
|
|
|
|
ruby 1.7.0 (2001-05-02) [i586-linux]
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: multiple assignment behavior
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
Fixed so that "*a = nil" results in "a == []".
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
= changes in core class library
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: open
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Extended so that when the third argument is permission flags it
|
|
|
|
calls open(2) instead of fopen(3).
|
2003-08-01 16:16:53 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: sprintf
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
new format specifier "%p" is available.
|
2002-12-15 16:15:58 -05:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: lambda and proc
|
2002-12-15 16:15:58 -05:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Proc object returns from these methods has the following attributes:
|
2002-12-15 16:15:58 -05:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
* strict argument number check
|
|
|
|
* break and return terminates the proc execution.
|
2002-12-15 16:15:58 -05:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: warn(message)
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
a method to give warnings.
|
2003-07-30 05:10:38 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: abort()
|
2002-12-15 16:15:58 -05:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
takes optional terminate message argument.
|
2002-12-15 16:15:58 -05:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Object#initialize_copy
|
2002-12-15 16:15:58 -05:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
copy constructor for clone and dup.
|
2002-12-15 16:15:58 -05:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Object#instance_variable_set, Object#instance_variable_get
|
2002-08-30 09:47:49 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
added.
|
2002-08-30 09:47:49 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Object#singleton_method_removed
|
|
|
|
: Object#singleton_method_undefined
|
2002-06-26 04:01:00 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Added.
|
2002-06-26 04:01:00 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Array#transpose
|
2002-05-29 01:20:39 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
added.
|
2002-05-29 01:20:39 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: Array#fetch(index [, default])
|
2002-05-23 01:35:32 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
Added. If a default value isn't given, raises index error if index
|
|
|
|
is out of range.
|
2002-05-23 01:35:32 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: Array#insert(n, other, ...)
|
2002-05-23 01:35:32 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
Added. [ruby-talk:14289]
|
2002-05-23 01:35:32 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
This is much the same as (({ary[n,0] = [other,...]})) except
|
|
|
|
returing self.
|
2002-05-19 08:13:51 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
ary = [0,1,2,3]
|
|
|
|
ary[2, 0] = [4, 5, 6]
|
|
|
|
p ary
|
2002-05-19 08:13:51 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
ary = [0,1,2,3]
|
|
|
|
ary.insert(2, 4, 5, 6)
|
|
|
|
p ary
|
2002-05-19 08:13:51 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: Array#sort!
|
2002-05-19 08:13:51 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
Changed to always return self without checking whether the sequence
|
|
|
|
of the elements was modified or not.
|
2002-06-22 11:26:58 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
Beware that this behavior is not guaranteed to continue in the
|
|
|
|
future. Do not rely on its return value. [ruby-dev:12506]
|
2002-06-22 11:26:58 -04:00
|
|
|
|
2002-12-15 16:15:58 -05:00
|
|
|
: Array#filter
|
|
|
|
|
|
|
|
Previously deprecated, now removed. Use Array#collect!.
|
|
|
|
|
2002-02-18 04:52:48 -05:00
|
|
|
: Array#pack, String#unpack
|
|
|
|
|
2002-12-15 16:15:58 -05:00
|
|
|
Allows comment in template strings.
|
2002-02-18 04:52:48 -05:00
|
|
|
|
|
|
|
: Array#pack, String#unpack
|
|
|
|
|
2002-12-15 16:15:58 -05:00
|
|
|
New templates 'q' and 'Q' for 64bit integer (signed and unsigned respectively).
|
2002-02-18 04:52:48 -05:00
|
|
|
|
2002-12-15 16:15:58 -05:00
|
|
|
: Array#new
|
2002-01-28 03:44:45 -05:00
|
|
|
|
2002-12-15 16:15:58 -05:00
|
|
|
Now takes block to fill initial values. E.g.
|
2002-01-28 03:44:45 -05:00
|
|
|
|
2002-12-15 16:15:58 -05:00
|
|
|
Array.new(10) { |i| i + 1 }
|
|
|
|
=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
|
|
|
|
|
|
|
: Array#fill
|
2002-01-28 03:44:45 -05:00
|
|
|
|
2002-12-15 16:15:58 -05:00
|
|
|
Takes block to get the values to fill.
|
2002-01-28 03:44:45 -05:00
|
|
|
|
2002-01-25 03:22:11 -05:00
|
|
|
: Array#fetch
|
|
|
|
|
2002-12-15 16:15:58 -05:00
|
|
|
Takes block to get the default value.
|
2002-01-25 03:22:11 -05:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Array#zip
|
|
|
|
|
|
|
|
added.
|
|
|
|
|
2002-01-25 03:22:11 -05:00
|
|
|
: Hash#update
|
|
|
|
|
2002-12-15 16:15:58 -05:00
|
|
|
Takes block to resolve key conflict.
|
2002-01-25 03:22:11 -05:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Hash#merge and Hash#merge!
|
|
|
|
|
|
|
|
update hash. Hash#merge! is a synonym of Hash#update.
|
|
|
|
|
|
|
|
: String#split
|
|
|
|
|
|
|
|
if "sep" argument is a string, regular expression meta characters
|
|
|
|
are escaped internally.
|
|
|
|
|
|
|
|
: String#rstrip
|
|
|
|
|
|
|
|
chop off NULs at the end of strings.
|
|
|
|
|
|
|
|
: String#to_i
|
|
|
|
|
|
|
|
Now accepts optional base argument.
|
|
|
|
|
|
|
|
"101".to_i(10) => 101
|
|
|
|
"101".to_i(2) => 5
|
|
|
|
"101".to_i(8) => 65
|
|
|
|
"101".to_i(16) => 257
|
|
|
|
|
|
|
|
A base argument of 0 guesses at the base.
|
|
|
|
|
|
|
|
"101".to_i(0) => 101
|
|
|
|
"0b101".to_i(0) => 5
|
|
|
|
"0101".to_i(0) => 65
|
|
|
|
"0x101".to_i(0) => 257
|
|
|
|
|
|
|
|
: String#[regexp, nth]
|
|
|
|
|
|
|
|
Extended to accepts optional second argument.
|
|
|
|
|
|
|
|
It 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)
|
2002-01-23 02:30:43 -05:00
|
|
|
|
|
|
|
Added.
|
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
This is much the same as (({str[n, 0] = other})) except returing
|
|
|
|
self.
|
|
|
|
|
|
|
|
: String#lstrip, rstrip, lstrip!, rstrip!
|
|
|
|
|
|
|
|
Added. These strip only left or right part of a string.
|
|
|
|
|
|
|
|
: String#match
|
2001-07-24 06:19:46 -04:00
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
Added.
|
2001-07-19 01:49:51 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: String/Array methods
|
2001-07-19 01:49:51 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Returns an instance of receivers class.
|
2001-07-19 01:49:51 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: String.new
|
2001-07-19 01:49:51 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
The first argument becomes optional.
|
2001-07-19 01:49:51 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Symbol#intern
|
2001-07-19 01:49:51 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Added.
|
2001-07-19 01:49:51 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Symbol.all_symbols
|
2001-07-19 01:49:51 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Added. [ruby-dev:12921]
|
2001-06-19 01:28:10 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: IO
|
2002-01-11 05:54:23 -05:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
64bit off_t support by Janathan Baker.
|
|
|
|
|
|
|
|
: IO#read
|
|
|
|
: IO#sysread
|
|
|
|
|
|
|
|
takes optinal second argument for read buffer.
|
|
|
|
|
|
|
|
: IO::sysopen
|
|
|
|
|
|
|
|
New method to get a raw file descriptor.
|
|
|
|
|
|
|
|
: IO#sysseek
|
2002-01-11 05:54:23 -05:00
|
|
|
|
|
|
|
Added.
|
2001-06-19 01:28:10 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: IO#fsync
|
|
|
|
|
|
|
|
new method that copies all in-memory parts of a file to disk and
|
|
|
|
waits until the device reports that all parts are on stable storage.
|
|
|
|
Implemented with fsync(2) or equivalent.
|
|
|
|
|
|
|
|
: IO.open
|
|
|
|
|
|
|
|
Made public. Can only associate an IO object with a file number
|
|
|
|
like IO.new and IO.for_fd, but can take a block.
|
|
|
|
|
|
|
|
: IO.for_fd
|
|
|
|
|
|
|
|
Added as a synonym for IO.new.
|
|
|
|
|
|
|
|
: IO.read
|
|
|
|
|
|
|
|
Added. Like IO.readlines, except it returns the entire file as a
|
|
|
|
string. [ruby-talk:9460]
|
|
|
|
|
2001-06-13 06:51:39 -04:00
|
|
|
: File#fnmatch, File::Constants::FNM_*
|
|
|
|
|
|
|
|
Added. Refer to the fnmatch(3) manpage for details.
|
|
|
|
|
2002-03-13 05:11:09 -05:00
|
|
|
Localism is FNM_DOTMATCH which has the opposite meaning of the
|
|
|
|
commonly known FNM_PERIOD, which does not exist in Ruby.
|
|
|
|
|
2001-06-13 06:51:39 -04:00
|
|
|
e.g.
|
|
|
|
|
2002-03-13 05:11:09 -05:00
|
|
|
# exclude files matching "*.bak" case-insensitively.
|
|
|
|
files.reject! {|fn| File.fnmatch?("*.bak", fn, File::FNM_CASEFOLD) }
|
2001-06-13 06:51:39 -04:00
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
: File.lchmod
|
|
|
|
: File.lchown
|
2001-06-12 01:34:03 -04:00
|
|
|
|
|
|
|
Added.
|
|
|
|
|
2002-12-15 16:15:58 -05:00
|
|
|
: File.open, IO.open
|
2001-06-09 02:00:52 -04:00
|
|
|
|
2002-12-15 16:15:58 -05:00
|
|
|
File mode can be specified by flags like open(2),
|
|
|
|
e.g. File::open(path, File::CREAT|File::WRONLY).
|
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Regexp#options
|
2002-12-15 16:15:58 -05:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Added.
|
2001-06-05 04:17:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Regexp.last_match(n)
|
2001-06-05 04:17:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Extended to take an optional argument.
|
2001-06-05 04:17:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: MatchData#captures
|
2001-06-05 04:17:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
added.
|
2001-06-05 04:17:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Dir#path
|
2001-06-05 04:17:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Added.
|
2001-06-05 04:17:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Dir.chdir
|
2001-06-05 04:17:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Extended to take a block.
|
2001-06-05 04:17:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Dir.glob
|
2001-06-05 04:17:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Made to support meta-character escaping by a backslash. Wildcards
|
|
|
|
and spaces may now be escaped using a backslash.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Dir.open
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
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)
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: 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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
: Dir#pos=
|
|
|
|
|
|
|
|
Returns the new position instead of self.
|
|
|
|
|
|
|
|
: Dir::glob
|
|
|
|
|
|
|
|
Now accepts optional FNM_* flags via the second argument, whereas
|
|
|
|
Dir::[] doesn't.
|
|
|
|
|
|
|
|
Dir.glob("makefile", File::FNM_CASEFOLD) #=> ['Makefile', 'makefile']
|
|
|
|
|
|
|
|
: Class#inherited
|
|
|
|
|
|
|
|
Method is called when Class is inherited by another class.
|
|
|
|
|
|
|
|
class A; end
|
|
|
|
def A.inherited(by)
|
|
|
|
puts "A inherited by #{by.inspect}"
|
|
|
|
end
|
|
|
|
class B < A; end
|
|
|
|
|
|
|
|
Prints out "A inherited by B"
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
: Module#include?
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
Added. [ruby-dev:13941]
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
: Module#included
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
Added. This is a hook called after Module#append_feature.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
: Module#method_removed
|
|
|
|
: Module#method_undefined
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
Added.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
: Module.new, Class.new
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
Extended to take block.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Time
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Extended to accept a negative time_t. (Only when the platform
|
|
|
|
supports it)
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
p Time.at(-1)
|
|
|
|
=> Thu Jan 01 08:59:59 JST 1970
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Time#to_a
|
|
|
|
: Time#zone
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Made to return "UTC" under gmtime. It used to return a platform
|
|
|
|
dependent value, typically "GMT", in 1.6 and prior.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Marshal to use marshal_dump and marshal_load
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
if a dumping object responds to 'marshal_dump', Marshal.dump calls
|
|
|
|
it, and dumps object returned. Marshal.load allocates a new instance
|
|
|
|
using "allocate", then calls its "marshal_load" with dumped data.
|
|
|
|
Marshal format version is now 4.8 (was 4.6 in 1.6.8).
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Marshal
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Fixed not to dump anonymous classes/modules.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Fixed with loading modules.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Thread#group
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
new method to get belonging ThreadGroup.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Thread#terminate
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
synonym of Thread#exit
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Thread#join
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Optional argument limits maximum time to wait the thread in second.
|
|
|
|
And returns nil if timed out.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: ThreagGroup#enclose
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
prohibits thread movement from/to enclosed groups.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Range#step([step=1])
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
Added.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: SystemCallError
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
SystemCallError's "===" match (used in rescue also) is now based on its errno.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Interrupt
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Made a subclass of SignalException. (It was a subclass of
|
|
|
|
Exception in 1.6 and prior)
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: NameError and NoMethodError
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Moved and now NoMethodError < NameError < StandardError.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: NoMethodError
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Added. [ruby-dev:12763]
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: NotImplementError
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Finally obsoleted. Use NotImplementedError.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: SystemCallError.===
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Added. (See the "Comparison of exception classes in a rescue clause"
|
|
|
|
paragraph above) [ruby-dev:12670]
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: SystemExit#status
|
2001-06-04 01:30:25 -04:00
|
|
|
|
|
|
|
Added.
|
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Proc#==
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Added.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Method#==
|
2001-06-04 01:30:25 -04:00
|
|
|
|
|
|
|
Added.
|
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: UnboundMethod is no longer subclass of Method
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
class hierarchy changed.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Enumerable#all?
|
|
|
|
: Enumerable#any?
|
|
|
|
: Enumerable#inject
|
|
|
|
: Enumerable#sort_by
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Added.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Math.acos(x)
|
|
|
|
: Math.asin(x)
|
|
|
|
: Math.atan(x)
|
|
|
|
: Math.cosh(x)
|
|
|
|
: Math.hypot(x,y)
|
|
|
|
: Math.sinh(x)
|
|
|
|
: Math.tanh(x)
|
2001-06-04 01:30:25 -04:00
|
|
|
|
|
|
|
Added.
|
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Process.abort
|
|
|
|
: Process.exit
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
synonym of Kernel#abort, and Kernel#exit respectively.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Process::detach(pid)
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
new method to detach child process. child process will be "wait"ed
|
|
|
|
automagically.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Process.times
|
|
|
|
|
|
|
|
Moved from Time.times. (Time.times still remains but emits a
|
|
|
|
warning)
|
|
|
|
|
|
|
|
: Process.waitall
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
Added.
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Process::Status
|
2003-08-01 16:16:53 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Added. (({$?})) is now an instance of this class.
|
2003-08-01 16:16:53 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Process::UID, Process::GID, Process::Sys,
|
2003-08-01 16:16:53 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
Added.
|
2003-08-01 16:16:53 -04:00
|
|
|
|
2003-08-04 04:31:24 -04:00
|
|
|
: Signal
|
|
|
|
|
|
|
|
Added. This module has module functions Signal.trap and Signal.list.
|
2003-08-01 16:16:53 -04:00
|
|
|
|
|
|
|
= changes in bundled libraries
|
|
|
|
|
|
|
|
: lib/cgi.rb
|
|
|
|
|
|
|
|
cgi[name] returns CGI::QueryExtension::Value that wraps string
|
|
|
|
value, no longer array.
|
|
|
|
|
|
|
|
: lib/timeout
|
|
|
|
|
|
|
|
timeout "function" wrapped in Timeout module.
|
|
|
|
|
|
|
|
: TCPServer#accept, UNIXServer#accept, Socket#accept
|
|
|
|
|
|
|
|
New methods to return an accepted socket fd.
|
|
|
|
|
|
|
|
: Date and DateTime
|
|
|
|
|
|
|
|
lib/date.rb now provides both Date and DateTime.
|
|
|
|
|
|
|
|
Some methods have been renamed. But the old names are still alive.
|
|
|
|
|
|
|
|
Some new methods have been added (Date::parse, Date#strftime, etc.).
|
|
|
|
|
|
|
|
Date#mjd now returns the chronological modified Julian day number.
|
|
|
|
|
|
|
|
All facilities about tjd have been removed.
|
|
|
|
|
|
|
|
: Curses
|
|
|
|
|
|
|
|
Updated. New methods and constants for using the mouse, character
|
|
|
|
attributes, colors and key codes have been added.
|
|
|
|
|
|
|
|
: Net::HTTP
|
|
|
|
|
|
|
|
New version of Net::HTTP has introduced seriously incompatible
|
|
|
|
changes. For details, see document embedded in net/http.rb itself.
|
|
|
|
|
|
|
|
: 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.
|
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
: TCPServer#listen, UNIXServer#listen
|
2001-06-04 01:30:25 -04:00
|
|
|
|
|
|
|
Added.
|
|
|
|
|
2002-01-11 05:54:23 -05:00
|
|
|
: TCPSocket.new
|
|
|
|
: TCPSocket.open
|
2001-06-04 01:30:25 -04:00
|
|
|
|
|
|
|
Extended to take an address and a port number for the local side in
|
|
|
|
optional 3rd and 4th arguments.
|
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
= new bundled library
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: ext/bigdecimal
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
variable precision decimal number
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
: ext/dl
|
2001-06-04 01:30:25 -04:00
|
|
|
|
2003-08-01 16:16:53 -04:00
|
|
|
an interface to the dynamic linker.
|
|
|
|
|
|
|
|
: ext/io/wait
|
|
|
|
|
|
|
|
IO wait methods.
|
|
|
|
|
|
|
|
: ext/iconv
|
|
|
|
|
|
|
|
wrapper library of (({iconv})).
|
|
|
|
|
|
|
|
: ext/openssl
|
|
|
|
|
|
|
|
OpenSSL for Ruby
|
|
|
|
|
|
|
|
: ext/racc/cparse
|
|
|
|
|
|
|
|
Racc runtime library in C. (Racc is a parser generator for ruby)
|
|
|
|
|
|
|
|
: ext/stringio
|
|
|
|
|
|
|
|
Pseudo (({IO})) class from/to (({String})).
|
|
|
|
|
|
|
|
: ext/strscan
|
|
|
|
|
|
|
|
Fast string scanner library.
|
|
|
|
|
|
|
|
: ext/syck
|
|
|
|
|
|
|
|
fast YAML parser.
|
|
|
|
|
|
|
|
: lib/benchmark
|
|
|
|
|
|
|
|
Ruby scripts benchmarker
|
|
|
|
|
|
|
|
: lib/cgi/session/pstore
|
|
|
|
|
|
|
|
cgi/session back-end using pstore
|
|
|
|
|
|
|
|
: lib/csv
|
|
|
|
|
2003-08-04 22:14:52 -04:00
|
|
|
reads/writes CSV files.
|
2003-08-01 16:16:53 -04:00
|
|
|
|
|
|
|
: lib/date/format
|
|
|
|
|
|
|
|
strftime for Date class
|
|
|
|
|
|
|
|
: lib/drb
|
|
|
|
|
|
|
|
dRuby or distributed Ruby
|
|
|
|
|
|
|
|
: lib/fileutils
|
|
|
|
|
|
|
|
file utility library.
|
|
|
|
|
|
|
|
: lib/gserver
|
|
|
|
|
|
|
|
generic server used by xmlrpc
|
|
|
|
|
|
|
|
: lib/ipaddr
|
|
|
|
|
|
|
|
manipulates IP address.
|
|
|
|
|
|
|
|
: lib/multi-tk
|
|
|
|
|
|
|
|
to allow safe Tk, etc.
|
|
|
|
|
|
|
|
: lib/open-uri
|
|
|
|
|
|
|
|
easy-to-use wrapper for net/http and net/ftp
|
|
|
|
|
|
|
|
: lib/optparse
|
|
|
|
|
|
|
|
command line options utility library
|
|
|
|
|
|
|
|
: lib/pathname
|
|
|
|
|
|
|
|
handles pathname in OO manner.
|
|
|
|
|
|
|
|
: lib/pp
|
|
|
|
|
|
|
|
prettyprinter for Ruby objects
|
|
|
|
|
|
|
|
: lib/prettyprint
|
|
|
|
|
|
|
|
implements prettyprint algorithm.
|
|
|
|
|
|
|
|
: lib/profiler
|
|
|
|
|
|
|
|
library to implement -r "profile"
|
|
|
|
|
|
|
|
: lib/racc/parser
|
|
|
|
|
|
|
|
RACC parser generator runtime in Ruby.
|
|
|
|
|
|
|
|
: lib/scanf
|
|
|
|
|
|
|
|
scan string and retrieve object with format
|
|
|
|
|
|
|
|
: lib/set
|
|
|
|
|
|
|
|
Set class
|
|
|
|
|
|
|
|
: lib/runit
|
|
|
|
|
|
|
|
RubyUnit compatible layer for test/unit
|
|
|
|
|
|
|
|
: lib/test/unit
|
|
|
|
|
|
|
|
unit testing framework for Ruby
|
|
|
|
|
|
|
|
: lib/tmpdir
|
|
|
|
|
|
|
|
get temporary directory path.
|
|
|
|
|
|
|
|
: lib/tsort
|
|
|
|
|
|
|
|
topological sorting library.
|
|
|
|
|
|
|
|
: lib/rexml
|
|
|
|
|
|
|
|
REXML XML library
|
|
|
|
|
|
|
|
: lib/webrick
|
|
|
|
|
|
|
|
generic internet server kit
|
|
|
|
|
|
|
|
: lib/xmlrpc
|
|
|
|
|
|
|
|
simple RPC via XML
|
|
|
|
|
|
|
|
: lib/un
|
|
|
|
|
|
|
|
used like 'ruby -run -e cp -- -p foo bar'. neat, isn't it?
|
|
|
|
|
|
|
|
: lib/win32/registry
|
|
|
|
|
|
|
|
win32/registry is registry accessor
|
|
|
|
|
|
|
|
: lib/yaml
|
|
|
|
|
|
|
|
YAML Ain't Mark-up Language
|
|
|
|
|
|
|
|
= removed libraries
|
|
|
|
|
|
|
|
: lib/ftplib
|
|
|
|
|
|
|
|
use net/ftp instead.
|
|
|
|
|
|
|
|
: lib/telnet
|
|
|
|
|
|
|
|
use net/telnet instead.
|
|
|
|
|
|
|
|
= new port
|
|
|
|
|
|
|
|
: WindowsCE port
|
|
|
|
: Win32 BCC
|
|
|
|
|
|
|
|
= interpreter implementation
|
|
|
|
|
|
|
|
: garbage collector
|
|
|
|
|
|
|
|
faster, but uses more memory for the worst case.
|
|
|
|
|
|
|
|
: string concatenation
|
|
|
|
|
|
|
|
faster by avoiding too frequent realloc(3).
|