~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to test/socket/test_socket.rb

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
      n = s.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR)
20
20
      assert_equal([0].pack("i"), n)
21
21
      val = Object.new
22
 
      class << val; self end.funcall(:define_method, :to_int) {
 
22
      class << val; self end.send!(:define_method, :to_int) {
23
23
        s.close
24
24
        Socket::SO_TYPE
25
25
      }
34
34
    linger = [0, 0].pack("ii")
35
35
 
36
36
    val = Object.new
37
 
    class << val; self end.funcall(:define_method, :to_str) {
 
37
    class << val; self end.send!(:define_method, :to_str) {
38
38
      s.close
39
39
      linger
40
40
    }
47
47
    end
48
48
 
49
49
    val = Object.new
50
 
    class << val; self end.funcall(:define_method, :to_int) {
 
50
    class << val; self end.send!(:define_method, :to_int) {
51
51
      s.close
52
52
      Socket::SO_LINGER
53
53
    }
61
61
  def test_listen
62
62
    s = nil
63
63
    log = Object.new
64
 
    class << log; self end.funcall(:define_method, :to_int) {
 
64
    class << log; self end.send!(:define_method, :to_int) {
65
65
      s.close
66
66
      2
67
67
    }