[#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:23670] Re: [uri.rb] non-hierarchical URI with a fragment
From:
akira yamada / やまだあきら <akira@...>
Date:
2004-06-06 08:42:31 UTC
List:
ruby-dev #23670
>>>>> In [ruby-dev : No.23669]
>>>>> akira yamada / やまだあきら <akira@ruby-lang.org> wrote:
> この二件について、こういう感じでどうでしょうか:
-のほうがうまくなかったのでもう一度考えてみました。
さっきのパッチを破棄して、こっちでどうでしょうか:
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 17:40:38.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
@@ -861,12 +858,8 @@
"relative URI: #{oth}"
end
- if !self.hierarchical? || !oth.hierarchical?
- return self, self.dup
- end
-
if self.scheme != oth.scheme
- return oth, oth.dup
+ return self, self.dup
end
rel = URI::Generic.new(nil, # it is relative URI
self.userinfo, self.host, self.port,
@@ -876,6 +869,9 @@
if rel.userinfo != oth.userinfo ||
rel.host.to_s.downcase != oth.host.to_s.downcase ||
rel.port != oth.port
+ if self.userinfo.nil? && self.host.nil?
+ return self, self.dup
+ end
rel.set_port(nil) if rel.port == oth.default_port
return rel, rel
end
@@ -883,10 +879,14 @@
rel.set_host(nil)
rel.set_port(nil)
- if rel.path == oth.path
+ if rel.path && rel.path == oth.path
rel.set_path('')
rel.set_query(nil) if rel.query == oth.query
return rel, rel
+ elsif rel.opaque && rel.opaque == oth.opaque
+ rel.set_opaque('')
+ rel.set_query(nil) if rel.query == oth.query
+ return rel, rel
end
# you can modify `rel', but can not `oth'.
@@ -913,7 +913,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 +1049,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_generic.rb ruby-1.8.1/test/uri/test_generic.rb
--- ruby-1.8.1.orig/test/uri/test_generic.rb 2003-12-23 14:17:00.000000000 +0900
+++ ruby-1.8.1/test/uri/test_generic.rb 2004-06-06 17:39:37.000000000 +0900
@@ -158,6 +158,11 @@
assert_equal('http://foo/bar/', u.to_s)
assert(nil != u.merge!("../baz"))
assert_equal('http://foo/baz', u.to_s)
+
+ # [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
def test_route
@@ -180,6 +185,15 @@
url = URI.parse('file:///a/b/').route_to('file:///a/b/')
assert_equal('', url.to_s)
+
+ url = URI.parse('mailto:foo@example.com').route_to('mailto:foo@example.com#bar')
+ assert_equal('#bar', url.to_s)
+
+ url = URI.parse('mailto:foo@example.com#bar').route_to('mailto:foo@example.com')
+ assert_equal('', url.to_s)
+
+ url = URI.parse('mailto:foo@example.com').route_to('mailto:foo@example.com')
+ assert_equal('', url.to_s)
end
def test_rfc2396_examples
--
やまだあきら <URL:http://arika.org>
Vine Caves, Ltd. <URL:http://vinecaves.com>