[#23677] linux-gnu — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
15 messages
2004/06/10
[#23679] Re: linux-gnu
— "Akinori MUSHA" <knu@...>
2004/06/10
At Thu, 10 Jun 2004 23:24:04 +0900,
[#23680] Re: linux-gnu
— akira yamada / やまだあきら <akira@...>
2004/06/10
[#23681] Re: linux-gnu
— "Akinori MUSHA" <knu@...>
2004/06/11
At Fri, 11 Jun 2004 04:38:00 +0900,
[#23682] Re: linux-gnu
— matz@... (Yukihiro Matsumoto)
2004/06/11
まつもと ゆきひろです
[#23683] Re: linux-gnu
— WATANABE Hirofumi <eban@...>
2004/06/11
わたなべです。
[#23690] singleton class inherits the object's class. — nobu.nakada@...
なかだです。
2 messages
2004/06/15
[#23693] Shell.Application on WIN32OLE — Masahiro Kitajima <katonbo@...>
かとんぼです。
7 messages
2004/06/16
[#23694] WIN32OLEの日本語エラーメッセージが切り詰められる — Masahiro Kitajima <katonbo@...>
かとんぼです。
5 messages
2004/06/16
[#23697] define_method and $SAFE — nobu.nakada@...
なかだです。
9 messages
2004/06/16
[#23705] Re: define_method and $SAFE
— matz@... (Yukihiro Matsumoto)
2004/06/17
まつもと ゆきひろです
[#23706] Re: define_method and $SAFE
— nobu.nakada@...
2004/06/17
なかだです。
[#23700] Oniguruma segfaults on matching at long line? — nobu.nakada@...
なかだです。
1 message
2004/06/16
[#23704] [mswin32] printf の NaN, Inf 表示 — Masahiro Kitajima <katonbo@...>
かとんぼです。
5 messages
2004/06/17
[#23717] error at TestDRbMServer (test/drb) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。どうしても原因がわからないので、報告だけ・・・
18 messages
2004/06/19
[#23718] Re: error at TestDRbMServer (test/drb)
— nobu.nakada@...
2004/06/19
なかだです。
[#23719] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/19
山本です。
[#23720] Re: error at TestDRbMServer (test/drb)
— nobu.nakada@...
2004/06/19
なかだです。
[#23724] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/19
山本です。
[#23725] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/19
山本です。
[#23726] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/19
山本です。
[#23727] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/19
山本です。
[#23728] Re: error at TestDRbMServer (test/drb)
— "U.Nakamura" <usa@...>
2004/06/21
こんにちは、なかむら(う)です。
[#23729] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/21
山本です。
[#23733] Re: error at TestDRbMServer (test/drb)
— nobu.nakada@...
2004/06/21
なかだです。
[#23734] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/21
山本です。
[#23730] Re test/ruby/test_pipe.rb fails in bcc32 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
5 messages
2004/06/21
[#23762] Ruby 1.8.2 to be released. — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
40 messages
2004/06/23
[#23778] Re: Ruby 1.8.2 to be released.
— Kouhei Sutou <kou@...>
2004/06/24
須藤です.
[#23779] Re: Ruby 1.8.2 to be released.
— Kazuhiro NISHIYAMA <zn@...>
2004/06/24
西山和広です。
[#23795] Re: Ruby 1.8.2 to be released.
— matz@... (Yukihiro Matsumoto)
2004/06/25
まつもと ゆきひろです
[#23781] Thread critical でも timeout を使いたい — Tatsuki Sugiura <sugi@...>
杉浦と申します。こんにちは。
11 messages
2004/06/24
[#23782] Re: Thread critical でも timeout を使いたい
— matz@... (Yukihiro Matsumoto)
2004/06/24
まつもと ゆきひろです
[#23783] Re: Thread critical でも timeout を使いたい
— Tatsuki Sugiura <sugi@...>
2004/06/25
杉浦です。
[#23801] Re: Thread critical でも timeout を使いたい
— Tatsuki Sugiura <sugi@...>
2004/06/25
杉浦です。
[#23784] URI() — Tanaka Akira <akr@...17n.org>
前から思っていたのですが、URI.parse("http://...") を URI("http://...")
19 messages
2004/06/25
[#23786] Re: URI()
— MoonWolf <moonwolf@...>
2004/06/25
MoonWolfです。
[#23788] Re: URI()
— matz@... (Yukihiro Matsumoto)
2004/06/25
まつもと ゆきひろです
[#23789] Re: URI()
— MoonWolf <moonwolf@...>
2004/06/25
Yukihiro Matsumoto wrote:
[#23790] Re: URI()
— matz@... (Yukihiro Matsumoto)
2004/06/25
まつもと ゆきひろです
[#23791] Re: URI()
— MoonWolf <moonwolf@...>
2004/06/25
Yukihiro Matsumoto wrote:
[#23794] Re: URI()
— matz@... (Yukihiro Matsumoto)
2004/06/25
まつもと ゆきひろです
[#23796] Re: URI()
— MoonWolf <moonwolf@...>
2004/06/25
Yukihiro Matsumoto wrote:
[#23815] set_trace_func in safe mode — nobu.nakada@...
なかだです。
5 messages
2004/06/26
[ruby-dev:23669] Re: [uri.rb] non-hierarchical URI with a fragment
From:
akira yamada / やまだあきら <akira@...>
Date:
2004-06-06 05:25:22 UTC
List:
ruby-dev #23669
>>>>> In [ruby-dev : No.23631]
>>>>> Masahiro Sakai (酒井政裕) <sakai@tom.sfc.keio.ac.jp> wrote:
> 単なる文字列の連結ではなく、上に書いたように相対URIの解決として
> 動作して欲しいと思っています。
なるほど。誤解してしまっていました。すいません。
> P.S.
> この件とは関係ないのですが、最近URIをキーとするHashを使うことがあり、
> URI::Genericに#hashと#eql?が定義されていて欲しいと思いました。
この二件について、こういう感じでどうでしょうか:
diff -ruN ruby-1.8.1.orig/lib/uri/generic.rb ruby-1.8.1/lib/uri/generic.rb
--- ruby-1.8.1.orig/lib/uri/generic.rb 2004-03-24 21:20:32.000000000 +0900
+++ ruby-1.8.1/lib/uri/generic.rb 2004-06-06 14:17:46.000000000 +0900
@@ -726,7 +726,12 @@
# # => #<URI::HTTP:0x2021f3b0 URL:http://my.rubysite.com/main.rbx?page=1>
#
def merge(oth)
- base, rel = merge0(oth)
+ begin
+ base, rel = merge0(oth)
+ rescue
+ raise $!.class, $!.message
+ end
+
if base == rel
return base
end
@@ -734,7 +739,7 @@
authority = rel.userinfo || rel.host || rel.port
# RFC2396, Section 5.2, 2)
- if rel.path.empty? && !authority && !rel.query
+ if (rel.path.nil? || rel.path.empty?) && !authority && !rel.query
base.set_fragment(rel.fragment) if rel.fragment
return base
end
@@ -744,10 +749,10 @@
# RFC2396, Section 5.2, 4)
if !authority
- base.set_path(merge_path(base.path, rel.path))
+ base.set_path(merge_path(base.path, rel.path)) if base.path && rel.path
else
# RFC2396, Section 5.2, 4)
- base.set_path(rel.path)
+ base.set_path(rel.path) if rel.path
end
# RFC2396, Section 5.2, 7)
@@ -785,14 +790,6 @@
return oth, oth
end
- if !self.hierarchical?
- raise BadURIError,
- "not hierarchical URI: #{self}"
- elsif !oth.hierarchical?
- raise BadURIError,
- "not hierarchical URI: #{oth}"
- end
-
if self.absolute?
return self.dup, oth
else
@@ -913,7 +910,11 @@
#
def route_from(oth)
# you can modify `rel', but can not `oth'.
- oth, rel = route_from0(oth)
+ begin
+ oth, rel = route_from0(oth)
+ rescue
+ raise $!.class, $!.message
+ end
if oth == rel
return rel
end
@@ -1045,6 +1046,14 @@
end
end
+ def hash
+ self.component_ary.hash
+ end
+
+ def eql?(oth)
+ self.hash == oth.hash
+ end
+
=begin
--- URI::Generic#===(oth)
diff -ruN ruby-1.8.1.orig/test/uri/test_mailto.rb ruby-1.8.1/test/uri/test_mailto.rb
--- ruby-1.8.1.orig/test/uri/test_mailto.rb 2003-10-05 15:09:26.000000000 +0900
+++ ruby-1.8.1/test/uri/test_mailto.rb 2004-06-06 14:20:30.000000000 +0900
@@ -116,6 +116,13 @@
u.select(:scheme, :host, :not_exist, :port)
end
end
+
+ def test_merge
+ # [ruby-dev:23628]
+ u0 = URI.parse('mailto:foo@example.com')
+ u1 = URI.parse('mailto:foo@example.com#bar')
+ assert_equal(uri_to_ary(u0 + '#bar'), uri_to_ary(u1))
+ end
end
これまで通りのテストが通ることは確認していますが、
non-hierarchical URIの場合に本当にうまく動いてくれるか分かりません。
もしよろしければテストを作っていただけると助かります。
# 互換性についてはテストが通ることで確認できたと考えています。
--
やまだあきら <URL:http://arika.org>
Vine Caves, Ltd. <URL:http://vinecaves.com>