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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2a155be79ae75b3c67a097791c2af2bf67196cae16ef5372049b4eb54884117
4
- data.tar.gz: b5d38c6111d1803a14c0229b0f54dc8733d581409254068ac9970af1321d9fca
3
+ metadata.gz: 496551eafa9e9774866f8322a750ec0e0b88c463c9cb0f9174cd3461003d95a5
4
+ data.tar.gz: 9d509cb07d53c12758bf3cbc1ddb45c4e75809432267cbf3215ab0ce9451404f
5
5
  SHA512:
6
- metadata.gz: 550d595b64739c49e6fdcd12b149fa0f5706d3032f11c61f6f9b9bd3ac6ff7465398a5b04f58868dca803c9cef1b9fb14f9df029bc03c550d8616760751f3886
7
- data.tar.gz: d2c25f61cdd3400c198cb6962cd31c0023ef5aa0081d3a0ea2699b7e7098620d8d39dc8af26bee5fe10197f84fb91218763fdc6ba830d2c97b30122a1b30fd3d
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 operand
28
+ case real_operand
26
29
  when AST::List
27
- evaluate_list(operand, arguments, expression, context).evaluate(context)
30
+ evaluate_list(real_operand, arguments, expression, context).evaluate(context)
28
31
  when AST::Hash
29
- evaluate_hash(operand, arguments, expression, context).evaluate(context)
32
+ evaluate_hash(real_operand, arguments, expression, context).evaluate(context)
30
33
  else
31
- raise Exceptions::InvalidFunctionError.new("Unhandled first argument to #{name}: #{operand}")
34
+ raise Exceptions::InvalidFunctionError.new("Unhandled first argument to #{name}: #{real_operand}")
32
35
  end
33
36
  end
34
37
 
@@ -1,3 +1,3 @@
1
1
  module Keisan
2
- VERSION = "0.8.5"
2
+ VERSION = "0.8.6"
3
3
  end
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.5
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-09-01 00:00:00.000000000 Z
11
+ date: 2020-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cmath