quaff 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/endpoint.rb +7 -7
  2. metadata +1 -1
data/lib/endpoint.rb CHANGED
@@ -138,11 +138,7 @@ module Quaff
138
138
  end
139
139
 
140
140
  def new_source host, port
141
- if /^(\d+\.){3}\d+$/ =~ host
142
- return TCPSource.new host, port
143
- else
144
- return TCPSource.new @resolver.ipaddress(host), port
145
- end
141
+ return TCPSource.new host, port
146
142
  end
147
143
 
148
144
  def add_sock sock
@@ -194,8 +190,12 @@ module Quaff
194
190
  "UDP"
195
191
  end
196
192
 
197
- def new_source ip, port
198
- return UDPSource.new ip, port
193
+ def new_source host, port
194
+ if /^(\d+\.){3}\d+$/ =~ host
195
+ return UDPSource.new host, port
196
+ else
197
+ return UDPSource.new @resolver.getaddress(host).to_s, port
198
+ end
199
199
  end
200
200
 
201
201
  alias_method :new_connection, :new_source
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quaff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: