[#11383] Re: $2000 USD Reward for help fixing Segmentation Fault in GC — Brent Roman <brent@...>
Daz,
[#11396] Re: $2000 USD Reward for help fixing Segmentation Fault in GC — Brent Roman <brent@...>
Sylvain,
[#11401] Proc.== — David Flanagan <david@...>
Can anyone construct two proc objects p1 and p2, without using clone or
Hi,
Okay, anything other than the degenerate case of a proc with no body?
On Jun 4, 2007, at 22:57, David Flanagan wrote:
[#11409] Method introspection ? — "Jonas Pfenniger" <zimbatm@...>
Hello,
[#11418] currying in Ruby — David Flanagan <david@...>
I've written a little argument currying module for Procs and Methods. I
[#11431] Are there a better set of unit tests for Array? — "John Lam (CLR)" <jflam@...>
It seems like the unit tests that we have in Ruby.net were:
[#11439] comments needed for Random class — "NAKAMURA, Hiroshi" <nakahiro@...>
-----BEGIN PGP SIGNED MESSAGE-----
On 6/12/07, NAKAMURA, Hiroshi <nakahiro@sarion.co.jp> wrote:
[#11450] Re: new method dispatch rule (matz' proposal) — David Flanagan <david@...>
This is a late response to the very long thread that started back in
On 6/13/07, David Flanagan <david@davidflanagan.com> wrote:
On 6/13/07, David Flanagan <david@davidflanagan.com> wrote:
[#11457] Inclusion of bug #9376 in 1.8.6 branch — Sylvain Joyeux <sylvain.joyeux@...4x.org>
Would it be possible to include the fix for bug #9376 in 1.8.6 ? It is not
[#11462] What should this code do? — "John Lam (CLR)" <jflam@...>
Thinking about control flow these days ...
[#11472] Strange Array#transpose behavior for custom to_ary method — Daniel Berger <djberg96@...>
Ruby 1.8.6 p36
[#11481] Ancestors for Singleton classes — "Robert Dober" <robert.dober@...>
I am taking this away from ruby-talk as it contains patches.
[#11482] Ruby Changes Its Mind About Non-Word Characters — James Edward Gray II <james@...>
Does this look like a bug to anyone else?
James Edward Gray II wrote:
Hi,
On Jun 16, 2007, at 2:41 PM, Vincent Isambart wrote:
> > It is because the and サ characters are not in ISO-8859-1.
[#11505] Question about the patchlevel release cycle — Sylvain Joyeux <sylvain.joyeux@...4x.org>
1.8.6 thread support was broken in bad ways. It stayed for three months
> could you refer to bug #s?
Hi,
Hi, I'm the 1.8.6 branch manager.
On 6/20/07, Urabe Shyouhei <shyouhei@ruby-lang.org> wrote:
[#11533] method_missing for Enumerator — TRANS <transfire@...>
What do others think of this for 1.9+?
[#11543] Re: Apple reportedly to ship with ruby 1.8.6-p36 unless informed what to patch — James Edward Gray II <james@...>
On Jun 27, 2007, at 4:47 PM, Bill Kelly wrote:
Hi,
On Jun 30, 2007, at 4:51 AM, Urabe Shyouhei wrote:
Hi,
Hi,
Hi,
I haven't seen it mentioned explicitly in this thread so far, but I
[#11545] Proc initialize method not called under certain circumstances — "John Lam (CLR)" <jflam@...>
class Proc
On Fri, 29 Jun 2007 05:43:14 +0900, "John Lam (CLR)" <jflam@microsoft.com> wrote:
So, is it correct to assume that for language constructs that create built-in types like Range, Array, Hash etc that user-defined initialize methods are never called?
[PATCH] URI::Generic: remove [] from IPv6 hosts
Hi When parsing an URI such as "http://[::1]/..." the host part will be "[::1]". This is not useful for ie. TCPSocket::new. The attached patch removes the brackets when parsing and reattaches them at serialization. I know the code has poor style but should explain what I mean. Stephan
Attachments (1)
diff -urN ruby-1.8.6/lib/uri/common.rb ruby-1.8.6-mine/lib/uri/common.rb
--- ruby-1.8.6/lib/uri/common.rb 2007-02-15 03:41:45.000000000 +0100
+++ ruby-1.8.6-mine/lib/uri/common.rb 2007-06-01 13:30:58.000000000 +0200
@@ -184,6 +184,8 @@
# :stopdoc:
+ IPV6REF = Regexp.new('^' + PATTERN::IPV6REF + '$')
+
# for URI::split
ABS_URI = Regexp.new('^' + PATTERN::X_ABS_URI + '$', #'
Regexp::EXTENDED, 'N').freeze
@@ -437,6 +439,11 @@
end
path = '' if !path && !opaque # (see RFC2396 Section 5.2)
+ if host =~ IPV6REF
+ host.sub!(/^\[/, '')
+ host.sub!(/\]$/, '')
+ end
+
ret = [
scheme,
userinfo, host, port, # X
diff -urN ruby-1.8.6/lib/uri/generic.rb ruby-1.8.6-mine/lib/uri/generic.rb
--- ruby-1.8.6/lib/uri/generic.rb 2007-02-15 08:45:04.000000000 +0100
+++ ruby-1.8.6-mine/lib/uri/generic.rb 2007-06-01 13:30:35.000000000 +0200
@@ -1019,7 +1019,7 @@
str << '@'
end
if @host
- str << @host
+ str << ((@host =~ /:/) ? "[#{@host}]" : @host)
end
if @port && @port != self.default_port
str << ':'
diff -urN ruby-1.8.6/test/uri/test_http.rb ruby-1.8.6-mine/test/uri/test_http.rb
--- ruby-1.8.6/test/uri/test_http.rb 2007-02-13 00:01:19.000000000 +0100
+++ ruby-1.8.6-mine/test/uri/test_http.rb 2007-06-01 13:35:18.000000000 +0200
@@ -57,6 +57,15 @@
u.select(:scheme, :host, :not_exist, :port)
end
end
+
+ def test_ipv6
+ u1 = URI.parse('http://[fe80:1243:1234:1234:5678:5678:9abc:9abc]/')
+ assert_equal(['http', 'fe80:1243:1234:1234:5678:5678:9abc:9abc', 80, '/'], u1.select(:scheme, :host, :port, :path))
+ assert_equal('http://[fe80:1243:1234:1234:5678:5678:9abc:9abc]/', u1.to_s)
+ u2 = URI.parse('http://[::1]:8080/')
+ assert_equal(['http', '::1', 8080, '/'], u2.select(:scheme, :host, :port, :path))
+ assert_equal('http://[::1]:8080/', u2.to_s)
+ end
end