weel 1.99.155 → 1.99.157
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 +9 -7
- 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: 7c178eae822059636c1650312316a9a86569aa5410b1fa0925a27217eb489b9c
|
|
4
|
+
data.tar.gz: 43d9ddbdc46507eed44a9983d432dcc33f99bd41977eef8e0c7ab3a9a4374994
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 344d3e94a850997740096f6bdaea7db93573c2633ff4bd615f0868f26f71bded594fac65bbb696a95e7bc17fc2bf1b07f5a246e4f0eea7b7f62a2965ff71b837
|
|
7
|
+
data.tar.gz: 0deae3dff31f63d47f743e91a250bdadfa6a2085fa26779bbbbb34fb0c7a32ad5ac1603b14912e9eb819ac79dc4a2a154b99a47aefa28a00bedf3eefbf9c99ce
|
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 # }}}
|
|
@@ -826,7 +828,7 @@ class WEEL
|
|
|
826
828
|
connectionwrapper.test_condition(eid,@__weel_data,@__weel_endpoints,Thread.current[:local],connectionwrapper.additional,condition,args)
|
|
827
829
|
rescue NameError => err # don't look into it, or it will explode
|
|
828
830
|
self.__weel_state = :stopping
|
|
829
|
-
@__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,Exception.new("
|
|
831
|
+
@__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,Exception.new("eval_condition: `#{err.name}` is not a thing that can be used. Maybe it is meant to be a string and you forgot quotes?"),nil)
|
|
830
832
|
nil
|
|
831
833
|
rescue WEEL::Signal::Error => err
|
|
832
834
|
self.__weel_state = :stopping
|
data/weel.gemspec
CHANGED