From 51e6d9061dc8090bd1c9e3a1a8dadbbd9294a48d Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 27 Jan 2004 06:05:04 +0000 Subject: [PATCH] * misc/ruby-mode.el: better support for general delimited strings. [ruby-dev:22695] * lib/weakref.rb (WeakRef::initialize): set up @__id before calling "super". * lib/delegate.rb (Delegator::initialize): preserve singleton_method_added method [ruby-dev:22685] * lib/delegate.rb (Delegator::initialize): use Kernel::raise instead of mere raise. [ruby-dev:22681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 16 ++++++++++++++++ Makefile.in | 2 +- ext/curses/curses.c | 6 +++++- ext/iconv/extconf.rb | 2 +- lib/delegate.rb | 3 ++- lib/rexml/encodings/ISO-8859-1.rb | 2 +- lib/weakref.rb | 16 ++++++++-------- misc/ruby-mode.el | 8 +++----- ruby.h | 8 ++------ 9 files changed, 39 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13a6c0fa42..4b1e644375 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jan 27 15:00:14 2004 Yukihiro Matsumoto + + * misc/ruby-mode.el: better support for general delimited + strings. [ruby-dev:22695] + Tue Jan 27 11:04:40 2004 FUKUMOTO Atsushi * ext/socket/socket.c (s_recvfrom): sending length should be an @@ -16,6 +21,17 @@ Mon Jan 26 22:53:04 2004 Dave Thomas * io.c: Remove documentation references to $defout. +Mon Jan 26 14:41:46 2004 Yukihiro Matsumoto + + * lib/weakref.rb (WeakRef::initialize): set up @__id before + calling "super". + + * lib/delegate.rb (Delegator::initialize): preserve + singleton_method_added method [ruby-dev:22685] + + * lib/delegate.rb (Delegator::initialize): use Kernel::raise + instead of mere raise. [ruby-dev:22681] + Mon Jan 26 12:45:23 2004 Hidetoshi NAGAI * ext/tcltklib/tcltklib.c: define CONST84 when TCL_MAJOR_VERSION == 7 diff --git a/Makefile.in b/Makefile.in index bbfe6f8186..e3257c06d9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -229,7 +229,7 @@ $(srcdir)/configure: $(srcdir)/configure.in lex.c: keywords @-rm -f $@ - gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $> > $@ || \ + gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $< > $@ || \ cp "$(srcdir)/$@" . .y.c: diff --git a/ext/curses/curses.c b/ext/curses/curses.c index 106c43da4c..0408fbd6bc 100644 --- a/ext/curses/curses.c +++ b/ext/curses/curses.c @@ -21,7 +21,11 @@ #elif defined(HAVE_NCURSES_CURSES_H) # include #elif defined(HAVE_CURSES_COLR_CURSES_H) -# include +# ifdef HAVE_STDARG_PROTOTYPES +# include +# else +# include +# endif # include #else # include diff --git a/ext/iconv/extconf.rb b/ext/iconv/extconf.rb index 36cd60ed15..73174a17f2 100644 --- a/ext/iconv/extconf.rb +++ b/ext/iconv/extconf.rb @@ -20,7 +20,7 @@ test(iconv_t cd, char **inptr, size_t *inlen, char **outptr, size_t *outlen) else $defs.push('-DICONV_INPTR_CAST="(char **)"') end - have_library("iconv") + have_library("iconv", "iconv") if conf prefix = '$(srcdir)' prefix = $nmake ? "{#{prefix}}" : "#{prefix}/" diff --git a/lib/delegate.rb b/lib/delegate.rb index 1ba4cf1e1b..6ceaa67d29 100644 --- a/lib/delegate.rb +++ b/lib/delegate.rb @@ -27,6 +27,7 @@ class Delegator preserved |= t.protected_instance_methods(false) break if t == Delegator end + preserved << "singleton_method_added" for method in obj.methods next if preserved.include? method begin @@ -37,7 +38,7 @@ class Delegator rescue Exception $@.delete_if{|s| /:in `__getobj__'$/ =~ s} #` $@.delete_if{|s| /^\\(eval\\):/ =~ s} - raise + ::Kernel::raise end end EOS diff --git a/lib/rexml/encodings/ISO-8859-1.rb b/lib/rexml/encodings/ISO-8859-1.rb index 5beefbd408..32ddfbc909 100644 --- a/lib/rexml/encodings/ISO-8859-1.rb +++ b/lib/rexml/encodings/ISO-8859-1.rb @@ -1,6 +1,6 @@ module REXML module Encoding - @@__REXML_encoding_methods =<<-EOL + @@__REXML_encoding_methods =<<-'EOL' # Convert from UTF-8 def encode content array_utf8 = content.unpack('U*') diff --git a/lib/weakref.rb b/lib/weakref.rb index 49b907ba17..c790055d01 100644 --- a/lib/weakref.rb +++ b/lib/weakref.rb @@ -41,8 +41,7 @@ class WeakRefklass; - } + return RBASIC(obj)->klass; } static inline int @@ -661,9 +659,7 @@ rb_type(obj) if (obj == Qnil) return T_NIL; if (obj == Qfalse) return T_FALSE; } - else{ - return BUILTIN_TYPE(obj); - } + return BUILTIN_TYPE(obj); } static inline int