weel 1.99.155 → 1.99.156
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.
- checksums.yaml +4 -4
- data/lib/weel.rb +8 -6
- data/weel.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 42b27210321a79d1137f6397758d7c65325300ad7076cf4bc7c09b3aee0545bc
|
|
4
|
+
data.tar.gz: cad54b14c2685013ce4d71fda9e80226718b48bf29ed064337dac6476b9ae29d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3e242a628af29ea0c73c4934b7ba90056125afbc2ab53d79cc6ffe2f61029414ea406d864d918fb8209762d2aa662b159e4e237f367579843575669dc510ab1b
|
|
7
|
+
data.tar.gz: fd8b876a3ad64a2c697fd6a49528a171dc72dd1e6c3f217b1c5f532275b927c3ac957522dd8a2a946332ba36cef295b316acbfae04ae660c25767e245df86ab7
|
data/lib/weel.rb
CHANGED
|
@@ -663,14 +663,16 @@ class WEEL
|
|
|
663
663
|
def alternative(eid,condition,args={},&block)# {{{
|
|
664
664
|
return if self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped || Thread.current[:nolongernecessary]
|
|
665
665
|
Thread.current[:mutex] ||= Mutex.new
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
666
|
+
searchmode = __weel_is_in_search_mode
|
|
667
|
+
unless searchmode
|
|
668
|
+
Thread.current[:mutex].synchronize do
|
|
669
|
+
return if Thread.current[:alternative_mode][-1] == :exclusive && Thread.current[:alternative_executed][-1] == true
|
|
670
|
+
if condition.is_a?(String)
|
|
671
|
+
condition = __weel_eval_condition(eid, condition, args)
|
|
672
|
+
end
|
|
673
|
+
Thread.current[:alternative_executed][-1] = true if condition
|
|
670
674
|
end
|
|
671
|
-
Thread.current[:alternative_executed][-1] = true if condition
|
|
672
675
|
end
|
|
673
|
-
searchmode = __weel_is_in_search_mode
|
|
674
676
|
__weel_protect_yield(&block) if searchmode || condition
|
|
675
677
|
Thread.current[:alternative_executed][-1] = true if __weel_is_in_search_mode != searchmode # we swiched from searchmode true to false, thus branch has been executed which is as good as evaling the condition to true
|
|
676
678
|
end # }}}
|
data/weel.gemspec
CHANGED