In article <99302F3B-C06B-4B53-AB93-325E3F1AF05F / gmail.com>,
  Federico Builes <federico.builes / gmail.com> writes:

> * Iconv
>
> The version of Iconv bundled in 1.8.6 HEAD has 16 spec failures:
> - http://pastie.caboo.se/paste/226883
> The version of Iconv bundled in 1.8.7 HEAD has 3 spec failures:
> - http://pastie.caboo.se/paste/226885

What the revision or patchlevel of the "HEAD"?
What the output of "ruby -v"?

It seems iconv.c in 1.8.6 and 1.8.7 differs only comments now.
So they should behave similar.

% svn diff http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_6/ext/iconv/iconv.c http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7/ext/iconv/iconv.c
Index: iconv.c
===================================================================
--- iconv.c     (.../ruby_1_8_6/ext/iconv/iconv.c)      (revision 17840)
+++ iconv.c     (.../ruby_1_8_7/ext/iconv/iconv.c)      (revision 17840)
@@ -43,8 +43,12 @@
...

> You can see the full specs in:
> - http://github.com/rubyspec/rubyspec/tree/master/1.8/library/iconv
>
> If you consider any of these behaviors to be wrong please let us know.

As far as nobu's opinion, [ruby-core:17127], RubySpec
specifys bug behavior.

> * BasicSocket#close_read
>
> The current implementation in 1.8 and 1.9 allows the user to call
> close_read (or close_write) twice on a socket without raising errors.
>
> s = Socket.new(AF_INET, SOCK_STREAM, 0)
> s.bind(Socket.pack_sockaddr_in(9999, "localhost")
> s.close_read
> s.close_read   # No errors raised
>
> Contrast this with IO#close_read(and #close_write) which will raise an
> IOError if you try to close an already closed end.
>
> What behavior should we spec in this case?

I feel it should cause an error.

Successive shutdown system calls doesn't fail, though.

% strace ruby -rsocket -e 's1, s2 = UNIXSocket.pair; 10.times { s1.close_read }'
...
socketpair(PF_FILE, SOCK_STREAM, 0, [3, 4]) = 0
shutdown(3, 0 /* receive */)            = 0
shutdown(3, 0 /* receive */)            = 0
shutdown(3, 0 /* receive */)            = 0
shutdown(3, 0 /* receive */)            = 0
shutdown(3, 0 /* receive */)            = 0
shutdown(3, 0 /* receive */)            = 0
shutdown(3, 0 /* receive */)            = 0
shutdown(3, 0 /* receive */)            = 0
shutdown(3, 0 /* receive */)            = 0
shutdown(3, 0 /* receive */)            = 0
...
-- 
Tanaka Akira