From faa903c341b98ba0c5e3fc96abba3af66f166fd7 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 7 Mar 2005 00:20:16 +0000 Subject: * string.c (rb_str_cmp_m): should not return false but nil. fixed: [ruby-dev:25811] * lib/cgi-lib.rb: add deprecation warning. [ruby-dev:25499] getopts.rb, parsearg.rb, importenv.rb as well. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 10 ++++++++++ lib/cgi-lib.rb | 2 ++ lib/cgi/session.rb | 4 ++-- lib/date.rb | 2 +- lib/getopts.rb | 2 ++ lib/importenv.rb | 2 ++ lib/parsearg.rb | 2 ++ string.c | 2 +- 8 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3df05edee..533a21666 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Mar 7 09:18:42 2005 Yukihiro Matsumoto + + * string.c (rb_str_cmp_m): should not return false but nil. + fixed: [ruby-dev:25811] + Mon Mar 7 01:22:14 2005 Hidetoshi NAGAI * ext/tk/tkutil.c: remove the some codes which depend on the @@ -47,6 +52,11 @@ Fri Mar 4 19:39:28 2005 Nobuyoshi Nakada * ext/strscan/strscan.c: moved misplaced rdoc. +Fri Mar 4 15:58:12 2005 Yukihiro Matsumoto + + * lib/cgi-lib.rb: add deprecation warning. [ruby-dev:25499] + getopts.rb, parsearg.rb, importenv.rb as well. + Fri Mar 4 11:17:06 2005 Hidetoshi NAGAI * ext/tcltklib/tcltklib.c (ip_rbUpdateCommand): get rid of diff --git a/lib/cgi-lib.rb b/lib/cgi-lib.rb index bc780ffc4..d6b60d66c 100644 --- a/lib/cgi-lib.rb +++ b/lib/cgi-lib.rb @@ -1,3 +1,5 @@ +warn "Warning:#{caller[0].sub(/:in `.*'\z/, '')}: cgi-lib is deprecated after Ruby 1.8.1; use cgi instead" + =begin = simple CGI support library diff --git a/lib/cgi/session.rb b/lib/cgi/session.rb index e475bd94c..562e571cd 100644 --- a/lib/cgi/session.rb +++ b/lib/cgi/session.rb @@ -155,8 +155,8 @@ class CGI # class Session - #:nodoc: - class NoSession < RuntimeError; end + class NoSession < RuntimeError #:nodoc: + end # The id of this session. attr_reader :session_id, :new_session diff --git a/lib/date.rb b/lib/date.rb index 0ae368fb9..c2070760a 100644 --- a/lib/date.rb +++ b/lib/date.rb @@ -1258,7 +1258,7 @@ class DateTime < Date new_with_hash(elem, sg) end - class << self; undef_method :today end + class << self; undef_method :today end rescue nil # Create a new DateTime object representing the current time. # diff --git a/lib/getopts.rb b/lib/getopts.rb index 34fb0d644..f63bbfef6 100644 --- a/lib/getopts.rb +++ b/lib/getopts.rb @@ -15,6 +15,8 @@ # rewritten by Akinori MUSHA # +warn "Warning:#{caller[0].sub(/:in `.*'\z/, '')}: getopts is deprecated after Ruby 1.8.1; use optparse instead" if caller[0] + $RCS_ID=%q$Header$ diff --git a/lib/importenv.rb b/lib/importenv.rb index 435d6f972..8e1ba33b1 100644 --- a/lib/importenv.rb +++ b/lib/importenv.rb @@ -7,6 +7,8 @@ # $USER = "matz" # p ENV["USER"] +warn "Warning:#{caller[0].sub(/:in `.*'\z/, '')}: importenv is deprecated after Ruby 1.8.1 (no replacement)" + for k,v in ENV next unless /^[a-zA-Z][_a-zA-Z0-9]*/ =~ k eval <"))) { return Qnil; -- cgit