halunke 0.6.0 → 0.6.1

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
  SHA1:
3
- metadata.gz: 587cfa31e2be95b2b47f3bc8b37f2a749fccdd68
4
- data.tar.gz: c6365eaadd5898b4eb3be920b0da777bf72e7963
3
+ metadata.gz: a30ac31cb1f6c2532016bf0d0df8b675e14cb4c4
4
+ data.tar.gz: 92aad694be55cf366ef8cfa4246392439aeda9fe
5
5
  SHA512:
6
- metadata.gz: c4f24894837424828d9497f1f7051dcd3a821b0fb1000a8f7595910b50f431954459adc86a7aaedf4df8958d82b7eaeda5163fbeff1d604d754e6f0f693b8eb1
7
- data.tar.gz: 00be7897906fa849398cede10df3b32a5e136857274e465733fbdd276c7750f5ddf63d0d11f4651de2dcc9dcc57e64d86937f63968b0d86bbe4a2c33e00e54e1
6
+ metadata.gz: 3088efc5a96653967c9011a10576f31501430cd4f71712db677cbca40bad57de4219a2cc7066c524f4af379af23433e03f8ac976955819591a98b64c838a24d6
7
+ data.tar.gz: a32c0fe5da4eee3a5d6fc4cf2b3e0e9233fa5036c9abfc25b2486848b429bd82182f4bfa96edb92cf074caa58ea636d1af252a46f4038c91841df9117ef58aac
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- halunke (0.6.0)
4
+ halunke (0.6.1)
5
5
  rack (~> 2.0.4)
6
6
 
7
7
  GEM
@@ -9,6 +9,9 @@
9
9
  "then else" { |'self 'true_branch 'false_branch|
10
10
  (false_branch call [])
11
11
  }
12
+ "to_b" { |'self|
13
+ self
14
+ }
12
15
  "to_s" { |'self 'other|
13
16
  "false"
14
17
  }
@@ -26,6 +26,9 @@ module Halunke
26
26
  context["search_fn"].receive_message(context, "call", [HArray.create_instance([element])]) == context["true"]
27
27
  end
28
28
  }),
29
+ "to_b" => HFunction.new([:self], lambda { |context|
30
+ context["true"]
31
+ }),
29
32
  "to_s" => HFunction.new([:self], lambda { |context|
30
33
  inspected_members = context["self"].ruby_value.map do |member|
31
34
  member.receive_message(context, "to_s", []).ruby_value
@@ -13,6 +13,9 @@ module Halunke
13
13
  "merge" => HFunction.new([:self, :other], lambda { |context|
14
14
  HDictionary.create_instance(context["self"].ruby_value.merge(context["other"].ruby_value))
15
15
  }),
16
+ "to_b" => HFunction.new([:self], lambda { |context|
17
+ context["true"]
18
+ }),
16
19
  "to_s" => HFunction.new([:self], lambda { |context|
17
20
  x = []
18
21
  context["self"].ruby_value.each_pair do |key, value|
@@ -37,6 +37,9 @@ module Halunke
37
37
  context["false"]
38
38
  end
39
39
  }),
40
+ "to_b" => HFunction.new([:self], lambda { |context|
41
+ context["true"]
42
+ }),
40
43
  "to_s" => HFunction.new([:self], lambda { |context|
41
44
  float_value = context["self"].ruby_value.to_f
42
45
  float_value = float_value.to_i if float_value.to_i == float_value
@@ -4,6 +4,9 @@ module Halunke
4
4
  "Regexp",
5
5
  [],
6
6
  {
7
+ "to_b" => HFunction.new([:self], lambda { |context|
8
+ context["true"]
9
+ }),
7
10
  "to_s" => HFunction.new([:self], lambda { |context|
8
11
  HString.create_instance(context["self"].ruby_value.inspect)
9
12
  }),
@@ -48,6 +48,9 @@ module Halunke
48
48
  "+" => HFunction.new([:self, :other], lambda { |context|
49
49
  HString.create_instance(context["self"].ruby_value + context["other"].ruby_value)
50
50
  }),
51
+ "to_b" => HFunction.new([:self], lambda { |context|
52
+ context["true"]
53
+ }),
51
54
  "to_s" => HFunction.new([:self], lambda { |context|
52
55
  context["self"]
53
56
  }),
@@ -9,6 +9,9 @@
9
9
  "then else" { |'self 'true_branch 'false_branch|
10
10
  (true_branch call [])
11
11
  }
12
+ "to_b" { |'self|
13
+ self
14
+ }
12
15
  "to_s" { |'self 'other|
13
16
  "true"
14
17
  }
@@ -1,3 +1,3 @@
1
1
  module Halunke
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: halunke
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Dohmen