resqued 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89da54f881dc0d8497fd7aa06d7e045e670a6bfc
4
- data.tar.gz: 0098cea4233d83032ad681b1ac2456420acad260
3
+ metadata.gz: c970fdaa5c3ed98d5a08d4f8f9ae998a70fbb700
4
+ data.tar.gz: 40b205f1d8c8da17189ccd14b9848656db3a6f10
5
5
  SHA512:
6
- metadata.gz: 00a6cc29af1db18f2616adad16ea585cd84a452e6398b41df926c14276a30bc2503d6b0ed355f83ba945951668226f523143407b6bdd3e09af4647a694700f8e
7
- data.tar.gz: 18e7a6dd7575e8f9ecb1c83b2f349519df125965a9ffcdaad207fafc68ea2eb0638bd0cf9e463230b7596c087f6e7fe9998722ec864d8a1271b4112276a1a8b0
6
+ metadata.gz: 4f3f703415a15b448da9d0372763ff789c532eae258018df43b471bab0a1eceec4482cd231feef99ec46929e50d29374fa5efb1c212bb56dab79ac0988e6e539
7
+ data.tar.gz: 5e2dfa51990c8f441187ed713fbd1cc534d82d00d4e2185d44ef22b06b063e6d776eb2ecda3c68bac04345311b3942ae8fd83acba669e2b2b5412013c0212653
@@ -5,9 +5,11 @@ module Resqued
5
5
  module Sleepy
6
6
  # Public: Like sleep, but the sleep is interrupted if input is detected on one of the provided IO objects, or if `awake` is called (e.g. from a signal handler).
7
7
  def yawn(duration, *inputs)
8
- inputs = [self_pipe[0]] + [inputs].flatten.compact
9
- IO.select(inputs, nil, nil, duration) or return
10
- self_pipe[0].kgio_tryread(11)
8
+ if duration > 0
9
+ inputs = [self_pipe[0]] + [inputs].flatten.compact
10
+ IO.select(inputs, nil, nil, duration) or return
11
+ self_pipe[0].kgio_tryread(11)
12
+ end
11
13
  end
12
14
 
13
15
  # Public: Break out of `yawn`.
@@ -1,3 +1,3 @@
1
1
  module Resqued
2
- VERSION = '0.6.1'
2
+ VERSION = '0.6.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resqued
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Burke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2013-10-15 00:00:00.000000000 Z
11
+ date: 2013-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kgio