c66-copper 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 335454493592ae7ab9c3a2091e34f9fca4b70db49e03a3902c3dfa4a4894d55f
4
- data.tar.gz: 78fbbc6ec9ac92a815f544bf1090c30d9ea2486b9bb203d08f18b0ed0b8456fa
3
+ metadata.gz: 7479c126a34eb20484f9ef702358d22bbdeb72c01ce2b23852c8a1409b278102
4
+ data.tar.gz: b8991d855e7a276bcbe7e2bbd5964e54b20d4577d0ef154e6c78ba52aa7a054f
5
5
  SHA512:
6
- metadata.gz: 77824a1832b760f2afc99970b7081a6861bdc768cb3fa2345b31c0a8f8e645374f677ad7b03b544e3397d4d49f04697defada22a5527f187f7764d844c04279c
7
- data.tar.gz: 5c366879ee2b7f14ce9530e6e9aa00d8a5c11fa1b4d2a74b55e4940145b8425fda72b6289d00e31a08c06ad51b0c2f827296b43b1154e3afdfbb8e58d05320ad
6
+ metadata.gz: a83e0cf89ec33580a0dc6e4b2848b877586de77ff49a5d80b8a538ae6f6aba20b6e8e98f70f2e8f8c0609a5159fc08c576fcf581d2c7516f9f6ae94a6c77cda5
7
+ data.tar.gz: 074eba1527e2f5aa84d82f2bc6247ae121a4ef5c76a82c3ac1e69b2ef80336c7d25c2b5e87c8f6fd20599d6764ed11d8b02fca7ed05a317e10c2e6856541780c
@@ -6,7 +6,8 @@ module Copper
6
6
  comp_op = elements[1].value(vars)
7
7
  rhs = elements[2].value(vars)
8
8
 
9
- raise ParseError, "cannot compare nil" if rhs.nil? || lhs.nil?
9
+ return true if rhs.nil? && lhs.nil?
10
+ return false if rhs.nil? || lhs.nil?
10
11
 
11
12
  puts "[DEBUG] Comparing #{lhs} (#{lhs.class.name}) #{comp_op} #{rhs} (#{rhs.class.name})" if $debug
12
13
  begin
@@ -7,12 +7,12 @@ module Copper
7
7
  end
8
8
 
9
9
  def first
10
- raise RuntimeError, "cannot call first on an empty array" if @value.empty?
10
+ return nil if @value.empty?
11
11
  return @value.first
12
12
  end
13
13
 
14
14
  def last
15
- raise RuntimeError, "cannot call last on an empty array" if @value.empty?
15
+ return nil if @value.empty?
16
16
  return @value.last
17
17
  end
18
18
 
@@ -1,5 +1,5 @@
1
1
  module Copper
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  COPYRIGHT_MESSAGE = "(c) 2018 Cloud66 Inc."
4
4
  APP_NAME = 'Copper'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c66-copper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Khash Sajadi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-31 00:00:00.000000000 Z
11
+ date: 2018-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler