raap 0.9.0 → 0.10.0

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: a8b20f587b1dff6f9c33beb9e3dd237f130bc260be25f4932cde3a24cc9e795a
4
- data.tar.gz: 9080f6e301291b4d0c88a89d640635c900d610ef4886664221f3e056e1694c45
3
+ metadata.gz: b326e4d67e7475c2b0c20dd3327c92d50d5c1adda8c45adc05e6ba58b3e289c0
4
+ data.tar.gz: e6f3d8ed34403ba7561fb2864c5e1410eaf07da10917eb43122d0dd373817e82
5
5
  SHA512:
6
- metadata.gz: 35ba388b95030f3bdd79a7050b26d0ef5fe607f2e98596d61c1a8f49630f3bfb301309cac19c0c0bf95c047b042ffa1a0ffd24985259beff7d0bc49fecb19529
7
- data.tar.gz: f23bc8a43bd6b7f1295c28b05e0242cf966a589a79f806007d90f468562128ae47e25b8440aaa2be8f3dea2149d7986cedd23b38008eef6f71bccb1f1c0842ab
6
+ metadata.gz: '094fe3ad8922e1c86fdfcf67353c0819b501637f99235fd2eebc8470196d41b5f89b3c8aaea9a48681c122dd434b11ebc349b733f47637cbaf706748ee613373'
7
+ data.tar.gz: d1dcf25d8cd69d7f48c6095fb3f9c8e1f144704fc12a5a441e231d371c4b8d62b76c75a6e9b09ab1375fc45071361a9988ee268c7c4dfa7e0828de6f5137246b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.9.0] - 2024-06-11
4
+
5
+ * Update ruby by @ksss in https://github.com/ksss/raap/pull/15
6
+ * Avoid ArgumentError no keywords accepted by @ksss in https://github.com/ksss/raap/pull/16
7
+ * Fix bug for Set by @ksss in https://github.com/ksss/raap/pull/17
8
+
3
9
  ## [0.8.0] - 2024-06-09
4
10
 
5
11
  * Function of interface should not log coverage by @ksss in https://github.com/ksss/raap/pull/11
@@ -62,10 +62,10 @@ module RaaP
62
62
  end
63
63
  fun.optional_positionals.each do |param|
64
64
  resource.shift.tap do |name|
65
- # FIXME: Support without literal type
66
65
  default = Type.new(param.type).pick(size: size)
67
66
  args_name << name
68
- args_source << "#{name} = #{default}"
67
+ # FIXME: Support any object
68
+ args_source << "#{name} = #{default.inspect}"
69
69
  end
70
70
  end
71
71
  fun.rest_positionals&.yield_self do |_|
data/lib/raap/type.rb CHANGED
@@ -74,6 +74,21 @@ module RaaP
74
74
  register("::Complex") { complex }
75
75
  register("::Data") { Data.define }
76
76
  register("::Encoding") { encoding }
77
+ register("::Enumerator") do
78
+ sized do |size|
79
+ instance = __skip__ = type
80
+ Enumerator.new do |y|
81
+ size.times do
82
+ elem = if instance.args[0]
83
+ Type.new(instance.args[0]).pick(size: size / 2)
84
+ else
85
+ Type.random.pick(size: size / 2)
86
+ end
87
+ y.yield elem
88
+ end
89
+ end
90
+ end
91
+ end
77
92
  register("::FalseClass") { false }
78
93
  register("::File") { File.open("/dev/null") }
79
94
  register("::Float") { float }
@@ -96,6 +111,11 @@ module RaaP
96
111
  register("::Time") { [:call, Time, :now, [], {}, nil] }
97
112
  register("::TrueClass") { true }
98
113
  register("::UnboundMethod") { temp_method_object.unbind }
114
+ register("BigDecimal") do
115
+ sized do |size|
116
+ [:call, Kernel, :BigDecimal, [size], {}, nil]
117
+ end
118
+ end
99
119
 
100
120
  attr_reader :type
101
121
  attr_reader :range
data/lib/raap/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RaaP
4
- VERSION = "0.9.0"
4
+ VERSION = "0.10.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-11 00:00:00.000000000 Z
11
+ date: 2024-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbs