From bfa0275833b60de39c8f890d6f47045d1ef4b26e Mon Sep 17 00:00:00 2001 From: akira Date: Fri, 14 Feb 2003 05:32:48 +0000 Subject: * lib/uri/generic.rb, lib/uri/ldap.rb, lib/uri/mailto.ldap: all foo=() returns arguments passed by caller. * lib/uri/generic.rb (Generic#to_str, Generic#to_s): removed to_str. Suggested by Tanaka Akira at [ruby-dev:19475]. * lib/uri/generic.rb (Generic#==): should not generate an URI object from argument. Suggested by Tanaka Akira at [ruby-dev:19475]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 12 ++++++++++++ lib/uri.rb | 2 +- lib/uri/ftp.rb | 1 + lib/uri/generic.rb | 21 ++++++++++++--------- lib/uri/ldap.rb | 5 +++++ lib/uri/mailto.rb | 2 ++ 6 files changed, 33 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4e4c73bcc8..2ab85c3904 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Fri Feb 14 14:25:24 2003 akira yamada + + * lib/uri/generic.rb, lib/uri/ldap.rb, lib/uri/mailto.ldap: all foo=() + returns arguments passed by caller. + + * lib/uri/generic.rb (Generic#to_str, Generic#to_s): removed to_str. + Suggested by Tanaka Akira at [ruby-dev:19475]. + + * lib/uri/generic.rb (Generic#==): should not generate an URI object + from argument. Suggested by Tanaka Akira at + [ruby-dev:19475]. + Thu Feb 13 11:54:50 2003 Nobuyoshi Nakada * ruby.c (ruby_init_loadpath): ensures buffer terminated diff --git a/lib/uri.rb b/lib/uri.rb index f95d72b7ce..dec18a110b 100644 --- a/lib/uri.rb +++ b/lib/uri.rb @@ -15,7 +15,7 @@ =end module URI - VERSION_CODE = '000909'.freeze + VERSION_CODE = '000910'.freeze VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze end diff --git a/lib/uri/ftp.rb b/lib/uri/ftp.rb index 391cd550e9..fc22a99753 100644 --- a/lib/uri/ftp.rb +++ b/lib/uri/ftp.rb @@ -116,6 +116,7 @@ module URI def typecode=(typecode) check_typecode(typecode) set_typecode(typecode) + typecode end =begin diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb index 4a671e9ed5..59f36ad4c3 100644 --- a/lib/uri/generic.rb +++ b/lib/uri/generic.rb @@ -243,6 +243,7 @@ Object def scheme=(v) check_scheme(v) set_scheme(v) + v end =begin @@ -315,16 +316,19 @@ Object end check_userinfo(*userinfo) set_userinfo(*userinfo) + userinfo end def user=(user) check_user(user) set_user(user) + user end def password=(password) check_password(password) set_password(password) + password end def set_userinfo(user, password = nil) @@ -420,6 +424,7 @@ Object def host=(v) check_host(v) set_host(v) + v end =begin @@ -463,6 +468,7 @@ Object def port=(v) check_port(v) set_port(v) + port end =begin @@ -502,6 +508,7 @@ Object def registry=(v) check_registry(v) set_registry(v) + v end =begin @@ -548,6 +555,7 @@ Object def path=(v) check_path(v) set_path(v) + v end =begin @@ -589,6 +597,7 @@ Object def query=(v) check_query(v) set_query(v) + v end =begin @@ -628,6 +637,7 @@ Object def opaque=(v) check_opaque(v) set_opaque(v) + v end =begin @@ -661,6 +671,7 @@ Object def fragment=(v) check_fragment(v) set_fragment(v) + v end =begin @@ -1030,7 +1041,7 @@ Object end private :path_query - def to_str + def to_s str = '' if @scheme str << @scheme @@ -1071,20 +1082,12 @@ Object str end - def to_s - to_str - end - =begin --- URI::Generic#==(oth) =end def ==(oth) - if oth.kind_of?(String) - oth = URI.parse(oth) - end - if self.class == oth.class self.normalize.component_ary == oth.normalize.component_ary else diff --git a/lib/uri/ldap.rb b/lib/uri/ldap.rb index 2911aa5738..ae85bb2164 100644 --- a/lib/uri/ldap.rb +++ b/lib/uri/ldap.rb @@ -140,6 +140,7 @@ URI::LDAP is copyrighted free software by Takaaki Tateishi and akira yamada. def dn=(val) set_dn(val) + val end =begin @@ -163,6 +164,7 @@ URI::LDAP is copyrighted free software by Takaaki Tateishi and akira yamada. def attributes=(val) set_attributes(val) + val end =begin @@ -186,6 +188,7 @@ URI::LDAP is copyrighted free software by Takaaki Tateishi and akira yamada. def scope=(val) set_scope(val) + val end =begin @@ -209,6 +212,7 @@ URI::LDAP is copyrighted free software by Takaaki Tateishi and akira yamada. def filter=(val) set_filter(val) + val end =begin @@ -232,6 +236,7 @@ URI::LDAP is copyrighted free software by Takaaki Tateishi and akira yamada. def extensions=(val) set_extensions(val) + val end end diff --git a/lib/uri/mailto.rb b/lib/uri/mailto.rb index d50d2b792f..0b0d0a5878 100644 --- a/lib/uri/mailto.rb +++ b/lib/uri/mailto.rb @@ -172,6 +172,7 @@ module URI def to=(v) check_to(v) set_to(v) + v end =begin @@ -213,6 +214,7 @@ module URI def headers=(v) check_headers(v) set_headers(v) + v end def to_str -- cgit v1.2.3