From bc6ef3dc20acd005554c0666111c09dc72ef6eb4 Mon Sep 17 00:00:00 2001 From: knu Date: Wed, 28 Feb 2007 13:23:42 +0000 Subject: Merge changes between r11913 and r11943 from ruby_1_8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@11944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 34 ++ NEWS | 108 +++++++ common.mk | 5 +- configure.in | 3 +- distruby.rb | 49 +++ doc/NEWS | 837 ------------------------------------------------- doc/NEWS-1.8.0 | 837 +++++++++++++++++++++++++++++++++++++++++++++++++ ext/openssl/extconf.rb | 2 - lib/mkmf.rb | 11 +- missing/flock.c | 5 +- mkconfig.rb | 1 + test/dbm/test_dbm.rb | 4 +- test/gdbm/test_gdbm.rb | 4 +- version.h | 6 +- 14 files changed, 1051 insertions(+), 855 deletions(-) create mode 100644 NEWS create mode 100644 distruby.rb delete mode 100644 doc/NEWS create mode 100644 doc/NEWS-1.8.0 diff --git a/ChangeLog b/ChangeLog index b2b5c174ad..cfe09c4656 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,37 @@ +Wed Feb 28 22:10:55 2007 Akinori MUSHA + + * doc/NEWS-1.8.0: Rename NEWS to NEWS-1.8.0. This is way too old + NEWS. + + * NEWS: Add NEWS, a document file to keep user visible feature + changes between releases. + + * configure.in (ac_cv_func_fcntl): fcntl support for MinGW. + + * missing/flock.c: workaround for MinGW. + + * ext/openssl/extconf.rb: no need to check unistd.h and sys/time.h. + they are already checked at configure. + reported by KOBAYASHI Yasuhiro [ruby-list:43225] + + * lib/mkmf.rb ($DEFLIBPATH): default library paths ($(topdir), etc) + should be the first elements of library paths list. + reported by KOBAYASHI Yasuhiro [ruby-list:43225] + + * test/{dbm,gdbm}/test_{dbm,gdbm}.rb: shouldn't use host_os. use + target_os instead. reported by KOBAYASHI Yasuhiro [ruby-list:43225] + + * mkconfig.rb (RbConfig): add CONFIG['PATCHLEVEL'] + + * common.mk: new target dist + + * distruby.rb: new file + + * configure.in (--enable-auto-image-base): avoid the neccessity to + rebase the shared libs as much as possible; + submitted by Corinna Vinschen in + [ruby-talk:240964]. + Wed Feb 28 20:51:32 2007 URABE Shyouhei * pack.c (pack_unpack): properly ignore non-base64 octets such as diff --git a/NEWS b/NEWS new file mode 100644 index 0000000000..311adc72d6 --- /dev/null +++ b/NEWS @@ -0,0 +1,108 @@ += NEWS + +This document is a list of user visible feature changes made between +releases excluding bug fixes. + +Note that each entry is kept so brief that no reason behind or +reference information is supplied with. For a full list of changes +with all sufficient information, see the ChangeLog file. + +== Changes with Ruby 1.8.5 + +=== New platforms/build tools support + +* IA64 HP-UX + +* Visual C++ 8 SP1 + +* autoconf 2.6x + +=== Library updates (outstanding ones only) + +* date + + * Updated based on date2 4.0.3. + +* digest + + * New internal APIs for C and Ruby. + + * Support for autoloading. + + * See below for new features and compatibility issues. + +* nkf + + * Updated based on nkf as of 2007-01-28. + +* tk + +=== New methods and features + +* builtin classes + + * New method: Kernel#instance_variable_defined? + + * New method: Module#class_variable_defined? + + * New feature: Dir::glob() can now take an array of glob patterns. + +* digest + + * New digest class methods: file + + * New digest instance methods: clone, reset, new, + inspect, digest_length (alias size or length), + block_length() + + * New library: digest/bubblebabble + + * New function: Digest(name) + +* fileutils + + * New option for FileUtils.cp_r(): :remove_destination + +* thread + + * Replaced with much faster mutex implementation in C. + The former implementation is available with a + configure option `--disable-fastthread'. + +* webrick + + * New method: WEBrick::Cookie.parse_set_cookies() + +=== Compatibility issues (excluding feature bug fixes) + +* builtin classes + + * Time#to_s now returns a string in a form that + conforms to RFC2822. + + # Before + "Wed Mar 03 12:34:56 JST 2007" + # After + "Wed, Mar 03 2007 12:34:56 +0900" + +* fileutils + + * A minor implementation change breaks Rake <=0.7.1. + Updating Rake to 0.7.2 fixes the problem. + +* digest + + * The constructor does no longer take an initial + string to feed; digest() and hexdigest() now do, + instead. The following examples show how to + migrate: + + # Before + md = Digest::MD5.new("string") + # After (works with any version) + md = Digest::MD5.new.update("string") + + # Before + hd = Digest::MD5.new("string").hexdigest + # After (works with any version) + hd = Digest::MD5.hexdigest("string") diff --git a/common.mk b/common.mk index 106e840b2c..f751fecfb5 100644 --- a/common.mk +++ b/common.mk @@ -297,7 +297,7 @@ $(RBCONFIG): $(srcdir)/mkconfig.rb config.status $(PREP) .PRECIOUS: $(MKFILES) -.PHONY: test install install-nodoc install-doc +.PHONY: test install install-nodoc install-doc dist PHONY: @@ -441,3 +441,6 @@ variable.$(OBJEXT): {$(VPATH)}variable.c {$(VPATH)}ruby.h config.h \ version.$(OBJEXT): {$(VPATH)}version.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}version.h + +dist: $(PROGRAM) + $(RUNRUBY) $(srcdir)/distruby.rb diff --git a/configure.in b/configure.in index 39c47d336e..950ee8ac4f 100644 --- a/configure.in +++ b/configure.in @@ -404,6 +404,7 @@ mingw*) if test "$with_winsock2" = yes; then rb_cv_binary_elf=no rb_cv_negative_time_t=no enable_pthread=no + ac_cv_func_fcntl=yes ;; os2-emx*) LIBS="-lm $LIBS" ac_cv_lib_dir_opendir=no;; @@ -1089,7 +1090,7 @@ if test "$with_dln_a_out" != yes; then rb_cv_dlopen=yes;; cygwin*|mingw*) : ${LDSHARED="${CC} -shared -s"} XLDFLAGS="$XLDFLAGS -Wl,--stack,0x02000000" - DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-import,--export-all" + DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import,--export-all" : ${LIBPATHENV=""} rb_cv_dlopen=yes ;; hiuxmpp) : ${LDSHARED='ld -r'} ;; diff --git a/distruby.rb b/distruby.rb new file mode 100644 index 0000000000..dcc3e76ce8 --- /dev/null +++ b/distruby.rb @@ -0,0 +1,49 @@ +#!./miniruby + +if RUBY_PATCHLEVEL.zero? + dirname = sprintf 'ruby-%s', RUBY_VERSION + tagname = dirname.gsub /ruby-(\d)\.(\d)\.(\d)/, 'v\1_\2_\3' +else + dirname = sprintf 'ruby-%s-p%u', RUBY_VERSION, RUBY_PATCHLEVEL + tagname = dirname.gsub /ruby-(\d)\.(\d)\.(\d)-p/, 'v\1_\2_\3_' +end +tarname = dirname + '.tar.gz' +repos = 'http://svn.ruby-lang.org/repos/ruby/tags/' + tagname + +STDERR.puts 'exporting sources...' +system 'svn', 'export', '-q', repos, dirname +Dir.chdir dirname do + STDERR.puts 'generating configure...' + system 'autoconf' + system 'rm', '-rf', 'autom4te.cache' + + STDERR.puts 'generating parse.c...' + system 'bison', '-y', '-o', 'parse.c', 'parse.y' +end + +STDERR.puts 'generating tarball...' +system 'tar', 'chofzp', tarname, dirname + +open tarname, 'rb' do |fp| + require 'digest/md5' + require 'digest/sha1' + str = fp.read + md5 = Digest::MD5.hexdigest str + sha = Digest::SHA1.hexdigest str + printf "MD5(%s)= %s\nSHA1(%s)= %s\n", tarname, md5, tarname, sha +end + + + +# +# Local Variables: +# mode: ruby +# code: utf-8 +# indent-tabs-mode: t +# tab-width: 3 +# ruby-indent-level: 3 +# fill-column: 79 +# default-justification: full +# End: +# vi: ts=3 sw=3 + diff --git a/doc/NEWS b/doc/NEWS deleted file mode 100644 index b4445fa59f..0000000000 --- a/doc/NEWS +++ /dev/null @@ -1,837 +0,0 @@ -= command line options - -: -W option - - new option to specify warning level. -W0 to shut up warnings, -W1 for normal level, - -W2 for verbose level. -w equals to -W2. - -= language syntax - -: arbitrary delimited string array - - %W(...) notation, word list literal like %w(...) with the - exception that #{} interpolation is allowed. - -: arbitrary delimited symbol literl - - :"foo", :"foo#{bar}", etc. - -: expression interpolation in strings - - 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. - -: direct assignment to Foo::Bar is allowed - - also, you can define "class Foo::Bar; end". - -= language core - -: $stdin, $stdout, $stderr - - can be assignable again. the original stdio are preserved as STDIN, - STDOUT, STDERR. - -: $VERBOSE now has 3 levels - - nil - silence, false - medium (default), true - verbose - -: allocation framework - - any instance of class can be allocated by class.allocate, - (except for a few classes). - -: comparison of exception classes in a rescue clause - - 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 - 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. - -: constants lookup - - improved at the performance of searching by using an internal hash - table. - - calls const_missing method of the class/module, if constant is not - found in the look up path. - -: expression parenthesis in the first argument - - altered to get the following code (note the space after p): - - p ("xx"*2).to_i - - Interpreted as: - - p (("xx"*2).to_i) - - Instead of: - - (p("xx"*2)).to_i - -: implicit comparison in conditional expressions - - Obsoleted except when it is used in -e. - - : between Range and $. - Use explicit comparison instead. - - : between Regexp and $_ - Use the unary method ~/re/ instead. - -: to_str - - added to get objects which define to_str() treated as String's. - - now almost all the built-in methods try each argument with to_str() - when they expect it to be a String. - - foo = Object.new - class < -: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] - -: multiple assignment behavior - - Fixed so that "*a = nil" results in "a == []". - -= changes in core class library - -: open - - Extended so that when the third argument is permission flags it - calls open(2) instead of fopen(3). - -: sprintf - - new format specifier "%p" is available. - -: lambda and proc - - Proc object returns from these methods has the following attributes: - - * strict argument number check - * break and return terminates the proc execution. - -: warn(message) - - a method to give warnings. - -: abort() - - takes optional terminate message argument. - -: Object#initialize_copy - - copy constructor for clone and dup. - -: Object#instance_variable_set, Object#instance_variable_get - - added. - -: Object#singleton_method_removed -: Object#singleton_method_undefined - - Added. - -: Array#transpose - - added. - -: Array#fetch(index [, default]) - - Added. If a default value isn't given, raises index error if index - is out of range. - -: 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] - -: Array#filter - - Previously deprecated, now removed. Use Array#collect!. - -: Array#pack, String#unpack - - Allows comment in template strings. - -: Array#pack, String#unpack - - New templates 'q' and 'Q' for 64bit integer (signed and unsigned respectively). - -: Array#new - - Now takes block to fill initial values. E.g. - - Array.new(10) { |i| i + 1 } - => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - -: Array#fill - - Takes block to get the values to fill. - -: Array#fetch - - Takes block to get the default value. - -: Array#zip - - added. - -: Hash#update - - Takes block to resolve key conflict. - -: 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) - - Added. - - 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 - - Added. - -: String/Array methods - - Returns an instance of receivers class. - -: String.new - - The first argument becomes optional. - -: Symbol#intern - - Added. - -: Symbol.all_symbols - - Added. [ruby-dev:12921] - -: IO - - 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 - - Added. - -: 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] - -: File#fnmatch, File::Constants::FNM_* - - Added. Refer to the fnmatch(3) manpage for details. - - Localism is FNM_DOTMATCH which has the opposite meaning of the - commonly known FNM_PERIOD, which does not exist in Ruby. - - e.g. - - # exclude files matching "*.bak" case-insensitively. - files.reject! {|fn| File.fnmatch?("*.bak", fn, File::FNM_CASEFOLD) } - -: File.lchmod -: File.lchown - - Added. - -: File.open, IO.open - - File mode can be specified by flags like open(2), - e.g. File::open(path, File::CREAT|File::WRONLY). - -: Regexp#options - - Added. - -: Regexp.last_match(n) - - Extended to take an optional argument. - -: MatchData#captures - - added. - -: Dir#path - - Added. - -: Dir.chdir - - Extended to take a block. - -: Dir.glob - - Made to support meta-character escaping by a backslash. Wildcards - and spaces may now be escaped using a backslash. - -: 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 - } - } - -: 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" - -: Module#include? - - Added. [ruby-dev:13941] - -: Module#included - - Added. This is a hook called after Module#append_feature. - -: Module#method_removed -: Module#method_undefined - - Added. - -: Module.new, Class.new - - Extended to take block. - -: Time - - Extended to accept a negative time_t. (Only when the platform - supports it) - - p Time.at(-1) - => Thu Jan 01 08:59:59 JST 1970 - -: 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. - -: Marshal to use marshal_dump and marshal_load - - 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). - -: Marshal - - Fixed not to dump anonymous classes/modules. - - Fixed with loading modules. - -: Thread#group - - new method to get belonging ThreadGroup. - -: Thread#terminate - - synonym of Thread#exit - -: Thread#join - - Optional argument limits maximum time to wait the thread in second. - And returns nil if timed out. - -: ThreagGroup#enclose - - prohibits thread movement from/to enclosed groups. - -: Range#step([step=1]) - - Added. - -: SystemCallError - - SystemCallError's "===" match (used in rescue also) is now based on its errno. - -: Interrupt - - Made a subclass of SignalException. (It was a subclass of - Exception in 1.6 and prior) - -: NameError and NoMethodError - - Moved and now NoMethodError < NameError < StandardError. - -: NoMethodError - - Added. [ruby-dev:12763] - -: NotImplementError - - Finally obsoleted. Use NotImplementedError. - -: SystemCallError.=== - - Added. (See the "Comparison of exception classes in a rescue clause" - paragraph above) [ruby-dev:12670] - -: SystemExit#status - - Added. - -: Proc#== - - Added. - -: Method#== - - Added. - -: UnboundMethod is no longer subclass of Method - - class hierarchy changed. - -: Enumerable#all? -: Enumerable#any? -: Enumerable#inject -: Enumerable#sort_by - - Added. - -: Math.acos(x) -: Math.asin(x) -: Math.atan(x) -: Math.cosh(x) -: Math.hypot(x,y) -: Math.sinh(x) -: Math.tanh(x) - - Added. - -: Process.abort -: Process.exit - - synonym of Kernel#abort, and Kernel#exit respectively. - -: Process::detach(pid) - - new method to detach child process. child process will be "wait"ed - automagically. - -: Process.times - - Moved from Time.times. (Time.times still remains but emits a - warning) - -: Process.waitall - - Added. - -: Process::Status - - Added. (({$?})) is now an instance of this class. - -: Process::UID, Process::GID, Process::Sys, - - Added. - -: Signal - - Added. This module has module functions Signal.trap and Signal.list. - -= 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. - -: 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. - -= newly bundled library - -: ext/bigdecimal - - variable precision decimal number - -: ext/dl - - an interface to the dynamic linker. - -: ext/enumerator - - a helper module for the Enumerable interface. - -: 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/abbrev - - creates an abbreviation table from a list - -: lib/benchmark - - Ruby scripts benchmarker - -: lib/cgi/session/pstore - - cgi/session back-end using pstore - -: lib/csv - - reads/writes CSV files. - -: lib/date/format - - strftime for Date class - -: lib/drb - - dRuby or distributed Ruby - -: lib/fileutils - - file utility library. - -: lib/generator - - converts an internal iterator to an external iterator - -: 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). diff --git a/doc/NEWS-1.8.0 b/doc/NEWS-1.8.0 new file mode 100644 index 0000000000..b4445fa59f --- /dev/null +++ b/doc/NEWS-1.8.0 @@ -0,0 +1,837 @@ += command line options + +: -W option + + new option to specify warning level. -W0 to shut up warnings, -W1 for normal level, + -W2 for verbose level. -w equals to -W2. + += language syntax + +: arbitrary delimited string array + + %W(...) notation, word list literal like %w(...) with the + exception that #{} interpolation is allowed. + +: arbitrary delimited symbol literl + + :"foo", :"foo#{bar}", etc. + +: expression interpolation in strings + + 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. + +: direct assignment to Foo::Bar is allowed + + also, you can define "class Foo::Bar; end". + += language core + +: $stdin, $stdout, $stderr + + can be assignable again. the original stdio are preserved as STDIN, + STDOUT, STDERR. + +: $VERBOSE now has 3 levels + + nil - silence, false - medium (default), true - verbose + +: allocation framework + + any instance of class can be allocated by class.allocate, + (except for a few classes). + +: comparison of exception classes in a rescue clause + + 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 + 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. + +: constants lookup + + improved at the performance of searching by using an internal hash + table. + + calls const_missing method of the class/module, if constant is not + found in the look up path. + +: expression parenthesis in the first argument + + altered to get the following code (note the space after p): + + p ("xx"*2).to_i + + Interpreted as: + + p (("xx"*2).to_i) + + Instead of: + + (p("xx"*2)).to_i + +: implicit comparison in conditional expressions + + Obsoleted except when it is used in -e. + + : between Range and $. + Use explicit comparison instead. + + : between Regexp and $_ + Use the unary method ~/re/ instead. + +: to_str + + added to get objects which define to_str() treated as String's. + + now almost all the built-in methods try each argument with to_str() + when they expect it to be a String. + + foo = Object.new + class < -: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] + +: multiple assignment behavior + + Fixed so that "*a = nil" results in "a == []". + += changes in core class library + +: open + + Extended so that when the third argument is permission flags it + calls open(2) instead of fopen(3). + +: sprintf + + new format specifier "%p" is available. + +: lambda and proc + + Proc object returns from these methods has the following attributes: + + * strict argument number check + * break and return terminates the proc execution. + +: warn(message) + + a method to give warnings. + +: abort() + + takes optional terminate message argument. + +: Object#initialize_copy + + copy constructor for clone and dup. + +: Object#instance_variable_set, Object#instance_variable_get + + added. + +: Object#singleton_method_removed +: Object#singleton_method_undefined + + Added. + +: Array#transpose + + added. + +: Array#fetch(index [, default]) + + Added. If a default value isn't given, raises index error if index + is out of range. + +: 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] + +: Array#filter + + Previously deprecated, now removed. Use Array#collect!. + +: Array#pack, String#unpack + + Allows comment in template strings. + +: Array#pack, String#unpack + + New templates 'q' and 'Q' for 64bit integer (signed and unsigned respectively). + +: Array#new + + Now takes block to fill initial values. E.g. + + Array.new(10) { |i| i + 1 } + => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + +: Array#fill + + Takes block to get the values to fill. + +: Array#fetch + + Takes block to get the default value. + +: Array#zip + + added. + +: Hash#update + + Takes block to resolve key conflict. + +: 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) + + Added. + + 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 + + Added. + +: String/Array methods + + Returns an instance of receivers class. + +: String.new + + The first argument becomes optional. + +: Symbol#intern + + Added. + +: Symbol.all_symbols + + Added. [ruby-dev:12921] + +: IO + + 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 + + Added. + +: 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] + +: File#fnmatch, File::Constants::FNM_* + + Added. Refer to the fnmatch(3) manpage for details. + + Localism is FNM_DOTMATCH which has the opposite meaning of the + commonly known FNM_PERIOD, which does not exist in Ruby. + + e.g. + + # exclude files matching "*.bak" case-insensitively. + files.reject! {|fn| File.fnmatch?("*.bak", fn, File::FNM_CASEFOLD) } + +: File.lchmod +: File.lchown + + Added. + +: File.open, IO.open + + File mode can be specified by flags like open(2), + e.g. File::open(path, File::CREAT|File::WRONLY). + +: Regexp#options + + Added. + +: Regexp.last_match(n) + + Extended to take an optional argument. + +: MatchData#captures + + added. + +: Dir#path + + Added. + +: Dir.chdir + + Extended to take a block. + +: Dir.glob + + Made to support meta-character escaping by a backslash. Wildcards + and spaces may now be escaped using a backslash. + +: 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 + } + } + +: 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" + +: Module#include? + + Added. [ruby-dev:13941] + +: Module#included + + Added. This is a hook called after Module#append_feature. + +: Module#method_removed +: Module#method_undefined + + Added. + +: Module.new, Class.new + + Extended to take block. + +: Time + + Extended to accept a negative time_t. (Only when the platform + supports it) + + p Time.at(-1) + => Thu Jan 01 08:59:59 JST 1970 + +: 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. + +: Marshal to use marshal_dump and marshal_load + + 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). + +: Marshal + + Fixed not to dump anonymous classes/modules. + + Fixed with loading modules. + +: Thread#group + + new method to get belonging ThreadGroup. + +: Thread#terminate + + synonym of Thread#exit + +: Thread#join + + Optional argument limits maximum time to wait the thread in second. + And returns nil if timed out. + +: ThreagGroup#enclose + + prohibits thread movement from/to enclosed groups. + +: Range#step([step=1]) + + Added. + +: SystemCallError + + SystemCallError's "===" match (used in rescue also) is now based on its errno. + +: Interrupt + + Made a subclass of SignalException. (It was a subclass of + Exception in 1.6 and prior) + +: NameError and NoMethodError + + Moved and now NoMethodError < NameError < StandardError. + +: NoMethodError + + Added. [ruby-dev:12763] + +: NotImplementError + + Finally obsoleted. Use NotImplementedError. + +: SystemCallError.=== + + Added. (See the "Comparison of exception classes in a rescue clause" + paragraph above) [ruby-dev:12670] + +: SystemExit#status + + Added. + +: Proc#== + + Added. + +: Method#== + + Added. + +: UnboundMethod is no longer subclass of Method + + class hierarchy changed. + +: Enumerable#all? +: Enumerable#any? +: Enumerable#inject +: Enumerable#sort_by + + Added. + +: Math.acos(x) +: Math.asin(x) +: Math.atan(x) +: Math.cosh(x) +: Math.hypot(x,y) +: Math.sinh(x) +: Math.tanh(x) + + Added. + +: Process.abort +: Process.exit + + synonym of Kernel#abort, and Kernel#exit respectively. + +: Process::detach(pid) + + new method to detach child process. child process will be "wait"ed + automagically. + +: Process.times + + Moved from Time.times. (Time.times still remains but emits a + warning) + +: Process.waitall + + Added. + +: Process::Status + + Added. (({$?})) is now an instance of this class. + +: Process::UID, Process::GID, Process::Sys, + + Added. + +: Signal + + Added. This module has module functions Signal.trap and Signal.list. + += 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. + +: 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. + += newly bundled library + +: ext/bigdecimal + + variable precision decimal number + +: ext/dl + + an interface to the dynamic linker. + +: ext/enumerator + + a helper module for the Enumerable interface. + +: 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/abbrev + + creates an abbreviation table from a list + +: lib/benchmark + + Ruby scripts benchmarker + +: lib/cgi/session/pstore + + cgi/session back-end using pstore + +: lib/csv + + reads/writes CSV files. + +: lib/date/format + + strftime for Date class + +: lib/drb + + dRuby or distributed Ruby + +: lib/fileutils + + file utility library. + +: lib/generator + + converts an internal iterator to an external iterator + +: 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). diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index 11f74ff3d8..98921bc468 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -36,8 +36,6 @@ end message "=== Checking for system dependent stuff... ===\n" have_library("nsl", "t_open") have_library("socket", "socket") -have_header("unistd.h") -have_header("sys/time.h") have_header("assert.h") message "=== Checking for required stuff... ===\n" diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 5d8bf244b3..c4e4c04dae 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -265,7 +265,7 @@ ensure log_src(src) end -def link_command(ldflags, opt="", libpath=$LIBPATH) +def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH) Config::expand(TRY_LINK.dup, CONFIG.merge('hdrdir' => $hdrdir.quote, 'src' => CONFTEST_C, @@ -289,7 +289,7 @@ def cpp_command(outfile, opt="") CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote)) end -def libpathflag(libpath=$LIBPATH) +def libpathflag(libpath=$DEFLIBPATH|$LIBPATH) libpath.map{|x| (x == "$(topdir)" ? LIBPATHFLAG : LIBPATHFLAG+RPATHFLAG) % x.quote }.join @@ -1142,7 +1142,7 @@ end # def create_makefile(target, srcprefix = nil) $target = target - libpath = $LIBPATH + libpath = $DEFLIBPATH|$LIBPATH message "creating Makefile\n" rm_f "conftest*" if CONFIG["DLEXT"] == $OBJEXT @@ -1204,7 +1204,7 @@ def create_makefile(target, srcprefix = nil) mfile = open("Makefile", "wb") mfile.print configuration(srcprefix) mfile.print " -libpath = #{$LIBPATH.join(" ")} +libpath = #{($DEFLIBPATH|$LIBPATH).join(" ")} LIBPATH = #{libpath} DEFFILE = #{deffile} @@ -1424,7 +1424,8 @@ def init_mkmf(config = CONFIG) $LIBRUBYARG = "" $LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC'] $LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED'] - $LIBPATH = $extmk ? ["$(topdir)"] : CROSS_COMPILING ? [] : ["$(libdir)"] + $DEFLIBPATH = $extmk ? ["$(topdir)"] : CROSS_COMPILING ? [] : ["$(libdir)"] + $LIBPATH = [] $INSTALLFILES = nil $objs = nil diff --git a/missing/flock.c b/missing/flock.c index ed619f0e91..5f6b41c357 100644 --- a/missing/flock.c +++ b/missing/flock.c @@ -1,6 +1,7 @@ #include "config.h" -#if defined HAVE_FCNTL && defined HAVE_FCNTL_H +#if defined _WIN32 +#elif defined HAVE_FCNTL && defined HAVE_FCNTL_H /* These are the flock() constants. Since this sytems doesn't have flock(), the values of the constants are probably not available. @@ -122,7 +123,7 @@ flock(fd, operation) return -1; } } -#elif !defined _WIN32 +#else int flock(fd, operation) int fd; diff --git a/mkconfig.rb b/mkconfig.rb index ce1c8a7465..b47b7423c5 100755 --- a/mkconfig.rb +++ b/mkconfig.rb @@ -112,6 +112,7 @@ unless has_version print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n" print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n" } + print " CONFIG[\"PATCHLEVEL\"] = \"" + RUBY_PATCHLEVEL + "\"\n" end dest = drive ? /= \"(?!\$[\(\{])(?:[a-z]:)?/i : /= \"(?!\$[\(\{])/ diff --git a/test/dbm/test_dbm.rb b/test/dbm/test_dbm.rb index d4d488f577..941e139946 100644 --- a/test/dbm/test_dbm.rb +++ b/test/dbm/test_dbm.rb @@ -12,7 +12,7 @@ if defined? DBM class TestDBM < Test::Unit::TestCase def TestDBM.uname_s require 'rbconfig' - case Config::CONFIG['host_os'] + case Config::CONFIG['target_os'] when 'cygwin' require 'Win32API' uname = Win32API.new('cygwin1', 'uname', 'P', 'I') @@ -21,7 +21,7 @@ if defined? DBM utsname.unpack('A20' * 5)[0] else - Config::CONFIG['host_os'] + Config::CONFIG['target_os'] end end SYSTEM = uname_s diff --git a/test/gdbm/test_gdbm.rb b/test/gdbm/test_gdbm.rb index 034f62085d..b84221e547 100644 --- a/test/gdbm/test_gdbm.rb +++ b/test/gdbm/test_gdbm.rb @@ -12,7 +12,7 @@ if defined? GDBM class TestGDBM < Test::Unit::TestCase def TestGDBM.uname_s require 'rbconfig' - case Config::CONFIG['host_os'] + case Config::CONFIG['target_os'] when 'cygwin' require 'Win32API' uname = Win32API.new('cygwin1', 'uname', 'P', 'I') @@ -21,7 +21,7 @@ if defined? GDBM utsname.unpack('A20' * 5)[0] else - Config::CONFIG['host_os'] + Config::CONFIG['target_os'] end end SYSTEM = uname_s diff --git a/version.h b/version.h index cd37e35405..e9522e3b1a 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.8.6" -#define RUBY_RELEASE_DATE "2007-02-27" +#define RUBY_RELEASE_DATE "2007-02-28" #define RUBY_VERSION_CODE 186 -#define RUBY_RELEASE_CODE 20070227 +#define RUBY_RELEASE_CODE 20070228 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 6 #define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_MONTH 2 -#define RUBY_RELEASE_DAY 27 +#define RUBY_RELEASE_DAY 28 RUBY_EXTERN const char ruby_version[]; RUBY_EXTERN const char ruby_release_date[]; -- cgit v1.2.3