<commit_before><commit_msg>spec for JRUBY-4896<commit_after>require File.expand_path('../../../../spec_helper', __FILE__)
require File.expand_path('../../fixtures/classes', __FILE__)

describe "UDPSocket.recvfrom" do

  it "refuses the connection when there is no server to read from" do
    lambda {
      udp = UDPSocket.open
      udp.connect '127.0.0.1', SocketSpecs.port
      udp.send 'ping', 0
      data = udp.recvfrom 64
    }.should raise_error(Errno::ECONNREFUSED)
  end

end
{'fraction_non_alphanumeric': 0.13580246913580246, 'fraction_numerical': 0.026748971193415638, 'mean_word_length': 3.2719298245614037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3093950', 'n_tokens_mistral': 176, 'n_tokens_neox': 163, 'n_words': 40}