babascript 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/lib/babascript/baba.rb +5 -2
- data/lib/babascript/version.rb +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: 3daa35e5e0a729cf767fc93dbc4cc8227210a54b
|
4
|
+
data.tar.gz: c74a70b6f51b99a285eb2c18b82c9efe213047bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adcdd149c8f92f992c8aeb4d95e4d5be7b20d7442c9c4169afa185de18bd90a4e387cac8c5c4dc1d8f14a7ea1881852a57e30f8079ce576db6a574f0f028a87d
|
7
|
+
data.tar.gz: 7f08115c3d974c2982153ac58b1d03f76e5f3c719e61de1b48728a3e7fe71cf44af446fed06bd927ffb10a667c2f636dc7f680aec76971ad00aa9ce916bfc05f
|
data/History.txt
CHANGED
data/lib/babascript/baba.rb
CHANGED
@@ -11,6 +11,7 @@ module BabaScript
|
|
11
11
|
|
12
12
|
def self.run(code=nil, &block)
|
13
13
|
raise ArgumentError "block or code require" unless block_given? or code.kind_of? String
|
14
|
+
already_eventmachine_running = EM::reactor_running?
|
14
15
|
EM::run do
|
15
16
|
linda.io.once :connect do
|
16
17
|
EM::defer do
|
@@ -19,8 +20,10 @@ module BabaScript
|
|
19
20
|
else
|
20
21
|
::BabaScript::Baba.instance_eval code
|
21
22
|
end
|
22
|
-
|
23
|
-
EM::
|
23
|
+
unless already_eventmachine_running
|
24
|
+
EM::add_timer 1 do
|
25
|
+
EM::stop
|
26
|
+
end
|
24
27
|
end
|
25
28
|
end
|
26
29
|
end
|
data/lib/babascript/version.rb
CHANGED