keisan 0.8.5 → 0.8.6
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/keisan/functions/enumerable_function.rb +7 -4
- data/lib/keisan/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 496551eafa9e9774866f8322a750ec0e0b88c463c9cb0f9174cd3461003d95a5
|
4
|
+
data.tar.gz: 9d509cb07d53c12758bf3cbc1ddb45c4e75809432267cbf3215ab0ce9451404f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0047d2ffeea473809ce46b8e7a0c5458012a5ee27182384d28f9ce5706eeaf0385a7c6aecf4619b637760ec235d8c55f8815c537665f03af58ed388180d5fe4
|
7
|
+
data.tar.gz: 29d2bf8124706bc44129abec0839bba5809678e71c50ac6b2b6d56e2584f4d7cf3f094005db1e8f6e2606334a637f6df90ab95f1a80ac8e6f9e844f67aaf032d
|
@@ -21,14 +21,17 @@ module Keisan
|
|
21
21
|
context ||= Context.new
|
22
22
|
|
23
23
|
operand, arguments, expression = operand_arguments_expression_for(ast_function, context)
|
24
|
+
|
25
|
+
# Extract underlying operand for cells
|
26
|
+
real_operand = operand.is_a?(AST::Cell) ? operand.node : operand
|
24
27
|
|
25
|
-
case
|
28
|
+
case real_operand
|
26
29
|
when AST::List
|
27
|
-
evaluate_list(
|
30
|
+
evaluate_list(real_operand, arguments, expression, context).evaluate(context)
|
28
31
|
when AST::Hash
|
29
|
-
evaluate_hash(
|
32
|
+
evaluate_hash(real_operand, arguments, expression, context).evaluate(context)
|
30
33
|
else
|
31
|
-
raise Exceptions::InvalidFunctionError.new("Unhandled first argument to #{name}: #{
|
34
|
+
raise Exceptions::InvalidFunctionError.new("Unhandled first argument to #{name}: #{real_operand}")
|
32
35
|
end
|
33
36
|
end
|
34
37
|
|
data/lib/keisan/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keisan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Locke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cmath
|