delorean_lang 0.3.3 → 0.3.4
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 +8 -8
- data/lib/delorean/base.rb +2 -1
- data/lib/delorean/nodes.rb +1 -1
- data/lib/delorean/version.rb +1 -1
- data/spec/eval_spec.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
ZmY2MTM0OTE2NDc5ZmI2NWM1YzlkN2VjNzc4YjBmMjM3ZTJjZjMyZg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
OWYyZGNmYTFlY2I0YmM1ZDhlMDJlN2E5NzcwMDcxYWI3NDY0NmQwZA==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
MzU5MWM3ZjMyYjBhZmU3ZDRkMjlhMzE3MmUzZDFhZDg0N2U1ZDc1N2E4OWM4
|
|
10
|
+
ZTkyOWM4ZGJiMzFlMWZjN2RlODQxZTYxOGRkMWY3ODQ5NGIzN2YwMWVkYTJj
|
|
11
|
+
NjdjMzJjNjBjMDAyYjcyZGQwNjkyNGQwZGVjMjc1ZTk2Mjc0Njc=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
ZjliYWVkY2E2YTgzN2UyNDcyNTdmNGQ5ODg4MjY0MjVhNjcxNjZhNWI3ZGEx
|
|
14
|
+
NTlmYWUzZjg2NGI2M2NkNTY1YWJmN2U3YzljZDgwZTg5YmRiNTI2ZmFiYjFl
|
|
15
|
+
YmU3Zjc3YTNhYjg1NDljMWM0NmRiYjg4NmM2NmFhY2Y2YWE1NDk=
|
data/lib/delorean/base.rb
CHANGED
|
@@ -21,7 +21,8 @@ module Delorean
|
|
|
21
21
|
uniq: [Array],
|
|
22
22
|
sum: [Array],
|
|
23
23
|
zip: [Array, [Array, Array, Array]],
|
|
24
|
-
index: [Array,
|
|
24
|
+
index: [Array,
|
|
25
|
+
[Integer, Numeric, String, Array, Fixnum, Hash]],
|
|
25
26
|
product: [Array, Array],
|
|
26
27
|
first: [Enumerable, [nil, Fixnum]],
|
|
27
28
|
intersection: [Set, Enumerable],
|
data/lib/delorean/nodes.rb
CHANGED
|
@@ -339,7 +339,7 @@ eos
|
|
|
339
339
|
|
|
340
340
|
kw_str =
|
|
341
341
|
(kw.map {|k, v| "'#{k}' => #{v}"} +
|
|
342
|
-
args.each_with_index.map {|v, i| "#{i} => #{v}"}).join(',')
|
|
342
|
+
args.reverse.each_with_index.map {|v, i| "#{i} => #{v}"}).join(',')
|
|
343
343
|
|
|
344
344
|
"_node_call(#{node_name}, _e, {#{kw_str}})"
|
|
345
345
|
end
|
data/lib/delorean/version.rb
CHANGED
data/spec/eval_spec.rb
CHANGED
|
@@ -881,11 +881,13 @@ eof
|
|
|
881
881
|
" a =?",
|
|
882
882
|
" b =?",
|
|
883
883
|
" x = (_.0 - _.1) * (a - b)",
|
|
884
|
+
" y = [_.0, _.1, _.2]",
|
|
884
885
|
"A:",
|
|
885
886
|
" a = _.0 - _.1",
|
|
886
887
|
" z = B(10, 20, a=3, b=7).x",
|
|
888
|
+
" y = B('x', 'y').y",
|
|
887
889
|
)
|
|
888
|
-
engine.evaluate_attrs("A", ["a", "z"], {0 => 123, 1 => 456}).should ==
|
|
889
|
-
[123-456,
|
|
890
|
+
engine.evaluate_attrs("A", ["a", "z", "y"], {0 => 123, 1 => 456}).should ==
|
|
891
|
+
[123-456, 40, ["x", "y", nil]]
|
|
890
892
|
end
|
|
891
893
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: delorean_lang
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Arman Bostani
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-05-
|
|
11
|
+
date: 2014-05-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: treetop
|