weel 1.99.28 → 1.99.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/weel.rb +4 -4
- data/weel.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec0ae6f81b68ba24ab4d8d2a677264651c6ee710
|
4
|
+
data.tar.gz: d8f2c82cdde8a3468ce0a53027e18e0a67e29a9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bee2722bd96b7a6ac1a1b948c54c174a5d79c1f33a1522e3d57b3c3ef524f8df88fd71a520c0c3b6acbbed192795b8d5aefc2f28e45f63d0d20aa91171a4c54
|
7
|
+
data.tar.gz: d551b0f608ac580ac04184aecc66d672405158f5cd7df46e8b8ae9ef2fa00ed1f60bb45ec6e750586a92de561f95ac04e69f50a7f1046595bb535dfa42a409b1
|
data/lib/weel.rb
CHANGED
@@ -454,7 +454,7 @@ class WEEL
|
|
454
454
|
# searchmode is active (to find the starting position)
|
455
455
|
def alternative(condition,args={})# {{{
|
456
456
|
return if self.__weel_state == :stopping || self.__weel_state == :stopped || Thread.current[:nolongernecessary]
|
457
|
-
hw, pos = __weel_sim_start(:alternative,args.merge(:mode => Thread.current[:alternative_mode], :condition => condition.is_a?(String) ? condition : nil)) if __weel_sim
|
457
|
+
hw, pos = __weel_sim_start(:alternative,args.merge(:mode => Thread.current[:alternative_mode].last, :condition => condition.is_a?(String) ? condition : nil)) if __weel_sim
|
458
458
|
Thread.current[:mutex] ||= Mutex.new
|
459
459
|
Thread.current[:mutex].synchronize do
|
460
460
|
return if Thread.current[:alternative_mode] == :exclusive && Thread.current[:alternative_executed][-1] = true
|
@@ -465,13 +465,13 @@ class WEEL
|
|
465
465
|
Thread.current[:alternative_executed][-1] = true if condition
|
466
466
|
end
|
467
467
|
yield if __weel_is_in_search_mode || __weel_sim || condition
|
468
|
-
__weel_sim_stop(:alternative,hw,pos,args.merge(:mode => Thread.current[:alternative_mode], :condition => condition.is_a?(String) ? condition : nil)) if __weel_sim
|
468
|
+
__weel_sim_stop(:alternative,hw,pos,args.merge(:mode => Thread.current[:alternative_mode].last, :condition => condition.is_a?(String) ? condition : nil)) if __weel_sim
|
469
469
|
end # }}}
|
470
470
|
def otherwise(args={}) # {{{
|
471
471
|
return if self.__weel_state == :stopping || self.__weel_state == :stopped || Thread.current[:nolongernecessary]
|
472
|
-
hw, pos = __weel_sim_start(:otherwise,args.merge(:mode => Thread.current[:alternative_mode])) if __weel_sim
|
472
|
+
hw, pos = __weel_sim_start(:otherwise,args.merge(:mode => Thread.current[:alternative_mode].last)) if __weel_sim
|
473
473
|
yield if __weel_is_in_search_mode || __weel_sim || !Thread.current[:alternative_executed].last
|
474
|
-
__weel_sim_stop(:otherwise,hw,pos,args.merge(:mode => Thread.current[:alternative_mode])) if __weel_sim
|
474
|
+
__weel_sim_stop(:otherwise,hw,pos,args.merge(:mode => Thread.current[:alternative_mode].last)) if __weel_sim
|
475
475
|
end # }}}
|
476
476
|
|
477
477
|
# Defines a critical block (=Mutex)
|
data/weel.gemspec
CHANGED