execjs 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/execjs/module.rb +1 -1
- data/lib/execjs/ruby_racer_runtime.rb +18 -14
- metadata +5 -5
data/lib/execjs/module.rb
CHANGED
@@ -23,26 +23,30 @@ module ExecJS
|
|
23
23
|
|
24
24
|
if /\S/ =~ source
|
25
25
|
lock do
|
26
|
-
|
26
|
+
begin
|
27
|
+
unbox @v8_context.eval("(#{source})")
|
28
|
+
rescue ::V8::JSError => e
|
29
|
+
if e.value["name"] == "SyntaxError"
|
30
|
+
raise RuntimeError, e.message
|
31
|
+
else
|
32
|
+
raise ProgramError, e.message
|
33
|
+
end
|
34
|
+
end
|
27
35
|
end
|
28
36
|
end
|
29
|
-
rescue ::V8::JSError => e
|
30
|
-
if e.value["name"] == "SyntaxError"
|
31
|
-
raise RuntimeError, e.message
|
32
|
-
else
|
33
|
-
raise ProgramError, e.message
|
34
|
-
end
|
35
37
|
end
|
36
38
|
|
37
39
|
def call(properties, *args)
|
38
40
|
lock do
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
41
|
+
begin
|
42
|
+
unbox @v8_context.eval(properties).call(*args)
|
43
|
+
rescue ::V8::JSError => e
|
44
|
+
if e.value["name"] == "SyntaxError"
|
45
|
+
raise RuntimeError, e.message
|
46
|
+
else
|
47
|
+
raise ProgramError, e.message
|
48
|
+
end
|
49
|
+
end
|
46
50
|
end
|
47
51
|
end
|
48
52
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: execjs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 3
|
10
|
+
version: 1.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sam Stephenson
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-06-
|
19
|
+
date: 2011-06-13 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: "0"
|
103
103
|
requirements: []
|
104
104
|
|
105
|
-
rubyforge_project:
|
105
|
+
rubyforge_project:
|
106
106
|
rubygems_version: 1.6.2
|
107
107
|
signing_key:
|
108
108
|
specification_version: 3
|