mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
20 lines
398 B
Ruby
20 lines
398 B
Ruby
require_relative '../spec_helper'
|
|
require_relative '../fixtures/classes'
|
|
|
|
guard -> { SocketSpecs.ipv6_available? } do
|
|
describe 'Socket#ipv6only!' do
|
|
before do
|
|
@socket = Socket.new(:INET6, :DGRAM)
|
|
end
|
|
|
|
after do
|
|
@socket.close
|
|
end
|
|
|
|
it 'enables IPv6 only mode' do
|
|
@socket.ipv6only!
|
|
|
|
@socket.getsockopt(:IPV6, :V6ONLY).bool.should == true
|
|
end
|
|
end
|
|
end
|