ipaccess 0.0.3 → 0.0.4

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.
@@ -130,8 +130,7 @@ module IPAccess::Patches
130
130
 
131
131
  define_method :initialize do |*args|
132
132
  @acl = GlobalSet.instance
133
- orig_initialize(*args)
134
- return self
133
+ orig_initialize.bind(self).call(*args)
135
134
  end
136
135
 
137
136
  # accept on steroids.
@@ -219,8 +218,7 @@ module IPAccess::Patches
219
218
 
220
219
  define_method :initialize do |*args|
221
220
  @acl = GlobalSet.instance
222
- orig_initialize(*args)
223
- return self
221
+ orig_initialize.bind(self).call(*args)
224
222
  end
225
223
 
226
224
  # connect on steroids.
@@ -234,7 +232,7 @@ module IPAccess::Patches
234
232
  # send on steroids.
235
233
  define_method :send do |*args|
236
234
  hostname = args[2]
237
- return orig_send(*args) if hostname.nil?
235
+ return orig_send.bind(self).call(*args) if hostname.nil?
238
236
  acl = @acl.nil? ? IPAccess::Global : @acl
239
237
  peer_ip = self.class.getaddress(hostname)
240
238
  acl.check_out_sockaddr(peer_ip)
@@ -297,7 +295,6 @@ module IPAccess::Patches
297
295
  args[0] = self.class.getaddress(args[0])
298
296
  acl.check_out_ipstring args[0]
299
297
  orig_initialize.bind(self).call(*args)
300
- return self
301
298
  end
302
299
 
303
300
  end # base.class_eval
@@ -331,7 +328,6 @@ module IPAccess::Patches
331
328
  args[0] = self.class.getaddress(args[0])
332
329
  acl.check_out_ipstring args[0]
333
330
  orig_initialize.bind(self).call(*args)
334
- return self
335
331
  end
336
332
 
337
333
  end # base.class_eval
@@ -364,7 +360,7 @@ module IPAccess::Patches
364
360
  # initialize on steroids.
365
361
  define_method :initialize do |*args|
366
362
  @acl = GlobalSet.instance
367
- return orig_initialize.bind(self).call(*args)
363
+ orig_initialize.bind(self).call(*args)
368
364
  end
369
365
 
370
366
  # accept on steroids.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipaccess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Pawe\xC5\x82 Wilk"